From 306a9a83b33ae3dc4a4ff5ea7615c905320ef8fc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 18:22:20 -0400 Subject: [PATCH] chore: [compute] update Compute to generate Snippetgen Phase 1 samples for Java (#788) (#9262) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update Compute Engine API to revision 20230307 (#786) Source-Link: https://github.com/googleapis/googleapis/commit/f64a3c8418e2e4e493b6a432220d774e7942141a Source-Link: https://github.com/googleapis/googleapis-gen/commit/808541b7e7697e2984a0ea0eba1adb5560dade97 Copy-Tag: eyJwIjoiamF2YS1jb21wdXRlLy5Pd2xCb3QueWFtbCIsImgiOiI4MDg1NDFiN2U3Njk3ZTI5ODRhMGVhMGViYTFhZGI1NTYwZGFkZTk3In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update Compute to generate Snippetgen Phase 1 samples for Java (#788) Source-Link: https://github.com/googleapis/googleapis/commit/4b19154d0b46e5013a34016e55845347b6fc069a Source-Link: https://github.com/googleapis/googleapis-gen/commit/65d8904f406c935390d1ab3a2df9d39cda3d2f24 Copy-Tag: eyJwIjoiamF2YS1jb21wdXRlLy5Pd2xCb3QueWFtbCIsImgiOiI2NWQ4OTA0ZjQwNmM5MzUzOTBkMWFiM2EyZGY5ZDM5Y2RhM2QyZjI0In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-compute/README.md | 14 +- .../cloud/compute/v1/NodeGroupsClient.java | 153 + .../cloud/compute/v1/NodeGroupsSettings.java | 25 + .../cloud/compute/v1/gapic_metadata.json | 3 + .../v1/stub/HttpJsonNodeGroupsStub.java | 94 + .../cloud/compute/v1/stub/NodeGroupsStub.java | 12 + .../v1/stub/NodeGroupsStubSettings.java | 78 + .../compute/v1/NodeGroupsClientTest.java | 81 + .../com/google/cloud/compute/v1/Compute.java | 23705 ++++++++-------- .../cloud/compute/v1/GuestOsFeature.java | 6 + .../v1/HealthStatusForNetworkEndpoint.java | 80 +- ...GroupsSimulateMaintenanceEventRequest.java | 738 + ...ulateMaintenanceEventRequestOrBuilder.java | 76 + ...ulateMaintenanceEventNodeGroupRequest.java | 1572 + ...tenanceEventNodeGroupRequestOrBuilder.java | 188 + .../google/cloud/compute/v1/compute.proto | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../v1/acceleratortypes/get/AsyncGet.java | 50 + .../v1/acceleratortypes/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/acceleratortypes/list/AsyncList.java | 57 + .../acceleratortypes/list/AsyncListPaged.java | 64 + .../v1/acceleratortypes/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../acceleratortypessettings/get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/addresses/delete/AsyncDelete.java | 51 + .../v1/addresses/delete/AsyncDeleteLRO.java | 52 + .../v1/addresses/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../compute/v1/addresses/get/AsyncGet.java | 50 + .../compute/v1/addresses/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/addresses/insert/AsyncInsert.java | 52 + .../v1/addresses/insert/AsyncInsertLRO.java | 53 + .../v1/addresses/insert/SyncInsert.java | 49 + .../insert/SyncInsertStringStringAddress.java | 44 + .../compute/v1/addresses/list/AsyncList.java | 56 + .../v1/addresses/list/AsyncListPaged.java | 64 + .../compute/v1/addresses/list/SyncList.java | 53 + .../addresses/list/SyncListStringString.java | 44 + .../addresses/setlabels/AsyncSetLabels.java | 53 + .../setlabels/AsyncSetLabelsLRO.java | 54 + .../v1/addresses/setlabels/SyncSetLabels.java | 50 + ...ingStringStringRegionsetlabelsrequest.java | 49 + .../v1/addressessettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/autoscalers/delete/AsyncDelete.java | 51 + .../v1/autoscalers/delete/AsyncDeleteLRO.java | 52 + .../v1/autoscalers/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../compute/v1/autoscalers/get/AsyncGet.java | 50 + .../compute/v1/autoscalers/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/autoscalers/insert/AsyncInsert.java | 52 + .../v1/autoscalers/insert/AsyncInsertLRO.java | 53 + .../v1/autoscalers/insert/SyncInsert.java | 49 + .../SyncInsertStringStringAutoscaler.java | 44 + .../v1/autoscalers/list/AsyncList.java | 56 + .../v1/autoscalers/list/AsyncListPaged.java | 64 + .../compute/v1/autoscalers/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../v1/autoscalers/patch/AsyncPatch.java | 53 + .../v1/autoscalers/patch/AsyncPatchLRO.java | 54 + .../v1/autoscalers/patch/SyncPatch.java | 50 + .../SyncPatchStringStringAutoscaler.java | 44 + .../v1/autoscalers/update/AsyncUpdate.java | 53 + .../v1/autoscalers/update/AsyncUpdateLRO.java | 54 + .../v1/autoscalers/update/SyncUpdate.java | 50 + .../SyncUpdateStringStringAutoscaler.java | 44 + .../v1/autoscalerssettings/get/SyncGet.java | 48 + .../addsignedurlkey/AsyncAddSignedUrlKey.java | 53 + .../AsyncAddSignedUrlKeyLRO.java | 53 + .../addsignedurlkey/SyncAddSignedUrlKey.java | 49 + ...dSignedUrlKeyStringStringSignedurlkey.java | 47 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/backendbuckets/delete/AsyncDelete.java | 50 + .../backendbuckets/delete/AsyncDeleteLRO.java | 51 + .../v1/backendbuckets/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../AsyncDeleteSignedUrlKey.java | 52 + .../AsyncDeleteSignedUrlKeyLRO.java | 52 + .../SyncDeleteSignedUrlKey.java | 48 + ...cDeleteSignedUrlKeyStringStringString.java | 44 + .../v1/backendbuckets/get/AsyncGet.java | 49 + .../v1/backendbuckets/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../v1/backendbuckets/insert/AsyncInsert.java | 51 + .../backendbuckets/insert/AsyncInsertLRO.java | 52 + .../v1/backendbuckets/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringBackendbucket.java | 43 + .../v1/backendbuckets/list/AsyncList.java | 56 + .../backendbuckets/list/AsyncListPaged.java | 63 + .../v1/backendbuckets/list/SyncList.java | 52 + .../backendbuckets/list/SyncListString.java | 43 + .../v1/backendbuckets/patch/AsyncPatch.java | 52 + .../backendbuckets/patch/AsyncPatchLRO.java | 53 + .../v1/backendbuckets/patch/SyncPatch.java | 49 + .../SyncPatchStringStringBackendbucket.java | 45 + .../AsyncSetEdgeSecurityPolicy.java | 53 + .../AsyncSetEdgeSecurityPolicyLRO.java | 53 + .../SyncSetEdgeSecurityPolicy.java | 49 + ...cyStringStringSecuritypolicyreference.java | 49 + .../v1/backendbuckets/update/AsyncUpdate.java | 52 + .../backendbuckets/update/AsyncUpdateLRO.java | 53 + .../v1/backendbuckets/update/SyncUpdate.java | 49 + .../SyncUpdateStringStringBackendbucket.java | 45 + .../backendbucketssettings/get/SyncGet.java | 49 + .../addsignedurlkey/AsyncAddSignedUrlKey.java | 53 + .../AsyncAddSignedUrlKeyLRO.java | 53 + .../addsignedurlkey/SyncAddSignedUrlKey.java | 49 + ...dSignedUrlKeyStringStringSignedurlkey.java | 47 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../backendservices/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../v1/backendservices/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../AsyncDeleteSignedUrlKey.java | 52 + .../AsyncDeleteSignedUrlKeyLRO.java | 52 + .../SyncDeleteSignedUrlKey.java | 48 + ...cDeleteSignedUrlKeyStringStringString.java | 44 + .../v1/backendservices/get/AsyncGet.java | 49 + .../v1/backendservices/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../gethealth/AsyncGetHealth.java | 52 + .../gethealth/SyncGetHealth.java | 48 + ...lthStringStringResourcegroupreference.java | 46 + .../getiampolicy/AsyncGetIamPolicy.java | 50 + .../getiampolicy/SyncGetIamPolicy.java | 47 + .../SyncGetIamPolicyStringString.java | 42 + .../backendservices/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../v1/backendservices/insert/SyncInsert.java | 48 + .../SyncInsertStringBackendservice.java | 43 + .../v1/backendservices/list/AsyncList.java | 56 + .../backendservices/list/AsyncListPaged.java | 63 + .../v1/backendservices/list/SyncList.java | 52 + .../backendservices/list/SyncListString.java | 43 + .../v1/backendservices/patch/AsyncPatch.java | 52 + .../backendservices/patch/AsyncPatchLRO.java | 53 + .../v1/backendservices/patch/SyncPatch.java | 49 + .../SyncPatchStringStringBackendservice.java | 45 + .../AsyncSetEdgeSecurityPolicy.java | 53 + .../AsyncSetEdgeSecurityPolicyLRO.java | 53 + .../SyncSetEdgeSecurityPolicy.java | 49 + ...cyStringStringSecuritypolicyreference.java | 49 + .../setiampolicy/AsyncSetIamPolicy.java | 51 + .../setiampolicy/SyncSetIamPolicy.java | 48 + ...icyStringStringGlobalsetpolicyrequest.java | 46 + .../AsyncSetSecurityPolicy.java | 53 + .../AsyncSetSecurityPolicyLRO.java | 53 + .../SyncSetSecurityPolicy.java | 49 + ...cyStringStringSecuritypolicyreference.java | 48 + .../backendservices/update/AsyncUpdate.java | 52 + .../update/AsyncUpdateLRO.java | 53 + .../v1/backendservices/update/SyncUpdate.java | 49 + .../SyncUpdateStringStringBackendservice.java | 45 + .../backendservicessettings/get/SyncGet.java | 49 + .../AsyncAddResourcePolicies.java | 54 + .../AsyncAddResourcePoliciesLRO.java | 55 + .../SyncAddResourcePolicies.java | 51 + ...StringDisksaddresourcepoliciesrequest.java | 51 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../disks/create/SyncCreateSetEndpoint.java | 40 + .../createsnapshot/AsyncCreateSnapshot.java | 54 + .../AsyncCreateSnapshotLRO.java | 55 + .../createsnapshot/SyncCreateSnapshot.java | 51 + ...ateSnapshotStringStringStringSnapshot.java | 46 + .../compute/v1/disks/delete/AsyncDelete.java | 51 + .../v1/disks/delete/AsyncDeleteLRO.java | 52 + .../compute/v1/disks/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../cloud/compute/v1/disks/get/AsyncGet.java | 50 + .../cloud/compute/v1/disks/get/SyncGet.java | 47 + .../disks/get/SyncGetStringStringString.java | 43 + .../disks/getiampolicy/AsyncGetIamPolicy.java | 51 + .../disks/getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../compute/v1/disks/insert/AsyncInsert.java | 53 + .../v1/disks/insert/AsyncInsertLRO.java | 54 + .../compute/v1/disks/insert/SyncInsert.java | 50 + .../insert/SyncInsertStringStringDisk.java | 44 + .../compute/v1/disks/list/AsyncList.java | 56 + .../compute/v1/disks/list/AsyncListPaged.java | 64 + .../cloud/compute/v1/disks/list/SyncList.java | 53 + .../v1/disks/list/SyncListStringString.java | 44 + .../AsyncRemoveResourcePolicies.java | 55 + .../AsyncRemoveResourcePoliciesLRO.java | 55 + .../SyncRemoveResourcePolicies.java | 51 + ...ingDisksremoveresourcepoliciesrequest.java | 52 + .../compute/v1/disks/resize/AsyncResize.java | 53 + .../v1/disks/resize/AsyncResizeLRO.java | 54 + .../compute/v1/disks/resize/SyncResize.java | 50 + ...eStringStringStringDisksresizerequest.java | 46 + .../disks/setiampolicy/AsyncSetIamPolicy.java | 52 + .../disks/setiampolicy/SyncSetIamPolicy.java | 49 + ...tringStringStringZonesetpolicyrequest.java | 46 + .../v1/disks/setlabels/AsyncSetLabels.java | 53 + .../v1/disks/setlabels/AsyncSetLabelsLRO.java | 54 + .../v1/disks/setlabels/SyncSetLabels.java | 50 + ...tringStringStringZonesetlabelsrequest.java | 46 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 48 + .../compute/v1/disks/update/AsyncUpdate.java | 55 + .../v1/disks/update/AsyncUpdateLRO.java | 56 + .../compute/v1/disks/update/SyncUpdate.java | 52 + .../SyncUpdateStringStringStringDisk.java | 45 + .../compute/v1/diskssettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../compute/v1/disktypes/get/AsyncGet.java | 50 + .../compute/v1/disktypes/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../compute/v1/disktypes/list/AsyncList.java | 56 + .../v1/disktypes/list/AsyncListPaged.java | 64 + .../compute/v1/disktypes/list/SyncList.java | 53 + .../disktypes/list/SyncListStringString.java | 44 + .../v1/disktypessettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/externalvpngateways/get/AsyncGet.java | 50 + .../v1/externalvpngateways/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../insert/SyncInsert.java | 48 + .../SyncInsertStringExternalvpngateway.java | 44 + .../externalvpngateways/list/AsyncList.java | 56 + .../list/AsyncListPaged.java | 63 + .../v1/externalvpngateways/list/SyncList.java | 52 + .../list/SyncListString.java | 43 + .../setlabels/AsyncSetLabels.java | 52 + .../setlabels/AsyncSetLabelsLRO.java | 52 + .../setlabels/SyncSetLabels.java | 48 + ...elsStringStringGlobalsetlabelsrequest.java | 48 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + ...onsStringStringTestpermissionsrequest.java | 47 + .../get/SyncGet.java | 50 + .../addassociation/AsyncAddAssociation.java | 53 + .../AsyncAddAssociationLRO.java | 53 + .../addassociation/SyncAddAssociation.java | 49 + ...iationStringFirewallpolicyassociation.java | 47 + .../addrule/AsyncAddRule.java | 51 + .../addrule/AsyncAddRuleLRO.java | 52 + .../firewallpolicies/addrule/SyncAddRule.java | 48 + .../SyncAddRuleStringFirewallpolicyrule.java | 44 + .../clonerules/AsyncCloneRules.java | 50 + .../clonerules/AsyncCloneRulesLRO.java | 51 + .../clonerules/SyncCloneRules.java | 47 + .../clonerules/SyncCloneRulesString.java | 41 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../firewallpolicies/delete/AsyncDelete.java | 49 + .../delete/AsyncDeleteLRO.java | 50 + .../firewallpolicies/delete/SyncDelete.java | 46 + .../delete/SyncDeleteString.java | 41 + .../v1/firewallpolicies/get/AsyncGet.java | 48 + .../v1/firewallpolicies/get/SyncGet.java | 45 + .../firewallpolicies/get/SyncGetString.java | 41 + .../getassociation/AsyncGetAssociation.java | 50 + .../getassociation/SyncGetAssociation.java | 46 + .../SyncGetAssociationString.java | 41 + .../getiampolicy/AsyncGetIamPolicy.java | 49 + .../getiampolicy/SyncGetIamPolicy.java | 46 + .../getiampolicy/SyncGetIamPolicyString.java | 41 + .../getrule/AsyncGetRule.java | 50 + .../firewallpolicies/getrule/SyncGetRule.java | 46 + .../getrule/SyncGetRuleString.java | 41 + .../firewallpolicies/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../firewallpolicies/insert/SyncInsert.java | 48 + .../SyncInsertStringFirewallpolicy.java | 44 + .../v1/firewallpolicies/list/AsyncList.java | 56 + .../firewallpolicies/list/AsyncListPaged.java | 63 + .../v1/firewallpolicies/list/SyncList.java | 52 + .../firewallpolicies/list/SyncListNoargs.java | 42 + .../AsyncListAssociations.java | 49 + .../SyncListAssociations.java | 46 + .../SyncListAssociationsNoargs.java | 40 + .../v1/firewallpolicies/move/AsyncMove.java | 50 + .../firewallpolicies/move/AsyncMoveLRO.java | 51 + .../v1/firewallpolicies/move/SyncMove.java | 47 + .../move/SyncMoveStringString.java | 42 + .../v1/firewallpolicies/patch/AsyncPatch.java | 51 + .../firewallpolicies/patch/AsyncPatchLRO.java | 52 + .../v1/firewallpolicies/patch/SyncPatch.java | 48 + .../patch/SyncPatchStringFirewallpolicy.java | 44 + .../patchrule/AsyncPatchRule.java | 52 + .../patchrule/AsyncPatchRuleLRO.java | 53 + .../patchrule/SyncPatchRule.java | 49 + ...SyncPatchRuleStringFirewallpolicyrule.java | 44 + .../AsyncRemoveAssociation.java | 51 + .../AsyncRemoveAssociationLRO.java | 51 + .../SyncRemoveAssociation.java | 47 + .../SyncRemoveAssociationString.java | 41 + .../removerule/AsyncRemoveRule.java | 50 + .../removerule/AsyncRemoveRuleLRO.java | 51 + .../removerule/SyncRemoveRule.java | 47 + .../removerule/SyncRemoveRuleString.java | 41 + .../setiampolicy/AsyncSetIamPolicy.java | 51 + .../setiampolicy/SyncSetIamPolicy.java | 48 + ...ingGlobalorganizationsetpolicyrequest.java | 45 + .../AsyncTestIamPermissions.java | 51 + .../SyncTestIamPermissions.java | 47 + ...rmissionsStringTestpermissionsrequest.java | 45 + .../firewallpoliciessettings/get/SyncGet.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/firewalls/delete/AsyncDelete.java | 50 + .../v1/firewalls/delete/AsyncDeleteLRO.java | 51 + .../v1/firewalls/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../compute/v1/firewalls/get/AsyncGet.java | 49 + .../compute/v1/firewalls/get/SyncGet.java | 46 + .../v1/firewalls/get/SyncGetStringString.java | 42 + .../v1/firewalls/insert/AsyncInsert.java | 51 + .../v1/firewalls/insert/AsyncInsertLRO.java | 52 + .../v1/firewalls/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringFirewall.java | 43 + .../compute/v1/firewalls/list/AsyncList.java | 55 + .../v1/firewalls/list/AsyncListPaged.java | 63 + .../compute/v1/firewalls/list/SyncList.java | 52 + .../v1/firewalls/list/SyncListString.java | 43 + .../v1/firewalls/patch/AsyncPatch.java | 52 + .../v1/firewalls/patch/AsyncPatchLRO.java | 53 + .../compute/v1/firewalls/patch/SyncPatch.java | 49 + .../patch/SyncPatchStringStringFirewall.java | 44 + .../v1/firewalls/update/AsyncUpdate.java | 52 + .../v1/firewalls/update/AsyncUpdateLRO.java | 53 + .../v1/firewalls/update/SyncUpdate.java | 49 + .../SyncUpdateStringStringFirewall.java | 44 + .../v1/firewallssettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../forwardingrules/delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../v1/forwardingrules/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/forwardingrules/get/AsyncGet.java | 50 + .../v1/forwardingrules/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../forwardingrules/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../v1/forwardingrules/insert/SyncInsert.java | 49 + .../SyncInsertStringStringForwardingrule.java | 45 + .../v1/forwardingrules/list/AsyncList.java | 57 + .../forwardingrules/list/AsyncListPaged.java | 64 + .../v1/forwardingrules/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../v1/forwardingrules/patch/AsyncPatch.java | 53 + .../forwardingrules/patch/AsyncPatchLRO.java | 54 + .../v1/forwardingrules/patch/SyncPatch.java | 50 + ...PatchStringStringStringForwardingrule.java | 48 + .../setlabels/AsyncSetLabels.java | 53 + .../setlabels/AsyncSetLabelsLRO.java | 54 + .../setlabels/SyncSetLabels.java | 50 + ...ingStringStringRegionsetlabelsrequest.java | 49 + .../settarget/AsyncSetTarget.java | 53 + .../settarget/AsyncSetTargetLRO.java | 54 + .../settarget/SyncSetTarget.java | 50 + ...rgetStringStringStringTargetreference.java | 48 + .../forwardingrulessettings/get/SyncGet.java | 49 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../globaladdresses/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../v1/globaladdresses/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/globaladdresses/get/AsyncGet.java | 49 + .../v1/globaladdresses/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../globaladdresses/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../v1/globaladdresses/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringAddress.java | 43 + .../v1/globaladdresses/list/AsyncList.java | 55 + .../globaladdresses/list/AsyncListPaged.java | 63 + .../v1/globaladdresses/list/SyncList.java | 52 + .../globaladdresses/list/SyncListString.java | 43 + .../setlabels/AsyncSetLabels.java | 51 + .../setlabels/AsyncSetLabelsLRO.java | 52 + .../setlabels/SyncSetLabels.java | 48 + ...elsStringStringGlobalsetlabelsrequest.java | 48 + .../globaladdressessettings/get/SyncGet.java | 49 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 52 + .../delete/AsyncDeleteLRO.java | 52 + .../delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringString.java | 43 + .../globalforwardingrules/get/AsyncGet.java | 51 + .../v1/globalforwardingrules/get/SyncGet.java | 47 + .../get/SyncGetStringString.java | 43 + .../insert/AsyncInsert.java | 53 + .../insert/AsyncInsertLRO.java | 53 + .../insert/SyncInsert.java | 49 + .../SyncInsertStringForwardingrule.java | 45 + .../globalforwardingrules/list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../globalforwardingrules/list/SyncList.java | 53 + .../list/SyncListString.java | 44 + .../patch/AsyncPatch.java | 53 + .../patch/AsyncPatchLRO.java | 54 + .../patch/SyncPatch.java | 50 + .../SyncPatchStringStringForwardingrule.java | 48 + .../setlabels/AsyncSetLabels.java | 53 + .../setlabels/AsyncSetLabelsLRO.java | 53 + .../setlabels/SyncSetLabels.java | 49 + ...elsStringStringGlobalsetlabelsrequest.java | 49 + .../settarget/AsyncSetTarget.java | 54 + .../settarget/AsyncSetTargetLRO.java | 54 + .../settarget/SyncSetTarget.java | 50 + ...cSetTargetStringStringTargetreference.java | 48 + .../get/SyncGet.java | 50 + .../AsyncAttachNetworkEndpoints.java | 55 + .../AsyncAttachNetworkEndpointsLRO.java | 57 + .../SyncAttachNetworkEndpoints.java | 52 + ...kendpointgroupsattachendpointsrequest.java | 56 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 52 + .../delete/AsyncDeleteLRO.java | 52 + .../delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringString.java | 44 + .../AsyncDetachNetworkEndpoints.java | 55 + .../AsyncDetachNetworkEndpointsLRO.java | 57 + .../SyncDetachNetworkEndpoints.java | 52 + ...kendpointgroupsdetachendpointsrequest.java | 56 + .../get/AsyncGet.java | 51 + .../get/SyncGet.java | 47 + .../get/SyncGetStringString.java | 44 + .../insert/AsyncInsert.java | 53 + .../insert/AsyncInsertLRO.java | 53 + .../insert/SyncInsert.java | 49 + .../SyncInsertStringNetworkendpointgroup.java | 47 + .../list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 65 + .../list/SyncList.java | 54 + .../list/SyncListString.java | 45 + .../AsyncListNetworkEndpoints.java | 58 + .../AsyncListNetworkEndpointsPaged.java | 66 + .../SyncListNetworkEndpoints.java | 55 + .../SyncListNetworkEndpointsStringString.java | 48 + .../get/SyncGet.java | 50 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../globaloperations/delete/AsyncDelete.java | 50 + .../globaloperations/delete/SyncDelete.java | 46 + .../delete/SyncDeleteStringString.java | 42 + .../v1/globaloperations/get/AsyncGet.java | 49 + .../v1/globaloperations/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../v1/globaloperations/list/AsyncList.java | 55 + .../globaloperations/list/AsyncListPaged.java | 63 + .../v1/globaloperations/list/SyncList.java | 52 + .../globaloperations/list/SyncListString.java | 43 + .../v1/globaloperations/wait/AsyncWait.java | 49 + .../v1/globaloperations/wait/SyncWait.java | 46 + .../wait/SyncWaitStringString.java | 42 + .../delete/SyncDelete.java | 49 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 51 + .../delete/SyncDelete.java | 48 + .../delete/SyncDeleteString.java | 43 + .../get/AsyncGet.java | 51 + .../get/SyncGet.java | 47 + .../get/SyncGetString.java | 42 + .../list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../list/SyncList.java | 53 + .../list/SyncListNoargs.java | 43 + .../delete/SyncDelete.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 52 + .../delete/AsyncDeleteLRO.java | 52 + .../delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringString.java | 44 + .../get/AsyncGet.java | 51 + .../get/SyncGet.java | 47 + .../get/SyncGetStringString.java | 44 + .../insert/AsyncInsert.java | 53 + .../insert/AsyncInsertLRO.java | 53 + .../insert/SyncInsert.java | 49 + ...SyncInsertStringPublicdelegatedprefix.java | 48 + .../list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 65 + .../list/SyncList.java | 54 + .../list/SyncListString.java | 45 + .../patch/AsyncPatch.java | 54 + .../patch/AsyncPatchLRO.java | 54 + .../patch/SyncPatch.java | 50 + ...atchStringStringPublicdelegatedprefix.java | 49 + .../get/SyncGet.java | 50 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/healthchecks/delete/AsyncDelete.java | 50 + .../healthchecks/delete/AsyncDeleteLRO.java | 51 + .../v1/healthchecks/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../compute/v1/healthchecks/get/AsyncGet.java | 49 + .../compute/v1/healthchecks/get/SyncGet.java | 46 + .../healthchecks/get/SyncGetStringString.java | 42 + .../v1/healthchecks/insert/AsyncInsert.java | 51 + .../healthchecks/insert/AsyncInsertLRO.java | 52 + .../v1/healthchecks/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringHealthcheck.java | 43 + .../v1/healthchecks/list/AsyncList.java | 55 + .../v1/healthchecks/list/AsyncListPaged.java | 63 + .../v1/healthchecks/list/SyncList.java | 52 + .../v1/healthchecks/list/SyncListString.java | 43 + .../v1/healthchecks/patch/AsyncPatch.java | 52 + .../v1/healthchecks/patch/AsyncPatchLRO.java | 53 + .../v1/healthchecks/patch/SyncPatch.java | 49 + .../SyncPatchStringStringHealthcheck.java | 45 + .../v1/healthchecks/update/AsyncUpdate.java | 52 + .../healthchecks/update/AsyncUpdateLRO.java | 53 + .../v1/healthchecks/update/SyncUpdate.java | 49 + .../SyncUpdateStringStringHealthcheck.java | 45 + .../v1/healthcheckssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../v1/imagefamilyviews/get/AsyncGet.java | 50 + .../v1/imagefamilyviews/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../imagefamilyviewssettings/get/SyncGet.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../images/create/SyncCreateSetEndpoint.java | 40 + .../compute/v1/images/delete/AsyncDelete.java | 50 + .../v1/images/delete/AsyncDeleteLRO.java | 51 + .../compute/v1/images/delete/SyncDelete.java | 47 + .../images/delete/SyncDeleteStringString.java | 42 + .../v1/images/deprecate/AsyncDeprecate.java | 52 + .../images/deprecate/AsyncDeprecateLRO.java | 53 + .../v1/images/deprecate/SyncDeprecate.java | 49 + ...eprecateStringStringDeprecationstatus.java | 45 + .../cloud/compute/v1/images/get/AsyncGet.java | 49 + .../cloud/compute/v1/images/get/SyncGet.java | 46 + .../v1/images/get/SyncGetStringString.java | 42 + .../getfromfamily/AsyncGetFromFamily.java | 49 + .../getfromfamily/SyncGetFromFamily.java | 46 + .../SyncGetFromFamilyStringString.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 50 + .../images/getiampolicy/SyncGetIamPolicy.java | 47 + .../SyncGetIamPolicyStringString.java | 42 + .../compute/v1/images/insert/AsyncInsert.java | 52 + .../v1/images/insert/AsyncInsertLRO.java | 53 + .../compute/v1/images/insert/SyncInsert.java | 49 + .../images/insert/SyncInsertStringImage.java | 43 + .../compute/v1/images/list/AsyncList.java | 55 + .../v1/images/list/AsyncListPaged.java | 63 + .../compute/v1/images/list/SyncList.java | 52 + .../v1/images/list/SyncListString.java | 43 + .../compute/v1/images/patch/AsyncPatch.java | 52 + .../v1/images/patch/AsyncPatchLRO.java | 53 + .../compute/v1/images/patch/SyncPatch.java | 49 + .../patch/SyncPatchStringStringImage.java | 44 + .../setiampolicy/AsyncSetIamPolicy.java | 51 + .../images/setiampolicy/SyncSetIamPolicy.java | 48 + ...icyStringStringGlobalsetpolicyrequest.java | 46 + .../v1/images/setlabels/AsyncSetLabels.java | 51 + .../images/setlabels/AsyncSetLabelsLRO.java | 52 + .../v1/images/setlabels/SyncSetLabels.java | 48 + ...elsStringStringGlobalsetlabelsrequest.java | 46 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + ...onsStringStringTestpermissionsrequest.java | 46 + .../v1/imagessettings/get/SyncGet.java | 48 + .../AsyncAbandonInstances.java | 56 + .../AsyncAbandonInstancesLRO.java | 56 + .../SyncAbandonInstances.java | 52 + ...egroupmanagersabandoninstancesrequest.java | 57 + .../aggregatedlist/AsyncAggregatedList.java | 59 + .../AsyncAggregatedListPaged.java | 67 + .../aggregatedlist/SyncAggregatedList.java | 56 + .../SyncAggregatedListString.java | 46 + .../AsyncApplyUpdatesToInstances.java | 55 + .../AsyncApplyUpdatesToInstancesLRO.java | 57 + .../SyncApplyUpdatesToInstances.java | 51 + ...tancegroupmanagersapplyupdatesrequest.java | 56 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../createinstances/AsyncCreateInstances.java | 56 + .../AsyncCreateInstancesLRO.java | 56 + .../createinstances/SyncCreateInstances.java | 52 + ...cegroupmanagerscreateinstancesrequest.java | 57 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../deleteinstances/AsyncDeleteInstances.java | 56 + .../AsyncDeleteInstancesLRO.java | 56 + .../deleteinstances/SyncDeleteInstances.java | 52 + ...cegroupmanagersdeleteinstancesrequest.java | 57 + .../AsyncDeletePerInstanceConfigs.java | 55 + .../AsyncDeletePerInstanceConfigsLRO.java | 57 + .../SyncDeletePerInstanceConfigs.java | 51 + ...upmanagersdeleteperinstanceconfigsreq.java | 58 + .../instancegroupmanagers/get/AsyncGet.java | 52 + .../v1/instancegroupmanagers/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...nsertStringStringInstancegroupmanager.java | 48 + .../instancegroupmanagers/list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../instancegroupmanagers/list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../listerrors/AsyncListErrors.java | 59 + .../listerrors/AsyncListErrorsPaged.java | 67 + .../listerrors/SyncListErrors.java | 56 + .../SyncListErrorsStringStringString.java | 49 + .../AsyncListManagedInstances.java | 59 + .../AsyncListManagedInstancesPaged.java | 67 + .../SyncListManagedInstances.java | 56 + ...istManagedInstancesStringStringString.java | 49 + .../AsyncListPerInstanceConfigs.java | 59 + .../AsyncListPerInstanceConfigsPaged.java | 67 + .../SyncListPerInstanceConfigs.java | 56 + ...tPerInstanceConfigsStringStringString.java | 49 + .../patch/AsyncPatch.java | 54 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...tringStringStringInstancegroupmanager.java | 49 + .../AsyncPatchPerInstanceConfigs.java | 56 + .../AsyncPatchPerInstanceConfigsLRO.java | 58 + .../SyncPatchPerInstanceConfigs.java | 52 + ...oupmanagerspatchperinstanceconfigsreq.java | 58 + .../AsyncRecreateInstances.java | 56 + .../AsyncRecreateInstancesLRO.java | 56 + .../SyncRecreateInstances.java | 52 + ...groupmanagersrecreateinstancesrequest.java | 57 + .../resize/AsyncResize.java | 54 + .../resize/AsyncResizeLRO.java | 54 + .../resize/SyncResize.java | 50 + .../SyncResizeStringStringStringInt.java | 46 + .../AsyncSetInstanceTemplate.java | 56 + .../AsyncSetInstanceTemplateLRO.java | 56 + .../SyncSetInstanceTemplate.java | 52 + ...oupmanagerssetinstancetemplaterequest.java | 58 + .../settargetpools/AsyncSetTargetPools.java | 56 + .../AsyncSetTargetPoolsLRO.java | 56 + .../settargetpools/SyncSetTargetPools.java | 52 + ...ncegroupmanagerssettargetpoolsrequest.java | 57 + .../AsyncUpdatePerInstanceConfigs.java | 56 + .../AsyncUpdatePerInstanceConfigsLRO.java | 58 + .../SyncUpdatePerInstanceConfigs.java | 52 + ...upmanagersupdateperinstanceconfigsreq.java | 58 + .../get/SyncGet.java | 50 + .../addinstances/AsyncAddInstances.java | 54 + .../addinstances/AsyncAddInstancesLRO.java | 55 + .../addinstances/SyncAddInstances.java | 51 + ...ringInstancegroupsaddinstancesrequest.java | 51 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/instancegroups/delete/AsyncDelete.java | 51 + .../instancegroups/delete/AsyncDeleteLRO.java | 52 + .../v1/instancegroups/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/instancegroups/get/AsyncGet.java | 50 + .../v1/instancegroups/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/instancegroups/insert/AsyncInsert.java | 52 + .../instancegroups/insert/AsyncInsertLRO.java | 53 + .../v1/instancegroups/insert/SyncInsert.java | 49 + .../SyncInsertStringStringInstancegroup.java | 45 + .../v1/instancegroups/list/AsyncList.java | 57 + .../instancegroups/list/AsyncListPaged.java | 64 + .../v1/instancegroups/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../listinstances/AsyncListInstances.java | 61 + .../AsyncListInstancesPaged.java | 69 + .../listinstances/SyncListInstances.java | 58 + ...ingInstancegroupslistinstancesrequest.java | 53 + .../removeinstances/AsyncRemoveInstances.java | 55 + .../AsyncRemoveInstancesLRO.java | 55 + .../removeinstances/SyncRemoveInstances.java | 51 + ...gInstancegroupsremoveinstancesrequest.java | 51 + .../setnamedports/AsyncSetNamedPorts.java | 55 + .../setnamedports/AsyncSetNamedPortsLRO.java | 55 + .../setnamedports/SyncSetNamedPorts.java | 51 + ...ingInstancegroupssetnamedportsrequest.java | 51 + .../instancegroupssettings/get/SyncGet.java | 49 + .../addaccessconfig/AsyncAddAccessConfig.java | 54 + .../AsyncAddAccessConfigLRO.java | 55 + .../addaccessconfig/SyncAddAccessConfig.java | 51 + ...gStringStringStringStringAccessconfig.java | 49 + .../AsyncAddResourcePolicies.java | 55 + .../AsyncAddResourcePoliciesLRO.java | 55 + .../SyncAddResourcePolicies.java | 51 + ...ngInstancesaddresourcepoliciesrequest.java | 51 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../instances/attachdisk/AsyncAttachDisk.java | 54 + .../attachdisk/AsyncAttachDiskLRO.java | 55 + .../instances/attachdisk/SyncAttachDisk.java | 51 + ...achDiskStringStringStringAttacheddisk.java | 46 + .../instances/bulkinsert/AsyncBulkInsert.java | 53 + .../bulkinsert/AsyncBulkInsertLRO.java | 54 + .../instances/bulkinsert/SyncBulkInsert.java | 50 + ...tringStringBulkinsertinstanceresource.java | 46 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/instances/delete/AsyncDelete.java | 51 + .../v1/instances/delete/AsyncDeleteLRO.java | 52 + .../v1/instances/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../AsyncDeleteAccessConfig.java | 54 + .../AsyncDeleteAccessConfigLRO.java | 54 + .../SyncDeleteAccessConfig.java | 50 + ...sConfigStringStringStringStringString.java | 48 + .../instances/detachdisk/AsyncDetachDisk.java | 52 + .../detachdisk/AsyncDetachDiskLRO.java | 53 + .../instances/detachdisk/SyncDetachDisk.java | 49 + ...yncDetachDiskStringStringStringString.java | 45 + .../compute/v1/instances/get/AsyncGet.java | 50 + .../compute/v1/instances/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../AsyncGetEffectiveFirewalls.java | 52 + .../SyncGetEffectiveFirewalls.java | 49 + ...tiveFirewallsStringStringStringString.java | 45 + .../AsyncGetGuestAttributes.java | 53 + .../SyncGetGuestAttributes.java | 49 + ...cGetGuestAttributesStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../getscreenshot/AsyncGetScreenshot.java | 50 + .../getscreenshot/SyncGetScreenshot.java | 47 + .../SyncGetScreenshotStringStringString.java | 43 + .../AsyncGetSerialPortOutput.java | 53 + .../SyncGetSerialPortOutput.java | 49 + ...GetSerialPortOutputStringStringString.java | 43 + .../AsyncGetShieldedInstanceIdentity.java | 51 + .../SyncGetShieldedInstanceIdentity.java | 47 + ...dedInstanceIdentityStringStringString.java | 44 + .../v1/instances/insert/AsyncInsert.java | 54 + .../v1/instances/insert/AsyncInsertLRO.java | 55 + .../v1/instances/insert/SyncInsert.java | 51 + .../SyncInsertStringStringInstance.java | 44 + .../compute/v1/instances/list/AsyncList.java | 56 + .../v1/instances/list/AsyncListPaged.java | 64 + .../compute/v1/instances/list/SyncList.java | 53 + .../instances/list/SyncListStringString.java | 44 + .../listreferrers/AsyncListReferrers.java | 58 + .../AsyncListReferrersPaged.java | 65 + .../listreferrers/SyncListReferrers.java | 54 + .../SyncListReferrersStringStringString.java | 46 + .../AsyncRemoveResourcePolicies.java | 55 + .../AsyncRemoveResourcePoliciesLRO.java | 55 + .../SyncRemoveResourcePolicies.java | 51 + ...nstancesremoveresourcepoliciesrequest.java | 52 + .../v1/instances/reset/AsyncReset.java | 51 + .../v1/instances/reset/AsyncResetLRO.java | 52 + .../compute/v1/instances/reset/SyncReset.java | 48 + .../reset/SyncResetStringStringString.java | 43 + .../v1/instances/resume/AsyncResume.java | 51 + .../v1/instances/resume/AsyncResumeLRO.java | 52 + .../v1/instances/resume/SyncResume.java | 48 + .../resume/SyncResumeStringStringString.java | 43 + .../AsyncSendDiagnosticInterrupt.java | 51 + .../SyncSendDiagnosticInterrupt.java | 48 + ...DiagnosticInterruptStringStringString.java | 44 + .../AsyncSetDeletionProtection.java | 53 + .../AsyncSetDeletionProtectionLRO.java | 53 + .../SyncSetDeletionProtection.java | 49 + ...tDeletionProtectionStringStringString.java | 44 + .../AsyncSetDiskAutoDelete.java | 53 + .../AsyncSetDiskAutoDeleteLRO.java | 54 + .../SyncSetDiskAutoDelete.java | 50 + ...DeleteStringStringStringBooleanString.java | 48 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...tringStringStringZonesetpolicyrequest.java | 46 + .../instances/setlabels/AsyncSetLabels.java | 53 + .../setlabels/AsyncSetLabelsLRO.java | 54 + .../v1/instances/setlabels/SyncSetLabels.java | 50 + ...StringStringInstancessetlabelsrequest.java | 49 + .../AsyncSetMachineResources.java | 55 + .../AsyncSetMachineResourcesLRO.java | 55 + .../SyncSetMachineResources.java | 51 + ...ngInstancessetmachineresourcesrequest.java | 51 + .../setmachinetype/AsyncSetMachineType.java | 54 + .../AsyncSetMachineTypeLRO.java | 55 + .../setmachinetype/SyncSetMachineType.java | 51 + ...gStringInstancessetmachinetyperequest.java | 50 + .../setmetadata/AsyncSetMetadata.java | 53 + .../setmetadata/AsyncSetMetadataLRO.java | 54 + .../setmetadata/SyncSetMetadata.java | 50 + ...SetMetadataStringStringStringMetadata.java | 46 + .../AsyncSetMinCpuPlatform.java | 54 + .../AsyncSetMinCpuPlatformLRO.java | 55 + .../SyncSetMinCpuPlatform.java | 51 + ...ringInstancessetmincpuplatformrequest.java | 51 + .../v1/instances/setname/AsyncSetName.java | 53 + .../v1/instances/setname/AsyncSetNameLRO.java | 54 + .../v1/instances/setname/SyncSetName.java | 50 + ...ngStringStringInstancessetnamerequest.java | 49 + .../setscheduling/AsyncSetScheduling.java | 53 + .../setscheduling/AsyncSetSchedulingLRO.java | 54 + .../setscheduling/SyncSetScheduling.java | 50 + ...chedulingStringStringStringScheduling.java | 46 + .../AsyncSetServiceAccount.java | 54 + .../AsyncSetServiceAccountLRO.java | 55 + .../SyncSetServiceAccount.java | 51 + ...ringInstancessetserviceaccountrequest.java | 51 + ...yncSetShieldedInstanceIntegrityPolicy.java | 55 + ...SetShieldedInstanceIntegrityPolicyLRO.java | 55 + ...yncSetShieldedInstanceIntegrityPolicy.java | 51 + ...StringShieldedinstanceintegritypolicy.java | 53 + .../v1/instances/settags/AsyncSetTags.java | 53 + .../v1/instances/settags/AsyncSetTagsLRO.java | 54 + .../v1/instances/settags/SyncSetTags.java | 50 + .../SyncSetTagsStringStringStringTags.java | 46 + .../AsyncSimulateMaintenanceEvent.java | 51 + .../AsyncSimulateMaintenanceEventLRO.java | 51 + .../SyncSimulateMaintenanceEvent.java | 47 + ...ateMaintenanceEventStringStringString.java | 44 + .../v1/instances/start/AsyncStart.java | 51 + .../v1/instances/start/AsyncStartLRO.java | 52 + .../compute/v1/instances/start/SyncStart.java | 48 + .../start/SyncStartStringStringString.java | 43 + .../AsyncStartWithEncryptionKey.java | 55 + .../AsyncStartWithEncryptionKeyLRO.java | 55 + .../SyncStartWithEncryptionKey.java | 51 + ...nstancesstartwithencryptionkeyrequest.java | 52 + .../compute/v1/instances/stop/AsyncStop.java | 52 + .../v1/instances/stop/AsyncStopLRO.java | 53 + .../compute/v1/instances/stop/SyncStop.java | 49 + .../stop/SyncStopStringStringString.java | 43 + .../v1/instances/suspend/AsyncSuspend.java | 52 + .../v1/instances/suspend/AsyncSuspendLRO.java | 53 + .../v1/instances/suspend/SyncSuspend.java | 49 + .../SyncSuspendStringStringString.java | 43 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../v1/instances/update/AsyncUpdate.java | 55 + .../v1/instances/update/AsyncUpdateLRO.java | 56 + .../v1/instances/update/SyncUpdate.java | 52 + .../SyncUpdateStringStringStringInstance.java | 46 + .../AsyncUpdateAccessConfig.java | 55 + .../AsyncUpdateAccessConfigLRO.java | 55 + .../SyncUpdateAccessConfig.java | 51 + ...gStringStringStringStringAccessconfig.java | 50 + .../AsyncUpdateDisplayDevice.java | 54 + .../AsyncUpdateDisplayDeviceLRO.java | 54 + .../SyncUpdateDisplayDevice.java | 50 + ...DeviceStringStringStringDisplaydevice.java | 48 + .../AsyncUpdateNetworkInterface.java | 55 + .../AsyncUpdateNetworkInterfaceLRO.java | 55 + .../SyncUpdateNetworkInterface.java | 51 + ...ingStringStringStringNetworkinterface.java | 51 + .../AsyncUpdateShieldedInstanceConfig.java | 54 + .../AsyncUpdateShieldedInstanceConfigLRO.java | 54 + .../SyncUpdateShieldedInstanceConfig.java | 50 + ...ingStringStringShieldedinstanceconfig.java | 51 + .../v1/instancessettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../instancetemplates/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../instancetemplates/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/instancetemplates/get/AsyncGet.java | 50 + .../v1/instancetemplates/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 50 + .../getiampolicy/SyncGetIamPolicy.java | 47 + .../SyncGetIamPolicyStringString.java | 42 + .../instancetemplates/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../instancetemplates/insert/SyncInsert.java | 48 + .../SyncInsertStringInstancetemplate.java | 44 + .../v1/instancetemplates/list/AsyncList.java | 56 + .../list/AsyncListPaged.java | 63 + .../v1/instancetemplates/list/SyncList.java | 52 + .../list/SyncListString.java | 43 + .../setiampolicy/AsyncSetIamPolicy.java | 51 + .../setiampolicy/SyncSetIamPolicy.java | 48 + ...icyStringStringGlobalsetpolicyrequest.java | 46 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + ...onsStringStringTestpermissionsrequest.java | 47 + .../get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 60 + .../AsyncAggregatedListPaged.java | 68 + .../aggregatedlist/SyncAggregatedList.java | 56 + .../SyncAggregatedListString.java | 46 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../interconnectattachments/get/AsyncGet.java | 52 + .../interconnectattachments/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 55 + .../insert/AsyncInsertLRO.java | 55 + .../insert/SyncInsert.java | 51 + ...ertStringStringInterconnectattachment.java | 49 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../list/SyncList.java | 55 + .../list/SyncListStringString.java | 46 + .../patch/AsyncPatch.java | 55 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...ingStringStringInterconnectattachment.java | 50 + .../setlabels/AsyncSetLabels.java | 55 + .../setlabels/AsyncSetLabelsLRO.java | 55 + .../setlabels/SyncSetLabels.java | 51 + ...ingStringStringRegionsetlabelsrequest.java | 50 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../interconnectlocations/get/AsyncGet.java | 51 + .../v1/interconnectlocations/get/SyncGet.java | 47 + .../get/SyncGetStringString.java | 44 + .../interconnectlocations/list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 65 + .../interconnectlocations/list/SyncList.java | 53 + .../list/SyncListString.java | 44 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/interconnects/delete/AsyncDelete.java | 50 + .../interconnects/delete/AsyncDeleteLRO.java | 51 + .../v1/interconnects/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/interconnects/get/AsyncGet.java | 49 + .../compute/v1/interconnects/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../getdiagnostics/AsyncGetDiagnostics.java | 50 + .../getdiagnostics/SyncGetDiagnostics.java | 46 + .../SyncGetDiagnosticsStringString.java | 43 + .../v1/interconnects/insert/AsyncInsert.java | 51 + .../interconnects/insert/AsyncInsertLRO.java | 52 + .../v1/interconnects/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringInterconnect.java | 43 + .../v1/interconnects/list/AsyncList.java | 55 + .../v1/interconnects/list/AsyncListPaged.java | 63 + .../v1/interconnects/list/SyncList.java | 52 + .../v1/interconnects/list/SyncListString.java | 43 + .../v1/interconnects/patch/AsyncPatch.java | 52 + .../v1/interconnects/patch/AsyncPatchLRO.java | 53 + .../v1/interconnects/patch/SyncPatch.java | 49 + .../SyncPatchStringStringInterconnect.java | 45 + .../setlabels/AsyncSetLabels.java | 51 + .../setlabels/AsyncSetLabelsLRO.java | 52 + .../setlabels/SyncSetLabels.java | 48 + ...elsStringStringGlobalsetlabelsrequest.java | 48 + .../v1/interconnectssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../compute/v1/licensecodes/get/AsyncGet.java | 49 + .../compute/v1/licensecodes/get/SyncGet.java | 46 + .../licensecodes/get/SyncGetStringString.java | 42 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + ...onsStringStringTestpermissionsrequest.java | 46 + .../v1/licensecodessettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/licenses/delete/AsyncDelete.java | 50 + .../v1/licenses/delete/AsyncDeleteLRO.java | 51 + .../v1/licenses/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../compute/v1/licenses/get/AsyncGet.java | 49 + .../compute/v1/licenses/get/SyncGet.java | 46 + .../v1/licenses/get/SyncGetStringString.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 50 + .../getiampolicy/SyncGetIamPolicy.java | 47 + .../SyncGetIamPolicyStringString.java | 42 + .../v1/licenses/insert/AsyncInsert.java | 51 + .../v1/licenses/insert/AsyncInsertLRO.java | 52 + .../v1/licenses/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringLicense.java | 43 + .../compute/v1/licenses/list/AsyncList.java | 55 + .../v1/licenses/list/AsyncListPaged.java | 63 + .../compute/v1/licenses/list/SyncList.java | 52 + .../v1/licenses/list/SyncListString.java | 43 + .../setiampolicy/AsyncSetIamPolicy.java | 51 + .../setiampolicy/SyncSetIamPolicy.java | 48 + ...icyStringStringGlobalsetpolicyrequest.java | 46 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + ...onsStringStringTestpermissionsrequest.java | 46 + .../v1/licensessettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/machineimages/delete/AsyncDelete.java | 50 + .../machineimages/delete/AsyncDeleteLRO.java | 51 + .../v1/machineimages/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/machineimages/get/AsyncGet.java | 49 + .../compute/v1/machineimages/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 50 + .../getiampolicy/SyncGetIamPolicy.java | 47 + .../SyncGetIamPolicyStringString.java | 42 + .../v1/machineimages/insert/AsyncInsert.java | 52 + .../machineimages/insert/AsyncInsertLRO.java | 53 + .../v1/machineimages/insert/SyncInsert.java | 49 + .../insert/SyncInsertStringMachineimage.java | 43 + .../v1/machineimages/list/AsyncList.java | 55 + .../v1/machineimages/list/AsyncListPaged.java | 63 + .../v1/machineimages/list/SyncList.java | 52 + .../v1/machineimages/list/SyncListString.java | 43 + .../setiampolicy/AsyncSetIamPolicy.java | 51 + .../setiampolicy/SyncSetIamPolicy.java | 48 + ...icyStringStringGlobalsetpolicyrequest.java | 46 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + ...onsStringStringTestpermissionsrequest.java | 46 + .../v1/machineimagessettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../compute/v1/machinetypes/get/AsyncGet.java | 50 + .../compute/v1/machinetypes/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/machinetypes/list/AsyncList.java | 56 + .../v1/machinetypes/list/AsyncListPaged.java | 64 + .../v1/machinetypes/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../v1/machinetypessettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../networkattachments/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 44 + .../v1/networkattachments/get/AsyncGet.java | 51 + .../v1/networkattachments/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 52 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../networkattachments/insert/SyncInsert.java | 49 + ...ncInsertStringStringNetworkattachment.java | 45 + .../v1/networkattachments/list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../v1/networkattachments/list/SyncList.java | 53 + .../list/SyncListStringString.java | 45 + .../setiampolicy/AsyncSetIamPolicy.java | 53 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...ingStringStringRegionsetpolicyrequest.java | 48 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../get/SyncGet.java | 50 + .../aggregatedlist/AsyncAggregatedList.java | 60 + .../AsyncAggregatedListPaged.java | 68 + .../aggregatedlist/SyncAggregatedList.java | 56 + .../SyncAggregatedListString.java | 46 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 47 + .../get/AsyncGet.java | 52 + .../get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 56 + .../insert/AsyncInsertLRO.java | 56 + .../insert/SyncInsert.java | 52 + ...tringStringNetworkedgesecurityservice.java | 49 + .../patch/AsyncPatch.java | 58 + .../patch/AsyncPatchLRO.java | 58 + .../patch/SyncPatch.java | 54 + ...tringStringNetworkedgesecurityservice.java | 51 + .../get/SyncGet.java | 50 + .../aggregatedlist/AsyncAggregatedList.java | 59 + .../AsyncAggregatedListPaged.java | 67 + .../aggregatedlist/SyncAggregatedList.java | 56 + .../SyncAggregatedListString.java | 46 + .../AsyncAttachNetworkEndpoints.java | 56 + .../AsyncAttachNetworkEndpointsLRO.java | 56 + .../SyncAttachNetworkEndpoints.java | 52 + ...kendpointgroupsattachendpointsrequest.java | 58 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../AsyncDetachNetworkEndpoints.java | 56 + .../AsyncDetachNetworkEndpointsLRO.java | 56 + .../SyncDetachNetworkEndpoints.java | 52 + ...kendpointgroupsdetachendpointsrequest.java | 58 + .../networkendpointgroups/get/AsyncGet.java | 52 + .../v1/networkendpointgroups/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...nsertStringStringNetworkendpointgroup.java | 48 + .../networkendpointgroups/list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../networkendpointgroups/list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../AsyncListNetworkEndpoints.java | 62 + .../AsyncListNetworkEndpointsPaged.java | 70 + .../SyncListNetworkEndpoints.java | 59 + ...orkendpointgroupslistendpointsrequest.java | 58 + .../AsyncTestIamPermissions.java | 54 + .../SyncTestIamPermissions.java | 50 + ...ingStringStringTestpermissionsrequest.java | 50 + .../get/SyncGet.java | 50 + .../addassociation/AsyncAddAssociation.java | 55 + .../AsyncAddAssociationLRO.java | 55 + .../addassociation/SyncAddAssociation.java | 51 + ...StringStringFirewallpolicyassociation.java | 49 + .../addrule/AsyncAddRule.java | 56 + .../addrule/AsyncAddRuleLRO.java | 56 + .../addrule/SyncAddRule.java | 52 + ...AddRuleStringStringFirewallpolicyrule.java | 48 + .../clonerules/AsyncCloneRules.java | 53 + .../clonerules/AsyncCloneRulesLRO.java | 53 + .../clonerules/SyncCloneRules.java | 49 + .../SyncCloneRulesStringString.java | 44 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 52 + .../delete/AsyncDeleteLRO.java | 52 + .../delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringString.java | 43 + .../networkfirewallpolicies/get/AsyncGet.java | 51 + .../networkfirewallpolicies/get/SyncGet.java | 47 + .../get/SyncGetStringString.java | 43 + .../getassociation/AsyncGetAssociation.java | 52 + .../getassociation/SyncGetAssociation.java | 48 + .../SyncGetAssociationStringString.java | 44 + .../getiampolicy/AsyncGetIamPolicy.java | 52 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringString.java | 43 + .../getrule/AsyncGetRule.java | 52 + .../getrule/SyncGetRule.java | 48 + .../getrule/SyncGetRuleStringString.java | 43 + .../insert/AsyncInsert.java | 53 + .../insert/AsyncInsertLRO.java | 53 + .../insert/SyncInsert.java | 49 + .../SyncInsertStringFirewallpolicy.java | 45 + .../list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../list/SyncList.java | 53 + .../list/SyncListString.java | 44 + .../patch/AsyncPatch.java | 54 + .../patch/AsyncPatchLRO.java | 54 + .../patch/SyncPatch.java | 50 + .../SyncPatchStringStringFirewallpolicy.java | 48 + .../patchrule/AsyncPatchRule.java | 55 + .../patchrule/AsyncPatchRuleLRO.java | 55 + .../patchrule/SyncPatchRule.java | 51 + ...tchRuleStringStringFirewallpolicyrule.java | 48 + .../AsyncRemoveAssociation.java | 53 + .../AsyncRemoveAssociationLRO.java | 53 + .../SyncRemoveAssociation.java | 49 + .../SyncRemoveAssociationStringString.java | 44 + .../removerule/AsyncRemoveRule.java | 53 + .../removerule/AsyncRemoveRuleLRO.java | 53 + .../removerule/SyncRemoveRule.java | 49 + .../SyncRemoveRuleStringString.java | 44 + .../setiampolicy/AsyncSetIamPolicy.java | 53 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...icyStringStringGlobalsetpolicyrequest.java | 48 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...onsStringStringTestpermissionsrequest.java | 48 + .../get/SyncGet.java | 50 + .../networks/addpeering/AsyncAddPeering.java | 52 + .../addpeering/AsyncAddPeeringLRO.java | 53 + .../networks/addpeering/SyncAddPeering.java | 49 + ...StringStringNetworksaddpeeringrequest.java | 46 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/networks/delete/AsyncDelete.java | 50 + .../v1/networks/delete/AsyncDeleteLRO.java | 51 + .../v1/networks/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../compute/v1/networks/get/AsyncGet.java | 49 + .../compute/v1/networks/get/SyncGet.java | 46 + .../v1/networks/get/SyncGetStringString.java | 42 + .../AsyncGetEffectiveFirewalls.java | 50 + .../SyncGetEffectiveFirewalls.java | 47 + ...SyncGetEffectiveFirewallsStringString.java | 43 + .../v1/networks/insert/AsyncInsert.java | 51 + .../v1/networks/insert/AsyncInsertLRO.java | 52 + .../v1/networks/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringNetwork.java | 43 + .../compute/v1/networks/list/AsyncList.java | 55 + .../v1/networks/list/AsyncListPaged.java | 63 + .../compute/v1/networks/list/SyncList.java | 52 + .../v1/networks/list/SyncListString.java | 43 + .../AsyncListPeeringRoutes.java | 60 + .../AsyncListPeeringRoutesPaged.java | 68 + .../SyncListPeeringRoutes.java | 56 + .../SyncListPeeringRoutesStringString.java | 45 + .../compute/v1/networks/patch/AsyncPatch.java | 52 + .../v1/networks/patch/AsyncPatchLRO.java | 53 + .../compute/v1/networks/patch/SyncPatch.java | 49 + .../patch/SyncPatchStringStringNetwork.java | 44 + .../removepeering/AsyncRemovePeering.java | 53 + .../removepeering/AsyncRemovePeeringLRO.java | 54 + .../removepeering/SyncRemovePeering.java | 50 + ...ingStringNetworksremovepeeringrequest.java | 48 + .../AsyncSwitchToCustomMode.java | 50 + .../AsyncSwitchToCustomModeLRO.java | 51 + .../SyncSwitchToCustomMode.java | 47 + .../SyncSwitchToCustomModeStringString.java | 42 + .../updatepeering/AsyncUpdatePeering.java | 53 + .../updatepeering/AsyncUpdatePeeringLRO.java | 54 + .../updatepeering/SyncUpdatePeering.java | 50 + ...ingStringNetworksupdatepeeringrequest.java | 48 + .../v1/networkssettings/get/SyncGet.java | 48 + .../v1/nodegroups/addnodes/AsyncAddNodes.java | 53 + .../nodegroups/addnodes/AsyncAddNodesLRO.java | 54 + .../v1/nodegroups/addnodes/SyncAddNodes.java | 50 + ...StringStringNodegroupsaddnodesrequest.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/nodegroups/delete/AsyncDelete.java | 51 + .../v1/nodegroups/delete/AsyncDeleteLRO.java | 52 + .../v1/nodegroups/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../deletenodes/AsyncDeleteNodes.java | 54 + .../deletenodes/AsyncDeleteNodesLRO.java | 55 + .../deletenodes/SyncDeleteNodes.java | 51 + ...ingStringNodegroupsdeletenodesrequest.java | 50 + .../compute/v1/nodegroups/get/AsyncGet.java | 50 + .../compute/v1/nodegroups/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../v1/nodegroups/insert/AsyncInsert.java | 53 + .../v1/nodegroups/insert/AsyncInsertLRO.java | 54 + .../v1/nodegroups/insert/SyncInsert.java | 50 + .../SyncInsertStringStringIntNodegroup.java | 46 + .../compute/v1/nodegroups/list/AsyncList.java | 56 + .../v1/nodegroups/list/AsyncListPaged.java | 64 + .../compute/v1/nodegroups/list/SyncList.java | 53 + .../nodegroups/list/SyncListStringString.java | 44 + .../nodegroups/listnodes/AsyncListNodes.java | 58 + .../listnodes/AsyncListNodesPaged.java | 65 + .../nodegroups/listnodes/SyncListNodes.java | 54 + .../SyncListNodesStringStringString.java | 46 + .../v1/nodegroups/patch/AsyncPatch.java | 53 + .../v1/nodegroups/patch/AsyncPatchLRO.java | 54 + .../v1/nodegroups/patch/SyncPatch.java | 50 + .../SyncPatchStringStringStringNodegroup.java | 46 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...tringStringStringZonesetpolicyrequest.java | 46 + .../setnodetemplate/AsyncSetNodeTemplate.java | 54 + .../AsyncSetNodeTemplateLRO.java | 55 + .../setnodetemplate/SyncSetNodeTemplate.java | 51 + ...tringNodegroupssetnodetemplaterequest.java | 51 + .../AsyncSimulateMaintenanceEvent.java | 55 + .../AsyncSimulateMaintenanceEventLRO.java | 55 + .../SyncSimulateMaintenanceEvent.java | 51 + ...groupssimulatemaintenanceeventrequest.java | 53 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../v1/nodegroupssettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/nodetemplates/delete/AsyncDelete.java | 51 + .../nodetemplates/delete/AsyncDeleteLRO.java | 52 + .../v1/nodetemplates/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/nodetemplates/get/AsyncGet.java | 50 + .../compute/v1/nodetemplates/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../v1/nodetemplates/insert/AsyncInsert.java | 52 + .../nodetemplates/insert/AsyncInsertLRO.java | 53 + .../v1/nodetemplates/insert/SyncInsert.java | 49 + .../SyncInsertStringStringNodetemplate.java | 45 + .../v1/nodetemplates/list/AsyncList.java | 56 + .../v1/nodetemplates/list/AsyncListPaged.java | 64 + .../v1/nodetemplates/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...ingStringStringRegionsetpolicyrequest.java | 48 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../v1/nodetemplatessettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../compute/v1/nodetypes/get/AsyncGet.java | 50 + .../compute/v1/nodetypes/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../compute/v1/nodetypes/list/AsyncList.java | 56 + .../v1/nodetypes/list/AsyncListPaged.java | 64 + .../compute/v1/nodetypes/list/SyncList.java | 53 + .../nodetypes/list/SyncListStringString.java | 44 + .../v1/nodetypessettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../packetmirrorings/delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../packetmirrorings/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 44 + .../v1/packetmirrorings/get/AsyncGet.java | 50 + .../v1/packetmirrorings/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../packetmirrorings/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../packetmirrorings/insert/SyncInsert.java | 49 + ...SyncInsertStringStringPacketmirroring.java | 45 + .../v1/packetmirrorings/list/AsyncList.java | 57 + .../packetmirrorings/list/AsyncListPaged.java | 64 + .../v1/packetmirrorings/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../v1/packetmirrorings/patch/AsyncPatch.java | 53 + .../packetmirrorings/patch/AsyncPatchLRO.java | 54 + .../v1/packetmirrorings/patch/SyncPatch.java | 50 + ...atchStringStringStringPacketmirroring.java | 48 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../packetmirroringssettings/get/SyncGet.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../disablexpnhost/AsyncDisableXpnHost.java | 49 + .../AsyncDisableXpnHostLRO.java | 50 + .../disablexpnhost/SyncDisableXpnHost.java | 46 + .../SyncDisableXpnHostString.java | 41 + .../AsyncDisableXpnResource.java | 52 + .../AsyncDisableXpnResourceLRO.java | 53 + .../SyncDisableXpnResource.java | 49 + ...ringProjectsdisablexpnresourcerequest.java | 48 + .../enablexpnhost/AsyncEnableXpnHost.java | 49 + .../enablexpnhost/AsyncEnableXpnHostLRO.java | 50 + .../enablexpnhost/SyncEnableXpnHost.java | 46 + .../SyncEnableXpnHostString.java | 41 + .../AsyncEnableXpnResource.java | 52 + .../AsyncEnableXpnResourceLRO.java | 53 + .../SyncEnableXpnResource.java | 49 + ...tringProjectsenablexpnresourcerequest.java | 48 + .../compute/v1/projects/get/AsyncGet.java | 46 + .../compute/v1/projects/get/SyncGet.java | 43 + .../v1/projects/get/SyncGetString.java | 41 + .../projects/getxpnhost/AsyncGetXpnHost.java | 46 + .../projects/getxpnhost/SyncGetXpnHost.java | 43 + .../getxpnhost/SyncGetXpnHostString.java | 41 + .../getxpnresources/AsyncGetXpnResources.java | 56 + .../AsyncGetXpnResourcesPaged.java | 63 + .../getxpnresources/SyncGetXpnResources.java | 52 + .../SyncGetXpnResourcesString.java | 43 + .../listxpnhosts/AsyncListXpnHosts.java | 58 + .../listxpnhosts/AsyncListXpnHostsPaged.java | 66 + .../listxpnhosts/SyncListXpnHosts.java | 55 + ...ostsStringProjectslistxpnhostsrequest.java | 47 + .../v1/projects/movedisk/AsyncMoveDisk.java | 51 + .../projects/movedisk/AsyncMoveDiskLRO.java | 52 + .../v1/projects/movedisk/SyncMoveDisk.java | 48 + .../SyncMoveDiskStringDiskmoverequest.java | 43 + .../moveinstance/AsyncMoveInstance.java | 51 + .../moveinstance/AsyncMoveInstanceLRO.java | 52 + .../moveinstance/SyncMoveInstance.java | 48 + ...MoveInstanceStringInstancemoverequest.java | 44 + .../AsyncSetCommonInstanceMetadata.java | 52 + .../AsyncSetCommonInstanceMetadataLRO.java | 52 + .../SyncSetCommonInstanceMetadata.java | 48 + ...tCommonInstanceMetadataStringMetadata.java | 44 + .../AsyncSetDefaultNetworkTier.java | 53 + .../AsyncSetDefaultNetworkTierLRO.java | 53 + .../SyncSetDefaultNetworkTier.java | 49 + ...gProjectssetdefaultnetworktierrequest.java | 48 + .../AsyncSetUsageExportBucket.java | 52 + .../AsyncSetUsageExportBucketLRO.java | 52 + .../SyncSetUsageExportBucket.java | 48 + ...ExportBucketStringUsageexportlocation.java | 44 + .../v1/projectssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 52 + .../delete/AsyncDeleteLRO.java | 52 + .../delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringString.java | 44 + .../get/AsyncGet.java | 51 + .../publicadvertisedprefixes/get/SyncGet.java | 47 + .../get/SyncGetStringString.java | 44 + .../insert/AsyncInsert.java | 53 + .../insert/AsyncInsertLRO.java | 53 + .../insert/SyncInsert.java | 49 + ...yncInsertStringPublicadvertisedprefix.java | 46 + .../list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 65 + .../list/SyncList.java | 54 + .../list/SyncListString.java | 45 + .../patch/AsyncPatch.java | 54 + .../patch/AsyncPatchLRO.java | 54 + .../patch/SyncPatch.java | 50 + ...tchStringStringPublicadvertisedprefix.java | 49 + .../get/SyncGet.java | 50 + .../aggregatedlist/AsyncAggregatedList.java | 60 + .../AsyncAggregatedListPaged.java | 68 + .../aggregatedlist/SyncAggregatedList.java | 56 + .../SyncAggregatedListString.java | 46 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../publicdelegatedprefixes/get/AsyncGet.java | 52 + .../publicdelegatedprefixes/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...sertStringStringPublicdelegatedprefix.java | 49 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../list/SyncList.java | 55 + .../list/SyncListStringString.java | 46 + .../patch/AsyncPatch.java | 55 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...ringStringStringPublicdelegatedprefix.java | 50 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../regionautoscalers/delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../regionautoscalers/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/regionautoscalers/get/AsyncGet.java | 50 + .../v1/regionautoscalers/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../regionautoscalers/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../regionautoscalers/insert/SyncInsert.java | 49 + .../SyncInsertStringStringAutoscaler.java | 45 + .../v1/regionautoscalers/list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../v1/regionautoscalers/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../regionautoscalers/patch/AsyncPatch.java | 53 + .../patch/AsyncPatchLRO.java | 54 + .../v1/regionautoscalers/patch/SyncPatch.java | 50 + .../SyncPatchStringStringAutoscaler.java | 45 + .../regionautoscalers/update/AsyncUpdate.java | 53 + .../update/AsyncUpdateLRO.java | 54 + .../regionautoscalers/update/SyncUpdate.java | 50 + .../SyncUpdateStringStringAutoscaler.java | 45 + .../get/SyncGet.java | 49 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../regionbackendservices/get/AsyncGet.java | 52 + .../v1/regionbackendservices/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 44 + .../gethealth/AsyncGetHealth.java | 54 + .../gethealth/SyncGetHealth.java | 50 + ...ingStringStringResourcegroupreference.java | 49 + .../getiampolicy/AsyncGetIamPolicy.java | 53 + .../getiampolicy/SyncGetIamPolicy.java | 49 + .../SyncGetIamPolicyStringStringString.java | 44 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + .../SyncInsertStringStringBackendservice.java | 46 + .../regionbackendservices/list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 65 + .../regionbackendservices/list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../patch/AsyncPatch.java | 54 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...PatchStringStringStringBackendservice.java | 49 + .../setiampolicy/AsyncSetIamPolicy.java | 54 + .../setiampolicy/SyncSetIamPolicy.java | 50 + ...ingStringStringRegionsetpolicyrequest.java | 49 + .../update/AsyncUpdate.java | 55 + .../update/AsyncUpdateLRO.java | 55 + .../update/SyncUpdate.java | 51 + ...pdateStringStringStringBackendservice.java | 49 + .../get/SyncGet.java | 50 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../v1/regioncommitments/get/AsyncGet.java | 50 + .../v1/regioncommitments/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../regioncommitments/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../regioncommitments/insert/SyncInsert.java | 49 + .../SyncInsertStringStringCommitment.java | 45 + .../v1/regioncommitments/list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../v1/regioncommitments/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../regioncommitments/update/AsyncUpdate.java | 55 + .../update/AsyncUpdateLRO.java | 56 + .../regioncommitments/update/SyncUpdate.java | 52 + ...yncUpdateStringStringStringCommitment.java | 48 + .../get/SyncGet.java | 49 + .../AsyncAddResourcePolicies.java | 55 + .../AsyncAddResourcePoliciesLRO.java | 55 + .../SyncAddResourcePolicies.java | 51 + ...Regiondisksaddresourcepoliciesrequest.java | 52 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../createsnapshot/AsyncCreateSnapshot.java | 53 + .../AsyncCreateSnapshotLRO.java | 54 + .../createsnapshot/SyncCreateSnapshot.java | 50 + ...ateSnapshotStringStringStringSnapshot.java | 46 + .../v1/regiondisks/delete/AsyncDelete.java | 51 + .../v1/regiondisks/delete/AsyncDeleteLRO.java | 52 + .../v1/regiondisks/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../compute/v1/regiondisks/get/AsyncGet.java | 50 + .../compute/v1/regiondisks/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../v1/regiondisks/insert/AsyncInsert.java | 53 + .../v1/regiondisks/insert/AsyncInsertLRO.java | 54 + .../v1/regiondisks/insert/SyncInsert.java | 50 + .../insert/SyncInsertStringStringDisk.java | 44 + .../v1/regiondisks/list/AsyncList.java | 56 + .../v1/regiondisks/list/AsyncListPaged.java | 64 + .../compute/v1/regiondisks/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../AsyncRemoveResourcePolicies.java | 55 + .../AsyncRemoveResourcePoliciesLRO.java | 55 + .../SyncRemoveResourcePolicies.java | 51 + ...iondisksremoveresourcepoliciesrequest.java | 52 + .../v1/regiondisks/resize/AsyncResize.java | 53 + .../v1/regiondisks/resize/AsyncResizeLRO.java | 54 + .../v1/regiondisks/resize/SyncResize.java | 50 + ...gStringStringRegiondisksresizerequest.java | 49 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...ingStringStringRegionsetpolicyrequest.java | 47 + .../regiondisks/setlabels/AsyncSetLabels.java | 53 + .../setlabels/AsyncSetLabelsLRO.java | 54 + .../regiondisks/setlabels/SyncSetLabels.java | 50 + ...ingStringStringRegionsetlabelsrequest.java | 49 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../v1/regiondisks/update/AsyncUpdate.java | 55 + .../v1/regiondisks/update/AsyncUpdateLRO.java | 56 + .../v1/regiondisks/update/SyncUpdate.java | 52 + .../SyncUpdateStringStringStringDisk.java | 45 + .../v1/regiondiskssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../v1/regiondisktypes/get/AsyncGet.java | 50 + .../v1/regiondisktypes/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/regiondisktypes/list/AsyncList.java | 56 + .../regiondisktypes/list/AsyncListPaged.java | 64 + .../v1/regiondisktypes/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../regiondisktypessettings/get/SyncGet.java | 49 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../regionhealthchecks/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/regionhealthchecks/get/AsyncGet.java | 50 + .../v1/regionhealthchecks/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../regionhealthchecks/insert/SyncInsert.java | 49 + .../SyncInsertStringStringHealthcheck.java | 45 + .../v1/regionhealthchecks/list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../v1/regionhealthchecks/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../regionhealthchecks/patch/AsyncPatch.java | 53 + .../patch/AsyncPatchLRO.java | 54 + .../regionhealthchecks/patch/SyncPatch.java | 50 + ...yncPatchStringStringStringHealthcheck.java | 48 + .../update/AsyncUpdate.java | 53 + .../update/AsyncUpdateLRO.java | 54 + .../regionhealthchecks/update/SyncUpdate.java | 50 + ...ncUpdateStringStringStringHealthcheck.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../get/AsyncGet.java | 52 + .../get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...cInsertStringStringHealthcheckservice.java | 48 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../list/SyncList.java | 55 + .../list/SyncListStringString.java | 46 + .../patch/AsyncPatch.java | 55 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...hStringStringStringHealthcheckservice.java | 49 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../AsyncAbandonInstances.java | 56 + .../AsyncAbandonInstancesLRO.java | 56 + .../SyncAbandonInstances.java | 52 + ...egroupmanagersabandoninstancesrequest.java | 58 + .../AsyncApplyUpdatesToInstances.java | 55 + .../AsyncApplyUpdatesToInstancesLRO.java | 57 + .../SyncApplyUpdatesToInstances.java | 52 + ...tancegroupmanagersapplyupdatesrequest.java | 58 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../createinstances/AsyncCreateInstances.java | 56 + .../AsyncCreateInstancesLRO.java | 56 + .../createinstances/SyncCreateInstances.java | 52 + ...cegroupmanagerscreateinstancesrequest.java | 58 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 47 + .../deleteinstances/AsyncDeleteInstances.java | 56 + .../AsyncDeleteInstancesLRO.java | 56 + .../deleteinstances/SyncDeleteInstances.java | 52 + ...cegroupmanagersdeleteinstancesrequest.java | 58 + .../AsyncDeletePerInstanceConfigs.java | 55 + .../AsyncDeletePerInstanceConfigsLRO.java | 57 + .../SyncDeletePerInstanceConfigs.java | 52 + ...cegroupmanagerdeleteinstanceconfigreq.java | 58 + .../get/AsyncGet.java | 52 + .../get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...nsertStringStringInstancegroupmanager.java | 48 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../list/SyncList.java | 55 + .../list/SyncListStringString.java | 46 + .../listerrors/AsyncListErrors.java | 59 + .../listerrors/AsyncListErrorsPaged.java | 67 + .../listerrors/SyncListErrors.java | 56 + .../SyncListErrorsStringStringString.java | 49 + .../AsyncListManagedInstances.java | 59 + .../AsyncListManagedInstancesPaged.java | 67 + .../SyncListManagedInstances.java | 56 + ...istManagedInstancesStringStringString.java | 49 + .../AsyncListPerInstanceConfigs.java | 61 + .../AsyncListPerInstanceConfigsPaged.java | 67 + .../SyncListPerInstanceConfigs.java | 56 + ...tPerInstanceConfigsStringStringString.java | 49 + .../patch/AsyncPatch.java | 55 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...tringStringStringInstancegroupmanager.java | 49 + .../AsyncPatchPerInstanceConfigs.java | 56 + .../AsyncPatchPerInstanceConfigsLRO.java | 58 + .../SyncPatchPerInstanceConfigs.java | 53 + ...ncegroupmanagerpatchinstanceconfigreq.java | 58 + .../AsyncRecreateInstances.java | 56 + .../AsyncRecreateInstancesLRO.java | 58 + .../SyncRecreateInstances.java | 52 + ...ninstancegroupmanagersrecreaterequest.java | 57 + .../resize/AsyncResize.java | 54 + .../resize/AsyncResizeLRO.java | 54 + .../resize/SyncResize.java | 50 + .../SyncResizeStringStringStringInt.java | 48 + .../AsyncSetInstanceTemplate.java | 56 + .../AsyncSetInstanceTemplateLRO.java | 58 + .../SyncSetInstanceTemplate.java | 53 + ...stancegroupmanagerssettemplaterequest.java | 58 + .../settargetpools/AsyncSetTargetPools.java | 56 + .../AsyncSetTargetPoolsLRO.java | 56 + .../settargetpools/SyncSetTargetPools.java | 52 + ...ncegroupmanagerssettargetpoolsrequest.java | 57 + .../AsyncUpdatePerInstanceConfigs.java | 56 + .../AsyncUpdatePerInstanceConfigsLRO.java | 58 + .../SyncUpdatePerInstanceConfigs.java | 53 + ...cegroupmanagerupdateinstanceconfigreq.java | 58 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../v1/regioninstancegroups/get/AsyncGet.java | 52 + .../v1/regioninstancegroups/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 44 + .../regioninstancegroups/list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 65 + .../regioninstancegroups/list/SyncList.java | 54 + .../list/SyncListStringString.java | 45 + .../listinstances/AsyncListInstances.java | 62 + .../AsyncListInstancesPaged.java | 70 + .../listinstances/SyncListInstances.java | 59 + ...ioninstancegroupslistinstancesrequest.java | 54 + .../setnamedports/AsyncSetNamedPorts.java | 56 + .../setnamedports/AsyncSetNamedPortsLRO.java | 56 + .../setnamedports/SyncSetNamedPorts.java | 52 + ...ioninstancegroupssetnamedportsrequest.java | 52 + .../get/SyncGet.java | 50 + .../bulkinsert/AsyncBulkInsert.java | 53 + .../bulkinsert/AsyncBulkInsertLRO.java | 54 + .../bulkinsert/SyncBulkInsert.java | 50 + ...tringStringBulkinsertinstanceresource.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../bulkinsert/SyncBulkInsert.java | 49 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../regioninstancetemplates/get/AsyncGet.java | 52 + .../regioninstancetemplates/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...yncInsertStringStringInstancetemplate.java | 48 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 65 + .../list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 47 + .../get/AsyncGet.java | 52 + .../get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...nsertStringStringNetworkendpointgroup.java | 48 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../list/SyncList.java | 55 + .../list/SyncListStringString.java | 46 + .../get/SyncGet.java | 50 + .../addassociation/AsyncAddAssociation.java | 56 + .../AsyncAddAssociationLRO.java | 56 + .../addassociation/SyncAddAssociation.java | 52 + ...StringStringFirewallpolicyassociation.java | 52 + .../addrule/AsyncAddRule.java | 57 + .../addrule/AsyncAddRuleLRO.java | 57 + .../addrule/SyncAddRule.java | 53 + ...eStringStringStringFirewallpolicyrule.java | 49 + .../clonerules/AsyncCloneRules.java | 54 + .../clonerules/AsyncCloneRulesLRO.java | 54 + .../clonerules/SyncCloneRules.java | 50 + .../SyncCloneRulesStringStringString.java | 47 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../get/AsyncGet.java | 52 + .../get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../getassociation/AsyncGetAssociation.java | 53 + .../getassociation/SyncGetAssociation.java | 50 + .../SyncGetAssociationStringStringString.java | 45 + .../AsyncGetEffectiveFirewalls.java | 52 + .../SyncGetEffectiveFirewalls.java | 49 + ...tEffectiveFirewallsStringStringString.java | 45 + .../getiampolicy/AsyncGetIamPolicy.java | 53 + .../getiampolicy/SyncGetIamPolicy.java | 49 + .../SyncGetIamPolicyStringStringString.java | 44 + .../getrule/AsyncGetRule.java | 53 + .../getrule/SyncGetRule.java | 49 + .../SyncGetRuleStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + .../SyncInsertStringStringFirewallpolicy.java | 48 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../list/SyncList.java | 55 + .../list/SyncListStringString.java | 46 + .../patch/AsyncPatch.java | 55 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...PatchStringStringStringFirewallpolicy.java | 49 + .../patchrule/AsyncPatchRule.java | 56 + .../patchrule/AsyncPatchRuleLRO.java | 56 + .../patchrule/SyncPatchRule.java | 52 + ...eStringStringStringFirewallpolicyrule.java | 49 + .../AsyncRemoveAssociation.java | 54 + .../AsyncRemoveAssociationLRO.java | 56 + .../SyncRemoveAssociation.java | 51 + ...ncRemoveAssociationStringStringString.java | 47 + .../removerule/AsyncRemoveRule.java | 54 + .../removerule/AsyncRemoveRuleLRO.java | 54 + .../removerule/SyncRemoveRule.java | 50 + .../SyncRemoveRuleStringStringString.java | 47 + .../setiampolicy/AsyncSetIamPolicy.java | 54 + .../setiampolicy/SyncSetIamPolicy.java | 50 + ...ingStringStringRegionsetpolicyrequest.java | 49 + .../AsyncTestIamPermissions.java | 54 + .../SyncTestIamPermissions.java | 51 + ...ingStringStringTestpermissionsrequest.java | 50 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 47 + .../get/AsyncGet.java | 52 + .../get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...nsertStringStringNotificationendpoint.java | 48 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 66 + .../list/SyncList.java | 55 + .../list/SyncListStringString.java | 46 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../regionoperations/delete/AsyncDelete.java | 51 + .../regionoperations/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringStringString.java | 44 + .../v1/regionoperations/get/AsyncGet.java | 50 + .../v1/regionoperations/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/regionoperations/list/AsyncList.java | 56 + .../regionoperations/list/AsyncListPaged.java | 64 + .../v1/regionoperations/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../v1/regionoperations/wait/AsyncWait.java | 50 + .../v1/regionoperations/wait/SyncWait.java | 47 + .../wait/SyncWaitStringStringString.java | 43 + .../delete/SyncDelete.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../regions/create/SyncCreateSetEndpoint.java | 40 + .../compute/v1/regions/get/AsyncGet.java | 49 + .../cloud/compute/v1/regions/get/SyncGet.java | 46 + .../v1/regions/get/SyncGetStringString.java | 42 + .../compute/v1/regions/list/AsyncList.java | 55 + .../v1/regions/list/AsyncListPaged.java | 63 + .../compute/v1/regions/list/SyncList.java | 52 + .../v1/regions/list/SyncListString.java | 43 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../regionsecuritypolicies/get/AsyncGet.java | 52 + .../regionsecuritypolicies/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 44 + .../insert/AsyncInsert.java | 55 + .../insert/AsyncInsertLRO.java | 55 + .../insert/SyncInsert.java | 51 + .../SyncInsertStringStringSecuritypolicy.java | 46 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 65 + .../regionsecuritypolicies/list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../patch/AsyncPatch.java | 55 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...PatchStringStringStringSecuritypolicy.java | 49 + .../get/SyncGet.java | 50 + .../v1/regionssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../regionsslcertificates/get/AsyncGet.java | 52 + .../v1/regionsslcertificates/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 44 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + .../SyncInsertStringStringSslcertificate.java | 46 + .../regionsslcertificates/list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 65 + .../regionsslcertificates/list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../regionsslpolicies/delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../regionsslpolicies/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/regionsslpolicies/get/AsyncGet.java | 50 + .../v1/regionsslpolicies/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../regionsslpolicies/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../regionsslpolicies/insert/SyncInsert.java | 49 + .../SyncInsertStringStringSslpolicy.java | 45 + .../v1/regionsslpolicies/list/AsyncList.java | 56 + .../list/AsyncListPaged.java | 64 + .../v1/regionsslpolicies/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../AsyncListAvailableFeatures.java | 55 + .../SyncListAvailableFeatures.java | 52 + ...SyncListAvailableFeaturesStringString.java | 43 + .../regionsslpolicies/patch/AsyncPatch.java | 53 + .../patch/AsyncPatchLRO.java | 54 + .../v1/regionsslpolicies/patch/SyncPatch.java | 50 + .../SyncPatchStringStringStringSslpolicy.java | 46 + .../get/SyncGet.java | 49 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../regiontargethttpproxies/get/AsyncGet.java | 52 + .../regiontargethttpproxies/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...SyncInsertStringStringTargethttpproxy.java | 46 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 65 + .../list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../seturlmap/AsyncSetUrlMap.java | 55 + .../seturlmap/AsyncSetUrlMapLRO.java | 55 + .../seturlmap/SyncSetUrlMap.java | 51 + ...lMapStringStringStringUrlmapreference.java | 49 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../get/AsyncGet.java | 52 + .../regiontargethttpsproxies/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 45 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + ...yncInsertStringStringTargethttpsproxy.java | 48 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 65 + .../list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../patch/AsyncPatch.java | 55 + .../patch/AsyncPatchLRO.java | 55 + .../patch/SyncPatch.java | 51 + ...tchStringStringStringTargethttpsproxy.java | 49 + .../AsyncSetSslCertificates.java | 56 + .../AsyncSetSslCertificatesLRO.java | 56 + .../SyncSetSslCertificates.java | 52 + ...httpsproxiessetsslcertificatesrequest.java | 58 + .../seturlmap/AsyncSetUrlMap.java | 55 + .../seturlmap/AsyncSetUrlMapLRO.java | 55 + .../seturlmap/SyncSetUrlMap.java | 51 + ...lMapStringStringStringUrlmapreference.java | 49 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 53 + .../delete/AsyncDeleteLRO.java | 53 + .../delete/SyncDelete.java | 49 + .../delete/SyncDeleteStringStringString.java | 45 + .../regiontargettcpproxies/get/AsyncGet.java | 52 + .../regiontargettcpproxies/get/SyncGet.java | 48 + .../get/SyncGetStringStringString.java | 44 + .../insert/AsyncInsert.java | 54 + .../insert/AsyncInsertLRO.java | 54 + .../insert/SyncInsert.java | 50 + .../SyncInsertStringStringTargettcpproxy.java | 46 + .../list/AsyncList.java | 58 + .../list/AsyncListPaged.java | 65 + .../regiontargettcpproxies/list/SyncList.java | 54 + .../list/SyncListStringString.java | 46 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/regionurlmaps/delete/AsyncDelete.java | 51 + .../regionurlmaps/delete/AsyncDeleteLRO.java | 52 + .../v1/regionurlmaps/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/regionurlmaps/get/AsyncGet.java | 50 + .../compute/v1/regionurlmaps/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/regionurlmaps/insert/AsyncInsert.java | 52 + .../regionurlmaps/insert/AsyncInsertLRO.java | 53 + .../v1/regionurlmaps/insert/SyncInsert.java | 49 + .../insert/SyncInsertStringStringUrlmap.java | 44 + .../v1/regionurlmaps/list/AsyncList.java | 56 + .../v1/regionurlmaps/list/AsyncListPaged.java | 64 + .../v1/regionurlmaps/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../v1/regionurlmaps/patch/AsyncPatch.java | 53 + .../v1/regionurlmaps/patch/AsyncPatchLRO.java | 54 + .../v1/regionurlmaps/patch/SyncPatch.java | 50 + .../SyncPatchStringStringStringUrlmap.java | 46 + .../v1/regionurlmaps/update/AsyncUpdate.java | 53 + .../regionurlmaps/update/AsyncUpdateLRO.java | 54 + .../v1/regionurlmaps/update/SyncUpdate.java | 50 + .../SyncUpdateStringStringStringUrlmap.java | 46 + .../regionurlmaps/validate/AsyncValidate.java | 54 + .../regionurlmaps/validate/SyncValidate.java | 50 + ...ingStringRegionurlmapsvalidaterequest.java | 48 + .../v1/regionurlmapssettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/reservations/delete/AsyncDelete.java | 51 + .../reservations/delete/AsyncDeleteLRO.java | 52 + .../v1/reservations/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../compute/v1/reservations/get/AsyncGet.java | 50 + .../compute/v1/reservations/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../v1/reservations/insert/AsyncInsert.java | 52 + .../reservations/insert/AsyncInsertLRO.java | 53 + .../v1/reservations/insert/SyncInsert.java | 49 + .../SyncInsertStringStringReservation.java | 44 + .../v1/reservations/list/AsyncList.java | 56 + .../v1/reservations/list/AsyncListPaged.java | 64 + .../v1/reservations/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../v1/reservations/resize/AsyncResize.java | 53 + .../reservations/resize/AsyncResizeLRO.java | 54 + .../v1/reservations/resize/SyncResize.java | 50 + ...StringStringReservationsresizerequest.java | 49 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...tringStringStringZonesetpolicyrequest.java | 46 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../v1/reservations/update/AsyncUpdate.java | 55 + .../reservations/update/AsyncUpdateLRO.java | 56 + .../v1/reservations/update/SyncUpdate.java | 52 + ...ncUpdateStringStringStringReservation.java | 46 + .../v1/reservationssettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../resourcepolicies/delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../resourcepolicies/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 44 + .../v1/resourcepolicies/get/AsyncGet.java | 50 + .../v1/resourcepolicies/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../resourcepolicies/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../resourcepolicies/insert/SyncInsert.java | 49 + .../SyncInsertStringStringResourcepolicy.java | 45 + .../v1/resourcepolicies/list/AsyncList.java | 57 + .../resourcepolicies/list/AsyncListPaged.java | 64 + .../v1/resourcepolicies/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...ingStringStringRegionsetpolicyrequest.java | 48 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../resourcepoliciessettings/get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../routers/create/SyncCreateSetEndpoint.java | 40 + .../v1/routers/delete/AsyncDelete.java | 51 + .../v1/routers/delete/AsyncDeleteLRO.java | 52 + .../compute/v1/routers/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../compute/v1/routers/get/AsyncGet.java | 50 + .../cloud/compute/v1/routers/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../AsyncGetNatMappingInfo.java | 58 + .../AsyncGetNatMappingInfoPaged.java | 66 + .../SyncGetNatMappingInfo.java | 54 + ...ncGetNatMappingInfoStringStringString.java | 46 + .../getrouterstatus/AsyncGetRouterStatus.java | 51 + .../getrouterstatus/SyncGetRouterStatus.java | 47 + ...SyncGetRouterStatusStringStringString.java | 43 + .../v1/routers/insert/AsyncInsert.java | 52 + .../v1/routers/insert/AsyncInsertLRO.java | 53 + .../compute/v1/routers/insert/SyncInsert.java | 49 + .../insert/SyncInsertStringStringRouter.java | 44 + .../compute/v1/routers/list/AsyncList.java | 56 + .../v1/routers/list/AsyncListPaged.java | 64 + .../compute/v1/routers/list/SyncList.java | 53 + .../v1/routers/list/SyncListStringString.java | 44 + .../compute/v1/routers/patch/AsyncPatch.java | 53 + .../v1/routers/patch/AsyncPatchLRO.java | 54 + .../compute/v1/routers/patch/SyncPatch.java | 50 + .../SyncPatchStringStringStringRouter.java | 45 + .../v1/routers/preview/AsyncPreview.java | 53 + .../v1/routers/preview/SyncPreview.java | 49 + .../SyncPreviewStringStringStringRouter.java | 46 + .../v1/routers/update/AsyncUpdate.java | 53 + .../v1/routers/update/AsyncUpdateLRO.java | 54 + .../compute/v1/routers/update/SyncUpdate.java | 50 + .../SyncUpdateStringStringStringRouter.java | 45 + .../v1/routerssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 44 + .../routes/create/SyncCreateSetEndpoint.java | 40 + .../compute/v1/routes/delete/AsyncDelete.java | 50 + .../v1/routes/delete/AsyncDeleteLRO.java | 51 + .../compute/v1/routes/delete/SyncDelete.java | 47 + .../routes/delete/SyncDeleteStringString.java | 42 + .../cloud/compute/v1/routes/get/AsyncGet.java | 49 + .../cloud/compute/v1/routes/get/SyncGet.java | 46 + .../v1/routes/get/SyncGetStringString.java | 42 + .../compute/v1/routes/insert/AsyncInsert.java | 51 + .../v1/routes/insert/AsyncInsertLRO.java | 52 + .../compute/v1/routes/insert/SyncInsert.java | 48 + .../routes/insert/SyncInsertStringRoute.java | 43 + .../compute/v1/routes/list/AsyncList.java | 55 + .../v1/routes/list/AsyncListPaged.java | 63 + .../compute/v1/routes/list/SyncList.java | 52 + .../v1/routes/list/SyncListString.java | 43 + .../v1/routessettings/get/SyncGet.java | 48 + .../addrule/AsyncAddRule.java | 52 + .../addrule/AsyncAddRuleLRO.java | 53 + .../securitypolicies/addrule/SyncAddRule.java | 49 + ...AddRuleStringStringSecuritypolicyrule.java | 47 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../securitypolicies/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../securitypolicies/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/securitypolicies/get/AsyncGet.java | 49 + .../v1/securitypolicies/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../getrule/AsyncGetRule.java | 51 + .../securitypolicies/getrule/SyncGetRule.java | 47 + .../getrule/SyncGetRuleStringString.java | 42 + .../securitypolicies/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../securitypolicies/insert/SyncInsert.java | 49 + .../SyncInsertStringSecuritypolicy.java | 44 + .../v1/securitypolicies/list/AsyncList.java | 56 + .../securitypolicies/list/AsyncListPaged.java | 63 + .../v1/securitypolicies/list/SyncList.java | 52 + .../securitypolicies/list/SyncListString.java | 43 + .../AsyncListPreconfiguredExpressionSets.java | 54 + .../SyncListPreconfiguredExpressionSets.java | 51 + ...ListPreconfiguredExpressionSetsString.java | 42 + .../v1/securitypolicies/patch/AsyncPatch.java | 52 + .../securitypolicies/patch/AsyncPatchLRO.java | 53 + .../v1/securitypolicies/patch/SyncPatch.java | 49 + .../SyncPatchStringStringSecuritypolicy.java | 45 + .../patchrule/AsyncPatchRule.java | 53 + .../patchrule/AsyncPatchRuleLRO.java | 54 + .../patchrule/SyncPatchRule.java | 50 + ...tchRuleStringStringSecuritypolicyrule.java | 47 + .../removerule/AsyncRemoveRule.java | 50 + .../removerule/AsyncRemoveRuleLRO.java | 51 + .../removerule/SyncRemoveRule.java | 47 + .../SyncRemoveRuleStringString.java | 42 + .../setlabels/AsyncSetLabels.java | 51 + .../setlabels/AsyncSetLabelsLRO.java | 52 + .../setlabels/SyncSetLabels.java | 48 + ...elsStringStringGlobalsetlabelsrequest.java | 48 + .../securitypoliciessettings/get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../serviceattachments/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 44 + .../v1/serviceattachments/get/AsyncGet.java | 51 + .../v1/serviceattachments/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 52 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../serviceattachments/insert/SyncInsert.java | 49 + ...ncInsertStringStringServiceattachment.java | 45 + .../v1/serviceattachments/list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../v1/serviceattachments/list/SyncList.java | 53 + .../list/SyncListStringString.java | 45 + .../serviceattachments/patch/AsyncPatch.java | 53 + .../patch/AsyncPatchLRO.java | 54 + .../serviceattachments/patch/SyncPatch.java | 50 + ...chStringStringStringServiceattachment.java | 48 + .../setiampolicy/AsyncSetIamPolicy.java | 53 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...ingStringStringRegionsetpolicyrequest.java | 48 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../get/SyncGet.java | 50 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/snapshots/delete/AsyncDelete.java | 50 + .../v1/snapshots/delete/AsyncDeleteLRO.java | 51 + .../v1/snapshots/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../compute/v1/snapshots/get/AsyncGet.java | 49 + .../compute/v1/snapshots/get/SyncGet.java | 46 + .../v1/snapshots/get/SyncGetStringString.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 50 + .../getiampolicy/SyncGetIamPolicy.java | 47 + .../SyncGetIamPolicyStringString.java | 42 + .../v1/snapshots/insert/AsyncInsert.java | 51 + .../v1/snapshots/insert/AsyncInsertLRO.java | 52 + .../v1/snapshots/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringSnapshot.java | 43 + .../compute/v1/snapshots/list/AsyncList.java | 55 + .../v1/snapshots/list/AsyncListPaged.java | 63 + .../compute/v1/snapshots/list/SyncList.java | 52 + .../v1/snapshots/list/SyncListString.java | 43 + .../setiampolicy/AsyncSetIamPolicy.java | 51 + .../setiampolicy/SyncSetIamPolicy.java | 48 + ...icyStringStringGlobalsetpolicyrequest.java | 46 + .../snapshots/setlabels/AsyncSetLabels.java | 51 + .../setlabels/AsyncSetLabelsLRO.java | 52 + .../v1/snapshots/setlabels/SyncSetLabels.java | 48 + ...elsStringStringGlobalsetlabelsrequest.java | 46 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + ...onsStringStringTestpermissionsrequest.java | 46 + .../v1/snapshotssettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../sslcertificates/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../v1/sslcertificates/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/sslcertificates/get/AsyncGet.java | 49 + .../v1/sslcertificates/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../sslcertificates/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../v1/sslcertificates/insert/SyncInsert.java | 48 + .../SyncInsertStringSslcertificate.java | 43 + .../v1/sslcertificates/list/AsyncList.java | 56 + .../sslcertificates/list/AsyncListPaged.java | 63 + .../v1/sslcertificates/list/SyncList.java | 52 + .../sslcertificates/list/SyncListString.java | 43 + .../sslcertificatessettings/get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/sslpolicies/delete/AsyncDelete.java | 50 + .../v1/sslpolicies/delete/AsyncDeleteLRO.java | 51 + .../v1/sslpolicies/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../compute/v1/sslpolicies/get/AsyncGet.java | 49 + .../compute/v1/sslpolicies/get/SyncGet.java | 46 + .../sslpolicies/get/SyncGetStringString.java | 42 + .../v1/sslpolicies/insert/AsyncInsert.java | 51 + .../v1/sslpolicies/insert/AsyncInsertLRO.java | 52 + .../v1/sslpolicies/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringSslpolicy.java | 43 + .../v1/sslpolicies/list/AsyncList.java | 55 + .../v1/sslpolicies/list/AsyncListPaged.java | 63 + .../compute/v1/sslpolicies/list/SyncList.java | 52 + .../v1/sslpolicies/list/SyncListString.java | 43 + .../AsyncListAvailableFeatures.java | 54 + .../SyncListAvailableFeatures.java | 51 + .../SyncListAvailableFeaturesString.java | 42 + .../v1/sslpolicies/patch/AsyncPatch.java | 52 + .../v1/sslpolicies/patch/AsyncPatchLRO.java | 53 + .../v1/sslpolicies/patch/SyncPatch.java | 49 + .../patch/SyncPatchStringStringSslpolicy.java | 45 + .../v1/sslpoliciessettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 49 + .../addressesstubsettings/get/SyncGet.java | 48 + .../autoscalersstubsettings/get/SyncGet.java | 49 + .../get/SyncGet.java | 49 + .../get/SyncGet.java | 49 + .../stub/disksstubsettings/get/SyncGet.java | 48 + .../disktypesstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 49 + .../firewallsstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 49 + .../get/SyncGet.java | 49 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../delete/SyncDelete.java | 49 + .../delete/SyncDelete.java | 50 + .../get/SyncGet.java | 50 + .../healthchecksstubsettings/get/SyncGet.java | 49 + .../get/SyncGet.java | 49 + .../stub/imagesstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 49 + .../instancesstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 49 + .../licensecodesstubsettings/get/SyncGet.java | 49 + .../licensesstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 49 + .../machinetypesstubsettings/get/SyncGet.java | 49 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../networksstubsettings/get/SyncGet.java | 48 + .../nodegroupsstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 49 + .../nodetypesstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 49 + .../projectsstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../regiondisksstubsettings/get/SyncGet.java | 49 + .../get/SyncGet.java | 49 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../bulkinsert/SyncBulkInsert.java | 49 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../delete/SyncDelete.java | 49 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../stub/regionsstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 49 + .../reservationsstubsettings/get/SyncGet.java | 49 + .../get/SyncGet.java | 49 + .../stub/routersstubsettings/get/SyncGet.java | 48 + .../stub/routesstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 49 + .../get/SyncGet.java | 50 + .../snapshotsstubsettings/get/SyncGet.java | 48 + .../get/SyncGet.java | 49 + .../sslpoliciesstubsettings/get/SyncGet.java | 49 + .../subnetworksstubsettings/get/SyncGet.java | 49 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 50 + .../get/SyncGet.java | 49 + .../targetpoolsstubsettings/get/SyncGet.java | 49 + .../get/SyncGet.java | 49 + .../get/SyncGet.java | 49 + .../get/SyncGet.java | 50 + .../stub/urlmapsstubsettings/get/SyncGet.java | 48 + .../vpngatewaysstubsettings/get/SyncGet.java | 49 + .../vpntunnelsstubsettings/get/SyncGet.java | 48 + .../delete/SyncDelete.java | 49 + .../stub/zonesstubsettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/subnetworks/delete/AsyncDelete.java | 51 + .../v1/subnetworks/delete/AsyncDeleteLRO.java | 52 + .../v1/subnetworks/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../AsyncExpandIpCidrRange.java | 55 + .../AsyncExpandIpCidrRangeLRO.java | 55 + .../SyncExpandIpCidrRange.java | 51 + ...ngSubnetworksexpandipcidrrangerequest.java | 51 + .../compute/v1/subnetworks/get/AsyncGet.java | 50 + .../compute/v1/subnetworks/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../SyncGetIamPolicyStringStringString.java | 43 + .../v1/subnetworks/insert/AsyncInsert.java | 52 + .../v1/subnetworks/insert/AsyncInsertLRO.java | 53 + .../v1/subnetworks/insert/SyncInsert.java | 49 + .../SyncInsertStringStringSubnetwork.java | 44 + .../v1/subnetworks/list/AsyncList.java | 56 + .../v1/subnetworks/list/AsyncListPaged.java | 64 + .../compute/v1/subnetworks/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../listusable/AsyncListUsable.java | 56 + .../listusable/AsyncListUsablePaged.java | 64 + .../listusable/SyncListUsable.java | 52 + .../listusable/SyncListUsableString.java | 43 + .../v1/subnetworks/patch/AsyncPatch.java | 54 + .../v1/subnetworks/patch/AsyncPatchLRO.java | 55 + .../v1/subnetworks/patch/SyncPatch.java | 51 + ...SyncPatchStringStringStringSubnetwork.java | 46 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + ...ingStringStringRegionsetpolicyrequest.java | 47 + .../AsyncSetPrivateIpGoogleAccess.java | 55 + .../AsyncSetPrivateIpGoogleAccessLRO.java | 55 + .../SyncSetPrivateIpGoogleAccess.java | 51 + ...tworkssetprivateipgoogleaccessrequest.java | 54 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../v1/subnetworkssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../targetgrpcproxies/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../targetgrpcproxies/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/targetgrpcproxies/get/AsyncGet.java | 49 + .../v1/targetgrpcproxies/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../targetgrpcproxies/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../targetgrpcproxies/insert/SyncInsert.java | 48 + .../SyncInsertStringTargetgrpcproxy.java | 44 + .../v1/targetgrpcproxies/list/AsyncList.java | 56 + .../list/AsyncListPaged.java | 63 + .../v1/targetgrpcproxies/list/SyncList.java | 52 + .../list/SyncListString.java | 43 + .../targetgrpcproxies/patch/AsyncPatch.java | 52 + .../patch/AsyncPatchLRO.java | 53 + .../v1/targetgrpcproxies/patch/SyncPatch.java | 49 + .../SyncPatchStringStringTargetgrpcproxy.java | 47 + .../get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../targethttpproxies/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../targethttpproxies/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/targethttpproxies/get/AsyncGet.java | 49 + .../v1/targethttpproxies/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../targethttpproxies/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../targethttpproxies/insert/SyncInsert.java | 48 + .../SyncInsertStringTargethttpproxy.java | 44 + .../v1/targethttpproxies/list/AsyncList.java | 56 + .../list/AsyncListPaged.java | 63 + .../v1/targethttpproxies/list/SyncList.java | 52 + .../list/SyncListString.java | 43 + .../targethttpproxies/patch/AsyncPatch.java | 52 + .../patch/AsyncPatchLRO.java | 53 + .../v1/targethttpproxies/patch/SyncPatch.java | 49 + .../SyncPatchStringStringTargethttpproxy.java | 47 + .../seturlmap/AsyncSetUrlMap.java | 52 + .../seturlmap/AsyncSetUrlMapLRO.java | 53 + .../seturlmap/SyncSetUrlMap.java | 49 + ...cSetUrlMapStringStringUrlmapreference.java | 47 + .../get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../targethttpsproxies/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/targethttpsproxies/get/AsyncGet.java | 50 + .../v1/targethttpsproxies/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../targethttpsproxies/insert/SyncInsert.java | 48 + .../SyncInsertStringTargethttpsproxy.java | 44 + .../v1/targethttpsproxies/list/AsyncList.java | 56 + .../list/AsyncListPaged.java | 63 + .../v1/targethttpsproxies/list/SyncList.java | 52 + .../list/SyncListString.java | 43 + .../targethttpsproxies/patch/AsyncPatch.java | 52 + .../patch/AsyncPatchLRO.java | 53 + .../targethttpsproxies/patch/SyncPatch.java | 49 + ...SyncPatchStringStringTargethttpsproxy.java | 47 + .../AsyncSetCertificateMap.java | 54 + .../AsyncSetCertificateMapLRO.java | 54 + .../SyncSetCertificateMap.java | 50 + ...thttpsproxiessetcertificatemaprequest.java | 51 + .../setquicoverride/AsyncSetQuicOverride.java | 54 + .../AsyncSetQuicOverrideLRO.java | 54 + .../setquicoverride/SyncSetQuicOverride.java | 50 + ...gethttpsproxiessetquicoverriderequest.java | 50 + .../AsyncSetSslCertificates.java | 54 + .../AsyncSetSslCertificatesLRO.java | 54 + .../SyncSetSslCertificates.java | 50 + ...httpsproxiessetsslcertificatesrequest.java | 51 + .../setsslpolicy/AsyncSetSslPolicy.java | 53 + .../setsslpolicy/AsyncSetSslPolicyLRO.java | 53 + .../setsslpolicy/SyncSetSslPolicy.java | 49 + ...lPolicyStringStringSslpolicyreference.java | 47 + .../seturlmap/AsyncSetUrlMap.java | 53 + .../seturlmap/AsyncSetUrlMapLRO.java | 53 + .../seturlmap/SyncSetUrlMap.java | 49 + ...cSetUrlMapStringStringUrlmapreference.java | 47 + .../get/SyncGet.java | 50 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../targetinstances/delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../v1/targetinstances/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/targetinstances/get/AsyncGet.java | 50 + .../v1/targetinstances/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../targetinstances/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../v1/targetinstances/insert/SyncInsert.java | 49 + .../SyncInsertStringStringTargetinstance.java | 45 + .../v1/targetinstances/list/AsyncList.java | 57 + .../targetinstances/list/AsyncListPaged.java | 64 + .../v1/targetinstances/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../targetinstancessettings/get/SyncGet.java | 49 + .../addhealthcheck/AsyncAddHealthCheck.java | 54 + .../AsyncAddHealthCheckLRO.java | 55 + .../addhealthcheck/SyncAddHealthCheck.java | 51 + ...tringTargetpoolsaddhealthcheckrequest.java | 51 + .../addinstance/AsyncAddInstance.java | 54 + .../addinstance/AsyncAddInstanceLRO.java | 55 + .../addinstance/SyncAddInstance.java | 51 + ...ngStringTargetpoolsaddinstancerequest.java | 50 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/targetpools/delete/AsyncDelete.java | 51 + .../v1/targetpools/delete/AsyncDeleteLRO.java | 52 + .../v1/targetpools/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../compute/v1/targetpools/get/AsyncGet.java | 50 + .../compute/v1/targetpools/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../targetpools/gethealth/AsyncGetHealth.java | 53 + .../targetpools/gethealth/SyncGetHealth.java | 49 + ...thStringStringStringInstancereference.java | 46 + .../v1/targetpools/insert/AsyncInsert.java | 52 + .../v1/targetpools/insert/AsyncInsertLRO.java | 53 + .../v1/targetpools/insert/SyncInsert.java | 49 + .../SyncInsertStringStringTargetpool.java | 44 + .../v1/targetpools/list/AsyncList.java | 56 + .../v1/targetpools/list/AsyncListPaged.java | 64 + .../compute/v1/targetpools/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../AsyncRemoveHealthCheck.java | 55 + .../AsyncRemoveHealthCheckLRO.java | 55 + .../SyncRemoveHealthCheck.java | 51 + ...ngTargetpoolsremovehealthcheckrequest.java | 51 + .../removeinstance/AsyncRemoveInstance.java | 54 + .../AsyncRemoveInstanceLRO.java | 55 + .../removeinstance/SyncRemoveInstance.java | 51 + ...tringTargetpoolsremoveinstancerequest.java | 51 + .../targetpools/setbackup/AsyncSetBackup.java | 54 + .../setbackup/AsyncSetBackupLRO.java | 55 + .../targetpools/setbackup/SyncSetBackup.java | 51 + ...ckupStringStringStringTargetreference.java | 48 + .../v1/targetpoolssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../targetsslproxies/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../targetsslproxies/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/targetsslproxies/get/AsyncGet.java | 49 + .../v1/targetsslproxies/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../targetsslproxies/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../targetsslproxies/insert/SyncInsert.java | 48 + .../SyncInsertStringTargetsslproxy.java | 44 + .../v1/targetsslproxies/list/AsyncList.java | 56 + .../targetsslproxies/list/AsyncListPaged.java | 63 + .../v1/targetsslproxies/list/SyncList.java | 52 + .../targetsslproxies/list/SyncListString.java | 43 + .../AsyncSetBackendService.java | 54 + .../AsyncSetBackendServiceLRO.java | 54 + .../SyncSetBackendService.java | 50 + ...getsslproxiessetbackendservicerequest.java | 50 + .../AsyncSetCertificateMap.java | 54 + .../AsyncSetCertificateMapLRO.java | 54 + .../SyncSetCertificateMap.java | 50 + ...getsslproxiessetcertificatemaprequest.java | 50 + .../setproxyheader/AsyncSetProxyHeader.java | 54 + .../AsyncSetProxyHeaderLRO.java | 54 + .../setproxyheader/SyncSetProxyHeader.java | 50 + ...Targetsslproxiessetproxyheaderrequest.java | 50 + .../AsyncSetSslCertificates.java | 54 + .../AsyncSetSslCertificatesLRO.java | 54 + .../SyncSetSslCertificates.java | 50 + ...etsslproxiessetsslcertificatesrequest.java | 50 + .../setsslpolicy/AsyncSetSslPolicy.java | 53 + .../setsslpolicy/AsyncSetSslPolicyLRO.java | 53 + .../setsslpolicy/SyncSetSslPolicy.java | 49 + ...lPolicyStringStringSslpolicyreference.java | 47 + .../targetsslproxiessettings/get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../targettcpproxies/delete/AsyncDelete.java | 50 + .../delete/AsyncDeleteLRO.java | 51 + .../targettcpproxies/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../v1/targettcpproxies/get/AsyncGet.java | 49 + .../v1/targettcpproxies/get/SyncGet.java | 46 + .../get/SyncGetStringString.java | 42 + .../targettcpproxies/insert/AsyncInsert.java | 51 + .../insert/AsyncInsertLRO.java | 52 + .../targettcpproxies/insert/SyncInsert.java | 48 + .../SyncInsertStringTargettcpproxy.java | 44 + .../v1/targettcpproxies/list/AsyncList.java | 56 + .../targettcpproxies/list/AsyncListPaged.java | 63 + .../v1/targettcpproxies/list/SyncList.java | 52 + .../targettcpproxies/list/SyncListString.java | 43 + .../AsyncSetBackendService.java | 54 + .../AsyncSetBackendServiceLRO.java | 54 + .../SyncSetBackendService.java | 50 + ...gettcpproxiessetbackendservicerequest.java | 50 + .../setproxyheader/AsyncSetProxyHeader.java | 54 + .../AsyncSetProxyHeaderLRO.java | 54 + .../setproxyheader/SyncSetProxyHeader.java | 50 + ...Targettcpproxiessetproxyheaderrequest.java | 50 + .../targettcpproxiessettings/get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../targetvpngateways/delete/AsyncDelete.java | 51 + .../delete/AsyncDeleteLRO.java | 52 + .../targetvpngateways/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 44 + .../v1/targetvpngateways/get/AsyncGet.java | 51 + .../v1/targetvpngateways/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../targetvpngateways/insert/AsyncInsert.java | 52 + .../insert/AsyncInsertLRO.java | 53 + .../targetvpngateways/insert/SyncInsert.java | 49 + ...yncInsertStringStringTargetvpngateway.java | 45 + .../v1/targetvpngateways/list/AsyncList.java | 57 + .../list/AsyncListPaged.java | 64 + .../v1/targetvpngateways/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../setlabels/AsyncSetLabels.java | 53 + .../setlabels/AsyncSetLabelsLRO.java | 54 + .../setlabels/SyncSetLabels.java | 50 + ...ingStringStringRegionsetlabelsrequest.java | 49 + .../get/SyncGet.java | 49 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../urlmaps/create/SyncCreateSetEndpoint.java | 40 + .../v1/urlmaps/delete/AsyncDelete.java | 50 + .../v1/urlmaps/delete/AsyncDeleteLRO.java | 51 + .../compute/v1/urlmaps/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringString.java | 42 + .../compute/v1/urlmaps/get/AsyncGet.java | 49 + .../cloud/compute/v1/urlmaps/get/SyncGet.java | 46 + .../v1/urlmaps/get/SyncGetStringString.java | 42 + .../v1/urlmaps/insert/AsyncInsert.java | 51 + .../v1/urlmaps/insert/AsyncInsertLRO.java | 52 + .../compute/v1/urlmaps/insert/SyncInsert.java | 48 + .../insert/SyncInsertStringUrlmap.java | 43 + .../invalidatecache/AsyncInvalidateCache.java | 52 + .../AsyncInvalidateCacheLRO.java | 53 + .../invalidatecache/SyncInvalidateCache.java | 49 + ...acheStringStringCacheinvalidationrule.java | 46 + .../compute/v1/urlmaps/list/AsyncList.java | 55 + .../v1/urlmaps/list/AsyncListPaged.java | 63 + .../compute/v1/urlmaps/list/SyncList.java | 52 + .../v1/urlmaps/list/SyncListString.java | 43 + .../compute/v1/urlmaps/patch/AsyncPatch.java | 52 + .../v1/urlmaps/patch/AsyncPatchLRO.java | 53 + .../compute/v1/urlmaps/patch/SyncPatch.java | 49 + .../patch/SyncPatchStringStringUrlmap.java | 44 + .../v1/urlmaps/update/AsyncUpdate.java | 52 + .../v1/urlmaps/update/AsyncUpdateLRO.java | 53 + .../compute/v1/urlmaps/update/SyncUpdate.java | 49 + .../update/SyncUpdateStringStringUrlmap.java | 44 + .../v1/urlmaps/validate/AsyncValidate.java | 52 + .../v1/urlmaps/validate/SyncValidate.java | 48 + ...ateStringStringUrlmapsvalidaterequest.java | 46 + .../v1/urlmapssettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 66 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/vpngateways/delete/AsyncDelete.java | 51 + .../v1/vpngateways/delete/AsyncDeleteLRO.java | 52 + .../v1/vpngateways/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../compute/v1/vpngateways/get/AsyncGet.java | 50 + .../compute/v1/vpngateways/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../vpngateways/getstatus/AsyncGetStatus.java | 51 + .../vpngateways/getstatus/SyncGetStatus.java | 47 + .../SyncGetStatusStringStringString.java | 44 + .../v1/vpngateways/insert/AsyncInsert.java | 52 + .../v1/vpngateways/insert/AsyncInsertLRO.java | 53 + .../v1/vpngateways/insert/SyncInsert.java | 49 + .../SyncInsertStringStringVpngateway.java | 44 + .../v1/vpngateways/list/AsyncList.java | 56 + .../v1/vpngateways/list/AsyncListPaged.java | 64 + .../compute/v1/vpngateways/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../vpngateways/setlabels/AsyncSetLabels.java | 53 + .../setlabels/AsyncSetLabelsLRO.java | 54 + .../vpngateways/setlabels/SyncSetLabels.java | 50 + ...ingStringStringRegionsetlabelsrequest.java | 49 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../v1/vpngatewayssettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 58 + .../AsyncAggregatedListPaged.java | 65 + .../aggregatedlist/SyncAggregatedList.java | 55 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/vpntunnels/delete/AsyncDelete.java | 51 + .../v1/vpntunnels/delete/AsyncDeleteLRO.java | 52 + .../v1/vpntunnels/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../compute/v1/vpntunnels/get/AsyncGet.java | 50 + .../compute/v1/vpntunnels/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/vpntunnels/insert/AsyncInsert.java | 52 + .../v1/vpntunnels/insert/AsyncInsertLRO.java | 53 + .../v1/vpntunnels/insert/SyncInsert.java | 49 + .../SyncInsertStringStringVpntunnel.java | 44 + .../compute/v1/vpntunnels/list/AsyncList.java | 56 + .../v1/vpntunnels/list/AsyncListPaged.java | 64 + .../compute/v1/vpntunnels/list/SyncList.java | 53 + .../vpntunnels/list/SyncListStringString.java | 44 + .../vpntunnels/setlabels/AsyncSetLabels.java | 53 + .../setlabels/AsyncSetLabelsLRO.java | 54 + .../vpntunnels/setlabels/SyncSetLabels.java | 50 + ...ingStringStringRegionsetlabelsrequest.java | 49 + .../v1/vpntunnelssettings/get/SyncGet.java | 48 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1/zoneoperations/delete/AsyncDelete.java | 51 + .../v1/zoneoperations/delete/SyncDelete.java | 47 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1/zoneoperations/get/AsyncGet.java | 50 + .../v1/zoneoperations/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../v1/zoneoperations/list/AsyncList.java | 56 + .../zoneoperations/list/AsyncListPaged.java | 64 + .../v1/zoneoperations/list/SyncList.java | 53 + .../list/SyncListStringString.java | 44 + .../v1/zoneoperations/wait/AsyncWait.java | 50 + .../v1/zoneoperations/wait/SyncWait.java | 47 + .../wait/SyncWaitStringStringString.java | 43 + .../delete/SyncDelete.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../zones/create/SyncCreateSetEndpoint.java | 40 + .../cloud/compute/v1/zones/get/AsyncGet.java | 49 + .../cloud/compute/v1/zones/get/SyncGet.java | 46 + .../v1/zones/get/SyncGetStringString.java | 42 + .../compute/v1/zones/list/AsyncList.java | 55 + .../compute/v1/zones/list/AsyncListPaged.java | 63 + .../cloud/compute/v1/zones/list/SyncList.java | 52 + .../compute/v1/zones/list/SyncListString.java | 43 + .../compute/v1/zonessettings/get/SyncGet.java | 48 + .../aggregatedlist/AsyncAggregatedList.java | 57 + .../AsyncAggregatedListPaged.java | 64 + .../aggregatedlist/SyncAggregatedList.java | 54 + .../SyncAggregatedListString.java | 45 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../v1small/addresses/delete/AsyncDelete.java | 51 + .../addresses/delete/AsyncDeleteLRO.java | 52 + .../v1small/addresses/delete/SyncDelete.java | 48 + .../delete/SyncDeleteStringStringString.java | 43 + .../v1small/addresses/insert/AsyncInsert.java | 52 + .../addresses/insert/AsyncInsertLRO.java | 53 + .../v1small/addresses/insert/SyncInsert.java | 49 + .../insert/SyncInsertStringStringAddress.java | 44 + .../v1small/addresses/list/AsyncList.java | 55 + .../addresses/list/AsyncListPaged.java | 63 + .../v1small/addresses/list/SyncList.java | 52 + .../list/SyncListStringStringString.java | 45 + .../aggregatedlist/SyncAggregatedList.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../regionoperations/get/AsyncGet.java | 50 + .../v1small/regionoperations/get/SyncGet.java | 47 + .../get/SyncGetStringStringString.java | 43 + .../regionoperations/wait/AsyncWait.java | 50 + .../regionoperations/wait/SyncWait.java | 47 + .../wait/SyncWaitStringStringString.java | 43 + .../regionoperationssettings/get/SyncGet.java | 49 + .../aggregatedlist/SyncAggregatedList.java | 48 + .../get/SyncGet.java | 49 + 2958 files changed, 163222 insertions(+), 11842 deletions(-) create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSimulateMaintenanceEventRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSimulateMaintenanceEventRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventNodeGroupRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventNodeGroupRequestOrBuilder.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/SyncInsertStringStringAddress.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addressessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/SyncInsertStringStringAutoscaler.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/SyncPatchStringStringAutoscaler.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/SyncUpdateStringStringAutoscaler.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalerssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/AsyncAddSignedUrlKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/AsyncAddSignedUrlKeyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/SyncAddSignedUrlKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/SyncAddSignedUrlKeyStringStringSignedurlkey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/AsyncDeleteSignedUrlKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/AsyncDeleteSignedUrlKeyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/SyncDeleteSignedUrlKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/SyncDeleteSignedUrlKeyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/SyncInsertStringBackendbucket.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/SyncPatchStringStringBackendbucket.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/SyncSetEdgeSecurityPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/SyncUpdateStringStringBackendbucket.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbucketssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/AsyncAddSignedUrlKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/AsyncAddSignedUrlKeyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/SyncAddSignedUrlKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/SyncAddSignedUrlKeyStringStringSignedurlkey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/AsyncDeleteSignedUrlKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/AsyncDeleteSignedUrlKeyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/SyncDeleteSignedUrlKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/SyncDeleteSignedUrlKeyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/AsyncGetHealth.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/SyncGetHealth.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/SyncGetHealthStringStringResourcegroupreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/SyncGetIamPolicyStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/SyncInsertStringBackendservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/SyncPatchStringStringBackendservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/SyncSetEdgeSecurityPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/AsyncSetSecurityPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/AsyncSetSecurityPolicyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/SyncSetSecurityPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/SyncSetSecurityPolicyStringStringSecuritypolicyreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/SyncUpdateStringStringBackendservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservicessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/AsyncAddResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/AsyncAddResourcePoliciesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/SyncAddResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/SyncAddResourcePoliciesStringStringStringDisksaddresourcepoliciesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/AsyncCreateSnapshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/AsyncCreateSnapshotLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/SyncCreateSnapshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/SyncCreateSnapshotStringStringStringSnapshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/SyncInsertStringStringDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/AsyncRemoveResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/SyncRemoveResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringDisksremoveresourcepoliciesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/AsyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/AsyncResizeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/SyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/SyncResizeStringStringStringDisksresizerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/SyncSetLabelsStringStringStringZonesetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/SyncUpdateStringStringStringDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/diskssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/SyncInsertStringExternalvpngateway.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngatewayssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/AsyncAddAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/AsyncAddAssociationLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/SyncAddAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/SyncAddAssociationStringFirewallpolicyassociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/AsyncAddRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/AsyncAddRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/SyncAddRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/SyncAddRuleStringFirewallpolicyrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/AsyncCloneRules.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/AsyncCloneRulesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/SyncCloneRules.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/SyncCloneRulesString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/SyncDeleteString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/SyncGetString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/AsyncGetAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/SyncGetAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/SyncGetAssociationString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/SyncGetIamPolicyString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/AsyncGetRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/SyncGetRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/SyncGetRuleString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/SyncInsertStringFirewallpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/SyncListNoargs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/AsyncListAssociations.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/SyncListAssociations.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/SyncListAssociationsNoargs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/AsyncMove.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/AsyncMoveLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/SyncMove.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/SyncMoveStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/SyncPatchStringFirewallpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/AsyncPatchRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/AsyncPatchRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/SyncPatchRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/SyncPatchRuleStringFirewallpolicyrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/AsyncRemoveAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/SyncRemoveAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/SyncRemoveAssociationString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/AsyncRemoveRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/AsyncRemoveRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/SyncRemoveRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/SyncRemoveRuleString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/SyncSetIamPolicyStringGlobalorganizationsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/SyncTestIamPermissionsStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpoliciessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/SyncInsertStringFirewall.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/SyncPatchStringStringFirewall.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/SyncUpdateStringStringFirewall.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/SyncInsertStringStringForwardingrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/SyncPatchStringStringStringForwardingrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/AsyncSetTarget.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/AsyncSetTargetLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/SyncSetTarget.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/SyncSetTargetStringStringStringTargetreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrulessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/SyncInsertStringAddress.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdressessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/SyncInsertStringForwardingrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/SyncPatchStringStringForwardingrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/AsyncSetTarget.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/AsyncSetTargetLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/SyncSetTarget.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/SyncSetTargetStringStringTargetreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrulessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpointsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpointsStringStringGlobalnetworkendpointgroupsattachendpointsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpointsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpointsStringStringGlobalnetworkendpointgroupsdetachendpointsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/SyncInsertStringNetworkendpointgroup.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpointsPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/SyncListNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/SyncListNetworkEndpointsStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroupssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/AsyncWait.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/SyncWait.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/SyncWaitStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperationssettings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/SyncDeleteString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/SyncGetString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/SyncListNoargs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperationssettings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/SyncInsertStringPublicdelegatedprefix.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/SyncPatchStringStringPublicdelegatedprefix.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/SyncInsertStringHealthcheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/SyncPatchStringStringHealthcheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/SyncUpdateStringStringHealthcheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthcheckssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviewssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/AsyncDeprecate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/AsyncDeprecateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/SyncDeprecate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/SyncDeprecateStringStringDeprecationstatus.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/AsyncGetFromFamily.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/SyncGetFromFamily.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/SyncGetFromFamilyStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/SyncGetIamPolicyStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/SyncInsertStringImage.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/SyncPatchStringStringImage.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/AsyncAbandonInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/AsyncAbandonInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/SyncAbandonInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/SyncAbandonInstancesStringStringStringInstancegroupmanagersabandoninstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstancesStringStringStringInstancegroupmanagersapplyupdatesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/AsyncCreateInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/AsyncCreateInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/SyncCreateInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/SyncCreateInstancesStringStringStringInstancegroupmanagerscreateinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/AsyncDeleteInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/AsyncDeleteInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/SyncDeleteInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/SyncDeleteInstancesStringStringStringInstancegroupmanagersdeleteinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigsStringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/SyncInsertStringStringInstancegroupmanager.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/AsyncListErrors.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/AsyncListErrorsPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/SyncListErrors.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/SyncListErrorsStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/AsyncListManagedInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/AsyncListManagedInstancesPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/SyncListManagedInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/SyncListManagedInstancesStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigsPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigsStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/SyncPatchStringStringStringInstancegroupmanager.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigsStringStringStringInstancegroupmanagerspatchperinstanceconfigsreq.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/AsyncRecreateInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/AsyncRecreateInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/SyncRecreateInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/SyncRecreateInstancesStringStringStringInstancegroupmanagersrecreateinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/AsyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/AsyncResizeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/SyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/SyncResizeStringStringStringInt.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplateStringStringStringInstancegroupmanagerssetinstancetemplaterequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/AsyncSetTargetPools.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/AsyncSetTargetPoolsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/SyncSetTargetPools.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/SyncSetTargetPoolsStringStringStringInstancegroupmanagerssettargetpoolsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigsStringStringStringInstancegroupmanagersupdateperinstanceconfigsreq.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagerssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/AsyncAddInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/AsyncAddInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/SyncAddInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/SyncAddInstancesStringStringStringInstancegroupsaddinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/SyncInsertStringStringInstancegroup.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/AsyncListInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/AsyncListInstancesPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/SyncListInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/SyncListInstancesStringStringStringInstancegroupslistinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/AsyncRemoveInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/AsyncRemoveInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/SyncRemoveInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/SyncRemoveInstancesStringStringStringInstancegroupsremoveinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/AsyncSetNamedPorts.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/AsyncSetNamedPortsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/SyncSetNamedPorts.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/SyncSetNamedPortsStringStringStringInstancegroupssetnamedportsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/AsyncAddAccessConfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/AsyncAddAccessConfigLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/SyncAddAccessConfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/SyncAddAccessConfigStringStringStringStringAccessconfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/AsyncAddResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/AsyncAddResourcePoliciesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/SyncAddResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/SyncAddResourcePoliciesStringStringStringInstancesaddresourcepoliciesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/AsyncAttachDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/AsyncAttachDiskLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/SyncAttachDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/SyncAttachDiskStringStringStringAttacheddisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/AsyncBulkInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/AsyncBulkInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/SyncBulkInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/SyncBulkInsertStringStringBulkinsertinstanceresource.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/AsyncDeleteAccessConfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/AsyncDeleteAccessConfigLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/SyncDeleteAccessConfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/SyncDeleteAccessConfigStringStringStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/AsyncDetachDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/AsyncDetachDiskLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/SyncDetachDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/SyncDetachDiskStringStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/SyncGetEffectiveFirewalls.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/SyncGetEffectiveFirewallsStringStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/AsyncGetGuestAttributes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/SyncGetGuestAttributes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/SyncGetGuestAttributesStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/AsyncGetScreenshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/SyncGetScreenshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/SyncGetScreenshotStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/AsyncGetSerialPortOutput.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/SyncGetSerialPortOutput.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/SyncGetSerialPortOutputStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/AsyncGetShieldedInstanceIdentity.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/SyncGetShieldedInstanceIdentity.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/SyncGetShieldedInstanceIdentityStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/SyncInsertStringStringInstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/AsyncListReferrers.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/AsyncListReferrersPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/SyncListReferrers.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/SyncListReferrersStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/AsyncRemoveResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/SyncRemoveResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringInstancesremoveresourcepoliciesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/AsyncReset.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/AsyncResetLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/SyncReset.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/SyncResetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/AsyncResume.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/AsyncResumeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/SyncResume.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/SyncResumeStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/AsyncSendDiagnosticInterrupt.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/SyncSendDiagnosticInterrupt.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/SyncSendDiagnosticInterruptStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/AsyncSetDeletionProtection.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/AsyncSetDeletionProtectionLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/SyncSetDeletionProtection.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/SyncSetDeletionProtectionStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/AsyncSetDiskAutoDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/AsyncSetDiskAutoDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/SyncSetDiskAutoDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/SyncSetDiskAutoDeleteStringStringStringBooleanString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/SyncSetLabelsStringStringStringInstancessetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/AsyncSetMachineResources.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/AsyncSetMachineResourcesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/SyncSetMachineResources.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/SyncSetMachineResourcesStringStringStringInstancessetmachineresourcesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/AsyncSetMachineType.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/AsyncSetMachineTypeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/SyncSetMachineType.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/SyncSetMachineTypeStringStringStringInstancessetmachinetyperequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/AsyncSetMetadata.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/AsyncSetMetadataLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/SyncSetMetadata.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/SyncSetMetadataStringStringStringMetadata.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/AsyncSetMinCpuPlatform.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/AsyncSetMinCpuPlatformLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/SyncSetMinCpuPlatform.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/SyncSetMinCpuPlatformStringStringStringInstancessetmincpuplatformrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/AsyncSetName.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/AsyncSetNameLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/SyncSetName.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/SyncSetNameStringStringStringInstancessetnamerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/AsyncSetScheduling.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/AsyncSetSchedulingLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/SyncSetScheduling.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/SyncSetSchedulingStringStringStringScheduling.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/AsyncSetServiceAccount.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/AsyncSetServiceAccountLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/SyncSetServiceAccount.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/SyncSetServiceAccountStringStringStringInstancessetserviceaccountrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/AsyncSetShieldedInstanceIntegrityPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/AsyncSetShieldedInstanceIntegrityPolicyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/SyncSetShieldedInstanceIntegrityPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/SyncSetShieldedInstanceIntegrityPolicyStringStringStringShieldedinstanceintegritypolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/AsyncSetTags.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/AsyncSetTagsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/SyncSetTags.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/SyncSetTagsStringStringStringTags.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/SyncSimulateMaintenanceEventStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/AsyncStart.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/AsyncStartLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/SyncStart.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/SyncStartStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/AsyncStartWithEncryptionKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/AsyncStartWithEncryptionKeyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/SyncStartWithEncryptionKey.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/SyncStartWithEncryptionKeyStringStringStringInstancesstartwithencryptionkeyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/AsyncStop.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/AsyncStopLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/SyncStop.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/SyncStopStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/AsyncSuspend.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/AsyncSuspendLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/SyncSuspend.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/SyncSuspendStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/SyncUpdateStringStringStringInstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/AsyncUpdateAccessConfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/AsyncUpdateAccessConfigLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/SyncUpdateAccessConfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/SyncUpdateAccessConfigStringStringStringStringAccessconfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/AsyncUpdateDisplayDevice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/AsyncUpdateDisplayDeviceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/SyncUpdateDisplayDevice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/SyncUpdateDisplayDeviceStringStringStringDisplaydevice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/AsyncUpdateNetworkInterface.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/AsyncUpdateNetworkInterfaceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/SyncUpdateNetworkInterface.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/SyncUpdateNetworkInterfaceStringStringStringStringNetworkinterface.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/AsyncUpdateShieldedInstanceConfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/AsyncUpdateShieldedInstanceConfigLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/SyncUpdateShieldedInstanceConfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/SyncUpdateShieldedInstanceConfigStringStringStringShieldedinstanceconfig.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/SyncGetIamPolicyStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/SyncInsertStringInstancetemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplatessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/SyncInsertStringStringInterconnectattachment.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/SyncPatchStringStringStringInterconnectattachment.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachmentssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocationssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/AsyncGetDiagnostics.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/SyncGetDiagnostics.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/SyncGetDiagnosticsStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/SyncInsertStringInterconnect.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/SyncPatchStringStringInterconnect.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/SyncGetIamPolicyStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/SyncInsertStringLicense.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/SyncGetIamPolicyStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/SyncInsertStringMachineimage.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimagessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/SyncInsertStringStringNetworkattachment.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachmentssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/SyncInsertStringStringNetworkedgesecurityservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/SyncPatchStringStringStringNetworkedgesecurityservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservicessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpointsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpointsStringStringStringNetworkendpointgroupsattachendpointsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpointsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpointsStringStringStringNetworkendpointgroupsdetachendpointsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/SyncInsertStringStringNetworkendpointgroup.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpointsPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/SyncListNetworkEndpoints.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/SyncListNetworkEndpointsStringStringStringNetworkendpointgroupslistendpointsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroupssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/AsyncAddAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/AsyncAddAssociationLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/SyncAddAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/SyncAddAssociationStringStringFirewallpolicyassociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/AsyncAddRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/AsyncAddRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/SyncAddRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/SyncAddRuleStringStringFirewallpolicyrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/AsyncCloneRules.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/AsyncCloneRulesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/SyncCloneRules.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/SyncCloneRulesStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/AsyncGetAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/SyncGetAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/SyncGetAssociationStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/SyncGetIamPolicyStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/AsyncGetRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/SyncGetRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/SyncGetRuleStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/SyncInsertStringFirewallpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/SyncPatchStringStringFirewallpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/AsyncPatchRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/AsyncPatchRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/SyncPatchRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/SyncPatchRuleStringStringFirewallpolicyrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/AsyncRemoveAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/SyncRemoveAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/SyncRemoveAssociationStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/AsyncRemoveRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/AsyncRemoveRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/SyncRemoveRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/SyncRemoveRuleStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpoliciessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/AsyncAddPeering.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/AsyncAddPeeringLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/SyncAddPeering.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/SyncAddPeeringStringStringNetworksaddpeeringrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/SyncGetEffectiveFirewalls.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/SyncGetEffectiveFirewallsStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/SyncInsertStringNetwork.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/AsyncListPeeringRoutes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/AsyncListPeeringRoutesPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/SyncListPeeringRoutes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/SyncListPeeringRoutesStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/SyncPatchStringStringNetwork.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/AsyncRemovePeering.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/AsyncRemovePeeringLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/SyncRemovePeering.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/SyncRemovePeeringStringStringNetworksremovepeeringrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/AsyncSwitchToCustomMode.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/AsyncSwitchToCustomModeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/SyncSwitchToCustomMode.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/SyncSwitchToCustomModeStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/AsyncUpdatePeering.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/AsyncUpdatePeeringLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/SyncUpdatePeering.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/SyncUpdatePeeringStringStringNetworksupdatepeeringrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/AsyncAddNodes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/AsyncAddNodesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/SyncAddNodes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/SyncAddNodesStringStringStringNodegroupsaddnodesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/AsyncDeleteNodes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/AsyncDeleteNodesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/SyncDeleteNodes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/SyncDeleteNodesStringStringStringNodegroupsdeletenodesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/SyncInsertStringStringIntNodegroup.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/AsyncListNodes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/AsyncListNodesPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/SyncListNodes.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/SyncListNodesStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/SyncPatchStringStringStringNodegroup.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/AsyncSetNodeTemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/AsyncSetNodeTemplateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/SyncSetNodeTemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/SyncSetNodeTemplateStringStringStringNodegroupssetnodetemplaterequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/SyncSimulateMaintenanceEventStringStringStringNodegroupssimulatemaintenanceeventrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroupssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/SyncInsertStringStringNodetemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplatessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/SyncInsertStringStringPacketmirroring.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/SyncPatchStringStringStringPacketmirroring.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirroringssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/AsyncDisableXpnHost.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/AsyncDisableXpnHostLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/SyncDisableXpnHost.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/SyncDisableXpnHostString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/AsyncDisableXpnResource.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/AsyncDisableXpnResourceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/SyncDisableXpnResource.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/SyncDisableXpnResourceStringProjectsdisablexpnresourcerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/AsyncEnableXpnHost.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/AsyncEnableXpnHostLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/SyncEnableXpnHost.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/SyncEnableXpnHostString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/AsyncEnableXpnResource.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/AsyncEnableXpnResourceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/SyncEnableXpnResource.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/SyncEnableXpnResourceStringProjectsenablexpnresourcerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/SyncGetString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/AsyncGetXpnHost.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/SyncGetXpnHost.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/SyncGetXpnHostString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/AsyncGetXpnResources.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/AsyncGetXpnResourcesPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/SyncGetXpnResources.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/SyncGetXpnResourcesString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/AsyncListXpnHosts.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/AsyncListXpnHostsPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/SyncListXpnHosts.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/SyncListXpnHostsStringProjectslistxpnhostsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/AsyncMoveDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/AsyncMoveDiskLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/SyncMoveDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/SyncMoveDiskStringDiskmoverequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/AsyncMoveInstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/AsyncMoveInstanceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/SyncMoveInstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/SyncMoveInstanceStringInstancemoverequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/AsyncSetCommonInstanceMetadata.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/AsyncSetCommonInstanceMetadataLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/SyncSetCommonInstanceMetadata.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/SyncSetCommonInstanceMetadataStringMetadata.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/AsyncSetDefaultNetworkTier.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/AsyncSetDefaultNetworkTierLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/SyncSetDefaultNetworkTier.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/SyncSetDefaultNetworkTierStringProjectssetdefaultnetworktierrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/AsyncSetUsageExportBucket.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/AsyncSetUsageExportBucketLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/SyncSetUsageExportBucket.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/SyncSetUsageExportBucketStringUsageexportlocation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projectssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/SyncInsertStringPublicadvertisedprefix.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/SyncPatchStringStringPublicadvertisedprefix.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/SyncInsertStringStringPublicdelegatedprefix.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/SyncPatchStringStringStringPublicdelegatedprefix.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/SyncInsertStringStringAutoscaler.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/SyncPatchStringStringAutoscaler.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/SyncUpdateStringStringAutoscaler.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalerssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/AsyncGetHealth.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/SyncGetHealth.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/SyncGetHealthStringStringStringResourcegroupreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/SyncInsertStringStringBackendservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/SyncPatchStringStringStringBackendservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/SyncUpdateStringStringStringBackendservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservicessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/SyncInsertStringStringCommitment.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/SyncUpdateStringStringStringCommitment.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitmentssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/AsyncAddResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/AsyncAddResourcePoliciesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/SyncAddResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/SyncAddResourcePoliciesStringStringStringRegiondisksaddresourcepoliciesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/AsyncCreateSnapshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/AsyncCreateSnapshotLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/SyncCreateSnapshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/SyncCreateSnapshotStringStringStringSnapshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/SyncInsertStringStringDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/AsyncRemoveResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/SyncRemoveResourcePolicies.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringRegiondisksremoveresourcepoliciesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/AsyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/AsyncResizeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/SyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/SyncResizeStringStringStringRegiondisksresizerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/SyncUpdateStringStringStringDisk.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondiskssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/SyncInsertStringStringHealthcheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/SyncPatchStringStringStringHealthcheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/SyncUpdateStringStringStringHealthcheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/SyncInsertStringStringHealthcheckservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/SyncPatchStringStringStringHealthcheckservice.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservicessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/AsyncAbandonInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/AsyncAbandonInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/SyncAbandonInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/SyncAbandonInstancesStringStringStringRegioninstancegroupmanagersabandoninstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstancesStringStringStringRegioninstancegroupmanagersapplyupdatesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/AsyncCreateInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/AsyncCreateInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/SyncCreateInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/SyncCreateInstancesStringStringStringRegioninstancegroupmanagerscreateinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/AsyncDeleteInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/AsyncDeleteInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/SyncDeleteInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/SyncDeleteInstancesStringStringStringRegioninstancegroupmanagersdeleteinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigsStringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/SyncInsertStringStringInstancegroupmanager.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/AsyncListErrors.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/AsyncListErrorsPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/SyncListErrors.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/SyncListErrorsStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/AsyncListManagedInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/AsyncListManagedInstancesPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/SyncListManagedInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/SyncListManagedInstancesStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigsPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigsStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/SyncPatchStringStringStringInstancegroupmanager.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigsStringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/AsyncRecreateInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/AsyncRecreateInstancesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/SyncRecreateInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/SyncRecreateInstancesStringStringStringRegioninstancegroupmanagersrecreaterequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/AsyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/AsyncResizeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/SyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/SyncResizeStringStringStringInt.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplateStringStringStringRegioninstancegroupmanagerssettemplaterequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/AsyncSetTargetPools.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/AsyncSetTargetPoolsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/SyncSetTargetPools.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/SyncSetTargetPoolsStringStringStringRegioninstancegroupmanagerssettargetpoolsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigs.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigsStringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagerssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/AsyncListInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/AsyncListInstancesPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/SyncListInstances.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/SyncListInstancesStringStringStringRegioninstancegroupslistinstancesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/AsyncSetNamedPorts.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/AsyncSetNamedPortsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/SyncSetNamedPorts.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/SyncSetNamedPortsStringStringStringRegioninstancegroupssetnamedportsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/AsyncBulkInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/AsyncBulkInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/SyncBulkInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/SyncBulkInsertStringStringBulkinsertinstanceresource.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancessettings/bulkinsert/SyncBulkInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/SyncInsertStringStringInstancetemplate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplatessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/SyncInsertStringStringNetworkendpointgroup.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroupssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/AsyncAddAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/AsyncAddAssociationLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/SyncAddAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/SyncAddAssociationStringStringStringFirewallpolicyassociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/AsyncAddRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/AsyncAddRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/SyncAddRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/SyncAddRuleStringStringStringFirewallpolicyrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/AsyncCloneRules.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/AsyncCloneRulesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/SyncCloneRules.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/SyncCloneRulesStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/AsyncGetAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/SyncGetAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/SyncGetAssociationStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/SyncGetEffectiveFirewalls.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/SyncGetEffectiveFirewallsStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/AsyncGetRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/SyncGetRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/SyncGetRuleStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/SyncInsertStringStringFirewallpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/SyncPatchStringStringStringFirewallpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/AsyncPatchRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/AsyncPatchRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/SyncPatchRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/SyncPatchRuleStringStringStringFirewallpolicyrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/AsyncRemoveAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/SyncRemoveAssociation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/SyncRemoveAssociationStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/AsyncRemoveRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/AsyncRemoveRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/SyncRemoveRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/SyncRemoveRuleStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpoliciessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/SyncInsertStringStringNotificationendpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpointssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/AsyncWait.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/SyncWait.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/SyncWaitStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperationssettings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/SyncInsertStringStringSecuritypolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/SyncPatchStringStringStringSecuritypolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypoliciessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/SyncInsertStringStringSslcertificate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificatessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/SyncInsertStringStringSslpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/AsyncListAvailableFeatures.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/SyncListAvailableFeatures.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/SyncListAvailableFeaturesStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/SyncPatchStringStringStringSslpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpoliciessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/SyncInsertStringStringTargethttpproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/AsyncSetUrlMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/AsyncSetUrlMapLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/SyncSetUrlMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/SyncSetUrlMapStringStringStringUrlmapreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxiessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/SyncInsertStringStringTargethttpsproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/SyncPatchStringStringStringTargethttpsproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/AsyncSetSslCertificates.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/SyncSetSslCertificates.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/SyncSetSslCertificatesStringStringStringRegiontargethttpsproxiessetsslcertificatesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/AsyncSetUrlMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/AsyncSetUrlMapLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/SyncSetUrlMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/SyncSetUrlMapStringStringStringUrlmapreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxiessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/SyncInsertStringStringTargettcpproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxiessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/SyncInsertStringStringUrlmap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/SyncPatchStringStringStringUrlmap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/SyncUpdateStringStringStringUrlmap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/AsyncValidate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/SyncValidate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/SyncValidateStringStringStringRegionurlmapsvalidaterequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmapssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/SyncInsertStringStringReservation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/AsyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/AsyncResizeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/SyncResize.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/SyncResizeStringStringStringReservationsresizerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/SyncUpdateStringStringStringReservation.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservationssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/SyncInsertStringStringResourcepolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepoliciessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/AsyncGetNatMappingInfo.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/AsyncGetNatMappingInfoPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/SyncGetNatMappingInfo.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/SyncGetNatMappingInfoStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/AsyncGetRouterStatus.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/SyncGetRouterStatus.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/SyncGetRouterStatusStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/SyncInsertStringStringRouter.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/SyncPatchStringStringStringRouter.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/AsyncPreview.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/SyncPreview.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/SyncPreviewStringStringStringRouter.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/SyncUpdateStringStringStringRouter.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routerssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/SyncInsertStringRoute.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/AsyncAddRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/AsyncAddRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/SyncAddRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/SyncAddRuleStringStringSecuritypolicyrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/AsyncGetRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/SyncGetRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/SyncGetRuleStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/SyncInsertStringSecuritypolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/AsyncListPreconfiguredExpressionSets.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/SyncListPreconfiguredExpressionSets.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/SyncListPreconfiguredExpressionSetsString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/SyncPatchStringStringSecuritypolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/AsyncPatchRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/AsyncPatchRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/SyncPatchRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/SyncPatchRuleStringStringSecuritypolicyrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/AsyncRemoveRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/AsyncRemoveRuleLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/SyncRemoveRule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/SyncRemoveRuleStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypoliciessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/SyncInsertStringStringServiceattachment.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/SyncPatchStringStringStringServiceattachment.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachmentssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/SyncGetIamPolicyStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/SyncInsertStringSnapshot.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshotssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/SyncInsertStringSslcertificate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificatessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/SyncInsertStringSslpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/AsyncListAvailableFeatures.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/SyncListAvailableFeatures.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/SyncListAvailableFeaturesString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/SyncPatchStringStringSslpolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpoliciessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/acceleratortypesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/addressesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/autoscalersstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/backendbucketsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/backendservicesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/disksstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/disktypesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/externalvpngatewaysstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/firewallpoliciesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/firewallsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/forwardingrulesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globaladdressesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalforwardingrulesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalnetworkendpointgroupsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globaloperationsstubsettings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalorganizationoperationsstubsettings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalpublicdelegatedprefixesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/healthchecksstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/imagefamilyviewsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/imagesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancegroupmanagersstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancegroupsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancetemplatesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectattachmentsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectlocationsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/licensecodesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/licensesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/machineimagesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/machinetypesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkattachmentsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkedgesecurityservicesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkendpointgroupsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkfirewallpoliciesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networksstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodegroupsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodetemplatesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodetypesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/packetmirroringsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/projectsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/publicadvertisedprefixesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/publicdelegatedprefixesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionautoscalersstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionbackendservicesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioncommitmentsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiondisksstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiondisktypesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionhealthcheckservicesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionhealthchecksstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancegroupmanagersstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancegroupsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancesstubsettings/bulkinsert/SyncBulkInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancetemplatesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnetworkendpointgroupsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnetworkfirewallpoliciesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnotificationendpointsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionoperationsstubsettings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsecuritypoliciesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsslcertificatesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsslpoliciesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargethttpproxiesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargethttpsproxiesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargettcpproxiesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionurlmapsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/reservationsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/resourcepoliciesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/routersstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/routesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/securitypoliciesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/serviceattachmentsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/snapshotsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/sslcertificatesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/sslpoliciesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/subnetworksstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetgrpcproxiesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targethttpproxiesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targethttpsproxiesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetinstancesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetpoolsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetsslproxiesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targettcpproxiesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetvpngatewaysstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/urlmapsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/vpngatewaysstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/vpntunnelsstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/zoneoperationsstubsettings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/zonesstubsettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/AsyncExpandIpCidrRange.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/AsyncExpandIpCidrRangeLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/SyncExpandIpCidrRange.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/SyncExpandIpCidrRangeStringStringStringSubnetworksexpandipcidrrangerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/SyncGetIamPolicyStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/SyncInsertStringStringSubnetwork.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/AsyncListUsable.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/AsyncListUsablePaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/SyncListUsable.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/SyncListUsableString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/SyncPatchStringStringStringSubnetwork.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/AsyncSetPrivateIpGoogleAccess.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/AsyncSetPrivateIpGoogleAccessLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/SyncSetPrivateIpGoogleAccess.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/SyncSetPrivateIpGoogleAccessStringStringStringSubnetworkssetprivateipgoogleaccessrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworkssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/SyncInsertStringTargetgrpcproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/SyncPatchStringStringTargetgrpcproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxiessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/SyncInsertStringTargethttpproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/SyncPatchStringStringTargethttpproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/AsyncSetUrlMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/AsyncSetUrlMapLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/SyncSetUrlMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/SyncSetUrlMapStringStringUrlmapreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxiessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/SyncInsertStringTargethttpsproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/SyncPatchStringStringTargethttpsproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/AsyncSetCertificateMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/AsyncSetCertificateMapLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/SyncSetCertificateMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/SyncSetCertificateMapStringStringTargethttpsproxiessetcertificatemaprequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/AsyncSetQuicOverride.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/AsyncSetQuicOverrideLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/SyncSetQuicOverride.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/SyncSetQuicOverrideStringStringTargethttpsproxiessetquicoverriderequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/AsyncSetSslCertificates.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/SyncSetSslCertificates.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/SyncSetSslCertificatesStringStringTargethttpsproxiessetsslcertificatesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/AsyncSetSslPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/AsyncSetSslPolicyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/SyncSetSslPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/SyncSetSslPolicyStringStringSslpolicyreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/AsyncSetUrlMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/AsyncSetUrlMapLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/SyncSetUrlMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/SyncSetUrlMapStringStringUrlmapreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxiessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/SyncInsertStringStringTargetinstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstancessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/AsyncAddHealthCheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/AsyncAddHealthCheckLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/SyncAddHealthCheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/SyncAddHealthCheckStringStringStringTargetpoolsaddhealthcheckrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/AsyncAddInstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/AsyncAddInstanceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/SyncAddInstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/SyncAddInstanceStringStringStringTargetpoolsaddinstancerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/AsyncGetHealth.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/SyncGetHealth.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/SyncGetHealthStringStringStringInstancereference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/SyncInsertStringStringTargetpool.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/AsyncRemoveHealthCheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/AsyncRemoveHealthCheckLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/SyncRemoveHealthCheck.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/SyncRemoveHealthCheckStringStringStringTargetpoolsremovehealthcheckrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/AsyncRemoveInstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/AsyncRemoveInstanceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/SyncRemoveInstance.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/SyncRemoveInstanceStringStringStringTargetpoolsremoveinstancerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/AsyncSetBackup.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/AsyncSetBackupLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/SyncSetBackup.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/SyncSetBackupStringStringStringTargetreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpoolssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/SyncInsertStringTargetsslproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/AsyncSetBackendService.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/AsyncSetBackendServiceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/SyncSetBackendService.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/SyncSetBackendServiceStringStringTargetsslproxiessetbackendservicerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/AsyncSetCertificateMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/AsyncSetCertificateMapLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/SyncSetCertificateMap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/SyncSetCertificateMapStringStringTargetsslproxiessetcertificatemaprequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/AsyncSetProxyHeader.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/AsyncSetProxyHeaderLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/SyncSetProxyHeader.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/SyncSetProxyHeaderStringStringTargetsslproxiessetproxyheaderrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/AsyncSetSslCertificates.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/SyncSetSslCertificates.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/SyncSetSslCertificatesStringStringTargetsslproxiessetsslcertificatesrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/AsyncSetSslPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/AsyncSetSslPolicyLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/SyncSetSslPolicy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/SyncSetSslPolicyStringStringSslpolicyreference.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxiessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/SyncInsertStringTargettcpproxy.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/AsyncSetBackendService.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/AsyncSetBackendServiceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/SyncSetBackendService.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/SyncSetBackendServiceStringStringTargettcpproxiessetbackendservicerequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/AsyncSetProxyHeader.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/AsyncSetProxyHeaderLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/SyncSetProxyHeader.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/SyncSetProxyHeaderStringStringTargettcpproxiessetproxyheaderrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxiessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/SyncInsertStringStringTargetvpngateway.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngatewayssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/SyncDeleteStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/SyncInsertStringUrlmap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/AsyncInvalidateCache.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/AsyncInvalidateCacheLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/SyncInvalidateCache.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/SyncInvalidateCacheStringStringCacheinvalidationrule.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/AsyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/AsyncPatchLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/SyncPatch.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/SyncPatchStringStringUrlmap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/AsyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/AsyncUpdateLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/SyncUpdate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/SyncUpdateStringStringUrlmap.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/AsyncValidate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/SyncValidate.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/SyncValidateStringStringUrlmapsvalidaterequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmapssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/AsyncGetStatus.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/SyncGetStatus.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/SyncGetStatusStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/SyncInsertStringStringVpngateway.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngatewayssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/SyncInsertStringStringVpntunnel.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/AsyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/AsyncSetLabelsLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/SyncSetLabels.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnelssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/SyncListStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/AsyncWait.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/SyncWait.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/SyncWaitStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperationssettings/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/SyncGetStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/SyncListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zonessettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/AsyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/AsyncAggregatedListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/SyncAggregatedListString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/AsyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/AsyncDeleteLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/SyncDelete.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/SyncDeleteStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/AsyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/AsyncInsertLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/SyncInsert.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/SyncInsertStringStringAddress.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/AsyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/AsyncListPaged.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/SyncList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/SyncListStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addressessettings/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/create/SyncCreateSetEndpoint.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/AsyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/SyncGetStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/AsyncWait.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/SyncWait.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/SyncWaitStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperationssettings/get/SyncGet.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/stub/addressesstubsettings/aggregatedlist/SyncAggregatedList.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/stub/regionoperationsstubsettings/get/SyncGet.java diff --git a/java-compute/README.md b/java-compute/README.md index 9e9f41a4645f..a4cfc8466af0 100644 --- a/java-compute/README.md +++ b/java-compute/README.md @@ -13,27 +13,29 @@ Java idiomatic client for [Compute Engine][product-docs]. If you are using Maven, add this to your pom.xml file: + ```xml com.google.cloud google-cloud-compute - 1.22.0 + 1.23.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-compute:1.22.0' +implementation 'com.google.cloud:google-cloud-compute:1.23.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.22.0" +libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.23.0" ``` + ## Authentication @@ -50,7 +52,7 @@ The client application making API calls must be granted [authorization scopes][a You will need a [Google Cloud Platform Console][developer-console] project with the Compute Engine [API enabled][enable-api]. You will need to [enable billing][enable-billing] to use Google Compute Engine. [Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by -[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. ### Installation and setup @@ -236,14 +238,14 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-compute.svg -[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-compute&core=gav +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-compute/1.23.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles [iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects -[cloud-sdk]: https://cloud.google.com/sdk/ +[cloud-cli]: https://cloud.google.com/cli [troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting [contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md [code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct diff --git a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupsClient.java b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupsClient.java index b8d60aa048e6..1546970540c8 100644 --- a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupsClient.java +++ b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupsClient.java @@ -1765,6 +1765,159 @@ public final UnaryCallable setNodeTe return stub.setNodeTemplateCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates maintenance event on specified nodes from the node group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) {
+   *   String project = "project-309310695";
+   *   String zone = "zone3744684";
+   *   String nodeGroup = "nodeGroup443599261";
+   *   NodeGroupsSimulateMaintenanceEventRequest nodeGroupsSimulateMaintenanceEventRequestResource =
+   *       NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build();
+   *   Operation response =
+   *       nodeGroupsClient
+   *           .simulateMaintenanceEventAsync(
+   *               project, zone, nodeGroup, nodeGroupsSimulateMaintenanceEventRequestResource)
+   *           .get();
+   * }
+   * }
+ * + * @param project Project ID for this request. + * @param zone The name of the zone for this request. + * @param nodeGroup Name of the NodeGroup resource whose nodes will go under maintenance + * simulation. + * @param nodeGroupsSimulateMaintenanceEventRequestResource The body resource for this request + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture simulateMaintenanceEventAsync( + String project, + String zone, + String nodeGroup, + NodeGroupsSimulateMaintenanceEventRequest nodeGroupsSimulateMaintenanceEventRequestResource) { + SimulateMaintenanceEventNodeGroupRequest request = + SimulateMaintenanceEventNodeGroupRequest.newBuilder() + .setProject(project) + .setZone(zone) + .setNodeGroup(nodeGroup) + .setNodeGroupsSimulateMaintenanceEventRequestResource( + nodeGroupsSimulateMaintenanceEventRequestResource) + .build(); + return simulateMaintenanceEventAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates maintenance event on specified nodes from the node group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) {
+   *   SimulateMaintenanceEventNodeGroupRequest request =
+   *       SimulateMaintenanceEventNodeGroupRequest.newBuilder()
+   *           .setNodeGroup("nodeGroup443599261")
+   *           .setNodeGroupsSimulateMaintenanceEventRequestResource(
+   *               NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build())
+   *           .setProject("project-309310695")
+   *           .setRequestId("requestId693933066")
+   *           .setZone("zone3744684")
+   *           .build();
+   *   Operation response = nodeGroupsClient.simulateMaintenanceEventAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture simulateMaintenanceEventAsync( + SimulateMaintenanceEventNodeGroupRequest request) { + return simulateMaintenanceEventOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates maintenance event on specified nodes from the node group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) {
+   *   SimulateMaintenanceEventNodeGroupRequest request =
+   *       SimulateMaintenanceEventNodeGroupRequest.newBuilder()
+   *           .setNodeGroup("nodeGroup443599261")
+   *           .setNodeGroupsSimulateMaintenanceEventRequestResource(
+   *               NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build())
+   *           .setProject("project-309310695")
+   *           .setRequestId("requestId693933066")
+   *           .setZone("zone3744684")
+   *           .build();
+   *   OperationFuture future =
+   *       nodeGroupsClient.simulateMaintenanceEventOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + simulateMaintenanceEventOperationCallable() { + return stub.simulateMaintenanceEventOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates maintenance event on specified nodes from the node group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) {
+   *   SimulateMaintenanceEventNodeGroupRequest request =
+   *       SimulateMaintenanceEventNodeGroupRequest.newBuilder()
+   *           .setNodeGroup("nodeGroup443599261")
+   *           .setNodeGroupsSimulateMaintenanceEventRequestResource(
+   *               NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build())
+   *           .setProject("project-309310695")
+   *           .setRequestId("requestId693933066")
+   *           .setZone("zone3744684")
+   *           .build();
+   *   ApiFuture future =
+   *       nodeGroupsClient.simulateMaintenanceEventCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + simulateMaintenanceEventCallable() { + return stub.simulateMaintenanceEventCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns permissions that a caller has on the specified resource. diff --git a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupsSettings.java b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupsSettings.java index faf9e40ee8a4..4476735396e6 100644 --- a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupsSettings.java +++ b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupsSettings.java @@ -175,6 +175,18 @@ public UnaryCallSettings setNodeTemp return ((NodeGroupsStubSettings) getStubSettings()).setNodeTemplateOperationSettings(); } + /** Returns the object with the settings used for calls to simulateMaintenanceEvent. */ + public UnaryCallSettings + simulateMaintenanceEventSettings() { + return ((NodeGroupsStubSettings) getStubSettings()).simulateMaintenanceEventSettings(); + } + + /** Returns the object with the settings used for calls to simulateMaintenanceEvent. */ + public OperationCallSettings + simulateMaintenanceEventOperationSettings() { + return ((NodeGroupsStubSettings) getStubSettings()).simulateMaintenanceEventOperationSettings(); + } + /** Returns the object with the settings used for calls to testIamPermissions. */ public UnaryCallSettings testIamPermissionsSettings() { @@ -380,6 +392,19 @@ public UnaryCallSettings.Builder setIamPol return getStubSettingsBuilder().setNodeTemplateOperationSettings(); } + /** Returns the builder for the settings used for calls to simulateMaintenanceEvent. */ + public UnaryCallSettings.Builder + simulateMaintenanceEventSettings() { + return getStubSettingsBuilder().simulateMaintenanceEventSettings(); + } + + /** Returns the builder for the settings used for calls to simulateMaintenanceEvent. */ + public OperationCallSettings.Builder< + SimulateMaintenanceEventNodeGroupRequest, Operation, Operation> + simulateMaintenanceEventOperationSettings() { + return getStubSettingsBuilder().simulateMaintenanceEventOperationSettings(); + } + /** Returns the builder for the settings used for calls to testIamPermissions. */ public UnaryCallSettings.Builder testIamPermissionsSettings() { diff --git a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/gapic_metadata.json b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/gapic_metadata.json index 2859c44f0f4d..2c0361271124 100644 --- a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/gapic_metadata.json +++ b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/gapic_metadata.json @@ -1306,6 +1306,9 @@ "SetNodeTemplate": { "methods": ["setNodeTemplateAsync", "setNodeTemplateAsync", "setNodeTemplateOperationCallable", "setNodeTemplateCallable"] }, + "SimulateMaintenanceEvent": { + "methods": ["simulateMaintenanceEventAsync", "simulateMaintenanceEventAsync", "simulateMaintenanceEventOperationCallable", "simulateMaintenanceEventCallable"] + }, "TestIamPermissions": { "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] } diff --git a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupsStub.java b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupsStub.java index 4e85cc7cee2d..043dfb2308c3 100644 --- a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupsStub.java +++ b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupsStub.java @@ -53,6 +53,7 @@ import com.google.cloud.compute.v1.Policy; import com.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest; import com.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest; +import com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest; import com.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest; import com.google.cloud.compute.v1.TestPermissionsResponse; import com.google.protobuf.TypeRegistry; @@ -686,6 +687,65 @@ public class HttpJsonNodeGroupsStub extends NodeGroupsStub { }) .build(); + private static final ApiMethodDescriptor + simulateMaintenanceEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.compute.v1.NodeGroups/SimulateMaintenanceEvent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "nodeGroup", request.getNodeGroup()); + serializer.putPathParam(fields, "project", request.getProject()); + serializer.putPathParam(fields, "zone", request.getZone()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + if (request.hasRequestId()) { + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + } + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "nodeGroupsSimulateMaintenanceEventRequestResource", + request + .getNodeGroupsSimulateMaintenanceEventRequestResource(), + false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (SimulateMaintenanceEventNodeGroupRequest request, Operation response) -> { + StringBuilder opName = new StringBuilder(response.getName()); + opName.append(":").append(request.getProject()); + opName.append(":").append(request.getZone()); + return HttpJsonOperationSnapshot.newBuilder() + .setName(opName.toString()) + .setMetadata(response) + .setDone(Status.DONE.equals(response.getStatus())) + .setResponse(response) + .setError(response.getHttpErrorStatusCode(), response.getHttpErrorMessage()) + .build(); + }) + .build(); + private static final ApiMethodDescriptor< TestIamPermissionsNodeGroupRequest, TestPermissionsResponse> testIamPermissionsMethodDescriptor = @@ -759,6 +819,10 @@ public class HttpJsonNodeGroupsStub extends NodeGroupsStub { private final UnaryCallable setNodeTemplateCallable; private final OperationCallable setNodeTemplateOperationCallable; + private final UnaryCallable + simulateMaintenanceEventCallable; + private final OperationCallable + simulateMaintenanceEventOperationCallable; private final UnaryCallable testIamPermissionsCallable; @@ -869,6 +933,12 @@ protected HttpJsonNodeGroupsStub( .setMethodDescriptor(setNodeTemplateMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + simulateMaintenanceEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(simulateMaintenanceEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings testIamPermissionsTransportSettings = HttpJsonCallSettings @@ -958,6 +1028,17 @@ protected HttpJsonNodeGroupsStub( settings.setNodeTemplateOperationSettings(), clientContext, httpJsonOperationsStub); + this.simulateMaintenanceEventCallable = + callableFactory.createUnaryCallable( + simulateMaintenanceEventTransportSettings, + settings.simulateMaintenanceEventSettings(), + clientContext); + this.simulateMaintenanceEventOperationCallable = + callableFactory.createOperationCallable( + simulateMaintenanceEventTransportSettings, + settings.simulateMaintenanceEventOperationSettings(), + clientContext, + httpJsonOperationsStub); this.testIamPermissionsCallable = callableFactory.createUnaryCallable( testIamPermissionsTransportSettings, @@ -983,6 +1064,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(patchMethodDescriptor); methodDescriptors.add(setIamPolicyMethodDescriptor); methodDescriptors.add(setNodeTemplateMethodDescriptor); + methodDescriptors.add(simulateMaintenanceEventMethodDescriptor); methodDescriptors.add(testIamPermissionsMethodDescriptor); return methodDescriptors; } @@ -1098,6 +1180,18 @@ public UnaryCallable setNodeTemplate return setNodeTemplateOperationCallable; } + @Override + public UnaryCallable + simulateMaintenanceEventCallable() { + return simulateMaintenanceEventCallable; + } + + @Override + public OperationCallable + simulateMaintenanceEventOperationCallable() { + return simulateMaintenanceEventOperationCallable; + } + @Override public UnaryCallable testIamPermissionsCallable() { diff --git a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupsStub.java b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupsStub.java index a14ba1938600..65a0266f7480 100644 --- a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupsStub.java +++ b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupsStub.java @@ -41,6 +41,7 @@ import com.google.cloud.compute.v1.Policy; import com.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest; import com.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest; +import com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest; import com.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest; import com.google.cloud.compute.v1.TestPermissionsResponse; import javax.annotation.Generated; @@ -144,6 +145,17 @@ public UnaryCallable setNodeTemplate throw new UnsupportedOperationException("Not implemented: setNodeTemplateCallable()"); } + public OperationCallable + simulateMaintenanceEventOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: simulateMaintenanceEventOperationCallable()"); + } + + public UnaryCallable + simulateMaintenanceEventCallable() { + throw new UnsupportedOperationException("Not implemented: simulateMaintenanceEventCallable()"); + } + public UnaryCallable testIamPermissionsCallable() { throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); diff --git a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupsStubSettings.java b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupsStubSettings.java index 50e7d1dadd7e..92cef9f84faf 100644 --- a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupsStubSettings.java +++ b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupsStubSettings.java @@ -66,6 +66,7 @@ import com.google.cloud.compute.v1.Policy; import com.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest; import com.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest; +import com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest; import com.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest; import com.google.cloud.compute.v1.TestPermissionsResponse; import com.google.common.collect.ImmutableList; @@ -154,6 +155,11 @@ public class NodeGroupsStubSettings extends StubSettings setNodeTemplateSettings; private final OperationCallSettings setNodeTemplateOperationSettings; + private final UnaryCallSettings + simulateMaintenanceEventSettings; + private final OperationCallSettings< + SimulateMaintenanceEventNodeGroupRequest, Operation, Operation> + simulateMaintenanceEventOperationSettings; private final UnaryCallSettings testIamPermissionsSettings; @@ -439,6 +445,18 @@ public UnaryCallSettings setNodeTemp return setNodeTemplateOperationSettings; } + /** Returns the object with the settings used for calls to simulateMaintenanceEvent. */ + public UnaryCallSettings + simulateMaintenanceEventSettings() { + return simulateMaintenanceEventSettings; + } + + /** Returns the object with the settings used for calls to simulateMaintenanceEvent. */ + public OperationCallSettings + simulateMaintenanceEventOperationSettings() { + return simulateMaintenanceEventOperationSettings; + } + /** Returns the object with the settings used for calls to testIamPermissions. */ public UnaryCallSettings testIamPermissionsSettings() { @@ -539,6 +557,9 @@ protected NodeGroupsStubSettings(Builder settingsBuilder) throws IOException { setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); setNodeTemplateSettings = settingsBuilder.setNodeTemplateSettings().build(); setNodeTemplateOperationSettings = settingsBuilder.setNodeTemplateOperationSettings().build(); + simulateMaintenanceEventSettings = settingsBuilder.simulateMaintenanceEventSettings().build(); + simulateMaintenanceEventOperationSettings = + settingsBuilder.simulateMaintenanceEventOperationSettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); } @@ -579,6 +600,11 @@ public static class Builder extends StubSettings.Builder setNodeTemplateOperationSettings; + private final UnaryCallSettings.Builder + simulateMaintenanceEventSettings; + private final OperationCallSettings.Builder< + SimulateMaintenanceEventNodeGroupRequest, Operation, Operation> + simulateMaintenanceEventOperationSettings; private final UnaryCallSettings.Builder< TestIamPermissionsNodeGroupRequest, TestPermissionsResponse> testIamPermissionsSettings; @@ -650,6 +676,8 @@ protected Builder(ClientContext clientContext) { setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setNodeTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setNodeTemplateOperationSettings = OperationCallSettings.newBuilder(); + simulateMaintenanceEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + simulateMaintenanceEventOperationSettings = OperationCallSettings.newBuilder(); testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = @@ -666,6 +694,7 @@ protected Builder(ClientContext clientContext) { patchSettings, setIamPolicySettings, setNodeTemplateSettings, + simulateMaintenanceEventSettings, testIamPermissionsSettings); initDefaults(this); } @@ -691,6 +720,9 @@ protected Builder(NodeGroupsStubSettings settings) { setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); setNodeTemplateSettings = settings.setNodeTemplateSettings.toBuilder(); setNodeTemplateOperationSettings = settings.setNodeTemplateOperationSettings.toBuilder(); + simulateMaintenanceEventSettings = settings.simulateMaintenanceEventSettings.toBuilder(); + simulateMaintenanceEventOperationSettings = + settings.simulateMaintenanceEventOperationSettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); unaryMethodSettingsBuilders = @@ -707,6 +739,7 @@ protected Builder(NodeGroupsStubSettings settings) { patchSettings, setIamPolicySettings, setNodeTemplateSettings, + simulateMaintenanceEventSettings, testIamPermissionsSettings); } @@ -784,6 +817,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .simulateMaintenanceEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder .testIamPermissionsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) @@ -933,6 +971,31 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(600000L)) .build())); + builder + .simulateMaintenanceEventOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Operation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Operation.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(20000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build())); + return builder; } @@ -1065,6 +1128,21 @@ public UnaryCallSettings.Builder setIamPol return setNodeTemplateOperationSettings; } + /** Returns the builder for the settings used for calls to simulateMaintenanceEvent. */ + public UnaryCallSettings.Builder + simulateMaintenanceEventSettings() { + return simulateMaintenanceEventSettings; + } + + /** Returns the builder for the settings used for calls to simulateMaintenanceEvent. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + SimulateMaintenanceEventNodeGroupRequest, Operation, Operation> + simulateMaintenanceEventOperationSettings() { + return simulateMaintenanceEventOperationSettings; + } + /** Returns the builder for the settings used for calls to testIamPermissions. */ public UnaryCallSettings.Builder testIamPermissionsSettings() { diff --git a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/NodeGroupsClientTest.java b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/NodeGroupsClientTest.java index bffcc6567192..d1780446fd1f 100644 --- a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/NodeGroupsClientTest.java +++ b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/NodeGroupsClientTest.java @@ -858,6 +858,87 @@ public void setNodeTemplateExceptionTest() throws Exception { } } + @Test + public void simulateMaintenanceEventTest() throws Exception { + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId("clientOperationId-1230366697") + .setCreationTimestamp("creationTimestamp-370203401") + .setDescription("description-1724546052") + .setEndTime("endTime-1607243192") + .setError(Error.newBuilder().build()) + .setHttpErrorMessage("httpErrorMessage1577303431") + .setHttpErrorStatusCode(0) + .setId(3355) + .setInsertTime("insertTime966165798") + .setKind("kind3292052") + .setName("name3373707") + .setOperationGroupId("operationGroupId1716161683") + .setOperationType("operationType91999553") + .setProgress(-1001078227) + .setRegion("region-934795532") + .setSelfLink("selfLink1191800166") + .setStartTime("startTime-2129294769") + .setStatus(Status.DONE) + .setStatusMessage("statusMessage-958704715") + .setTargetId(-815576439) + .setTargetLink("targetLink486368555") + .setUser("user3599307") + .addAllWarnings(new ArrayList()) + .setZone("zone3744684") + .build(); + mockService.addResponse(expectedResponse); + + String project = "project-6911"; + String zone = "zone-5246"; + String nodeGroup = "nodeGroup-5245"; + NodeGroupsSimulateMaintenanceEventRequest nodeGroupsSimulateMaintenanceEventRequestResource = + NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build(); + + Operation actualResponse = + client + .simulateMaintenanceEventAsync( + project, zone, nodeGroup, nodeGroupsSimulateMaintenanceEventRequestResource) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void simulateMaintenanceEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String project = "project-6911"; + String zone = "zone-5246"; + String nodeGroup = "nodeGroup-5245"; + NodeGroupsSimulateMaintenanceEventRequest nodeGroupsSimulateMaintenanceEventRequestResource = + NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build(); + client + .simulateMaintenanceEventAsync( + project, zone, nodeGroup, nodeGroupsSimulateMaintenanceEventRequestResource) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void testIamPermissionsTest() throws Exception { TestPermissionsResponse expectedResponse = diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Compute.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Compute.java index 82884aace5ca..7fb63214f290 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Compute.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Compute.java @@ -3443,6 +3443,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_compute_v1_NodeGroupsSetNodeTemplateRequest_descriptor; static com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_compute_v1_NodeGroupsSetNodeTemplateRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_descriptor; + static com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_fieldAccessorTable; static com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_compute_v1_NodeTemplate_descriptor; static com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -4863,6 +4867,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_compute_v1_SimulateMaintenanceEventInstanceRequest_descriptor; static com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_compute_v1_SimulateMaintenanceEventInstanceRequest_fieldAccessorTable; + static com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_descriptor; + static com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_fieldAccessorTable; static com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_compute_v1_Snapshot_descriptor; static com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -8429,2211 +8437,2204 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005value\030\361\242\2625 \001(\tH\002\210\001\001B\006\n\004_keyB\014\n\n_namespa" + "ceB\010\n\006_value\"W\n\024GuestAttributesValue\022?\n\005" + "items\030\300\317\367/ \003(\0132-.google.cloud.compute.v1" - + ".GuestAttributesEntry\"\234\002\n\016GuestOsFeature" - + "\022\024\n\004type\030\272\236\332\001 \001(\tH\000\210\001\001\"\352\001\n\004Type\022\022\n\016UNDEF" + + ".GuestAttributesEntry\"\271\002\n\016GuestOsFeature" + + "\022\024\n\004type\030\272\236\332\001 \001(\tH\000\210\001\001\"\207\002\n\004Type\022\022\n\016UNDEF" + "INED_TYPE\020\000\022 \n\030FEATURE_TYPE_UNSPECIFIED\020" + "\333\277\310\375\001\022\014\n\005GVNIC\020\231\225\303 \022\026\n\017MULTI_IP_SUBNET\020\317" + "\333\257H\022\023\n\013SECURE_BOOT\020\272\335\326\263\001\022\022\n\013SEV_CAPABLE\020" - + "\221\226\303)\022\025\n\017SEV_SNP_CAPABLE\020\247\207\032\022\026\n\017UEFI_COMP" - + "ATIBLE\020\300\326\262]\022\035\n\026VIRTIO_SCSI_MULTIQUEUE\020\215\301" - + "\220`\022\017\n\007WINDOWS\020\343\334\354\331\001B\007\n\005_type\"\203\004\n\020HTTP2He" - + "althCheck\022\024\n\004host\030\250\353\303\001 \001(\tH\000\210\001\001\022\024\n\004port\030" - + "\201\261\322\001 \001(\005H\001\210\001\001\022\031\n\tport_name\030\211\207\347\023 \001(\tH\002\210\001\001" - + "\022\"\n\022port_specification\030\305\353\314\030 \001(\tH\003\210\001\001\022\034\n\014" - + "proxy_header\030\376\272\274L \001(\tH\004\210\001\001\022\034\n\014request_pa" - + "th\030\325\327\261m \001(\tH\005\210\001\001\022\030\n\010response\030\301\250\334] \001(\tH\006\210" - + "\001\001\"~\n\021PortSpecification\022 \n\034UNDEFINED_POR" - + "T_SPECIFICATION\020\000\022\025\n\016USE_FIXED_PORT\020\344\210\333Z" - + "\022\026\n\016USE_NAMED_PORT\020\277\317\307\246\001\022\030\n\020USE_SERVING_" - + "PORT\020\314\321\365\254\001\"H\n\013ProxyHeader\022\032\n\026UNDEFINED_P" - + "ROXY_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254" - + "\244\267\237\001B\007\n\005_hostB\007\n\005_portB\014\n\n_port_nameB\025\n\023" - + "_port_specificationB\017\n\r_proxy_headerB\017\n\r" - + "_request_pathB\013\n\t_response\"\202\004\n\017HTTPHealt" - + "hCheck\022\024\n\004host\030\250\353\303\001 \001(\tH\000\210\001\001\022\024\n\004port\030\201\261\322" - + "\001 \001(\005H\001\210\001\001\022\031\n\tport_name\030\211\207\347\023 \001(\tH\002\210\001\001\022\"\n" - + "\022port_specification\030\305\353\314\030 \001(\tH\003\210\001\001\022\034\n\014pro" - + "xy_header\030\376\272\274L \001(\tH\004\210\001\001\022\034\n\014request_path\030" - + "\325\327\261m \001(\tH\005\210\001\001\022\030\n\010response\030\301\250\334] \001(\tH\006\210\001\001\"" - + "~\n\021PortSpecification\022 \n\034UNDEFINED_PORT_S", - "PECIFICATION\020\000\022\025\n\016USE_FIXED_PORT\020\344\210\333Z\022\026\n" - + "\016USE_NAMED_PORT\020\277\317\307\246\001\022\030\n\020USE_SERVING_POR" - + "T\020\314\321\365\254\001\"H\n\013ProxyHeader\022\032\n\026UNDEFINED_PROX" - + "Y_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237" - + "\001B\007\n\005_hostB\007\n\005_portB\014\n\n_port_nameB\025\n\023_po" - + "rt_specificationB\017\n\r_proxy_headerB\017\n\r_re" - + "quest_pathB\013\n\t_response\"\203\004\n\020HTTPSHealthC" - + "heck\022\024\n\004host\030\250\353\303\001 \001(\tH\000\210\001\001\022\024\n\004port\030\201\261\322\001 " - + "\001(\005H\001\210\001\001\022\031\n\tport_name\030\211\207\347\023 \001(\tH\002\210\001\001\022\"\n\022p" - + "ort_specification\030\305\353\314\030 \001(\tH\003\210\001\001\022\034\n\014proxy" - + "_header\030\376\272\274L \001(\tH\004\210\001\001\022\034\n\014request_path\030\325\327" - + "\261m \001(\tH\005\210\001\001\022\030\n\010response\030\301\250\334] \001(\tH\006\210\001\001\"~\n" - + "\021PortSpecification\022 \n\034UNDEFINED_PORT_SPE" - + "CIFICATION\020\000\022\025\n\016USE_FIXED_PORT\020\344\210\333Z\022\026\n\016U" - + "SE_NAMED_PORT\020\277\317\307\246\001\022\030\n\020USE_SERVING_PORT\020" - + "\314\321\365\254\001\"H\n\013ProxyHeader\022\032\n\026UNDEFINED_PROXY_" - + "HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237\001B" - + "\007\n\005_hostB\007\n\005_portB\014\n\n_port_nameB\025\n\023_port" - + "_specificationB\017\n\r_proxy_headerB\017\n\r_requ" - + "est_pathB\013\n\t_response\"\303\n\n\013HealthCheck\022#\n" - + "\022check_interval_sec\030\256\257\343\244\001 \001(\005H\000\210\001\001\022\"\n\022cr" - + "eation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013descri" - + "ption\030\374\207\326\311\001 \001(\tH\002\210\001\001\022K\n\021grpc_health_chec" - + "k\030\346\247\344( \001(\0132(.google.cloud.compute.v1.GRP" - + "CHealthCheckH\003\210\001\001\022\"\n\021healthy_threshold\030\311" - + "\220\242\300\001 \001(\005H\004\210\001\001\022M\n\022http2_health_check\030\332\265\265\005" - + " \001(\0132).google.cloud.compute.v1.HTTP2Heal" - + "thCheckH\005\210\001\001\022L\n\021http_health_check\030\274\247\336\304\001 " - + "\001(\0132(.google.cloud.compute.v1.HTTPHealth" - + "CheckH\006\210\001\001\022N\n\022https_health_check\030\271\230\366\317\001 \001" - + "(\0132).google.cloud.compute.v1.HTTPSHealth" - + "CheckH\007\210\001\001\022\020\n\002id\030\233\032 \001(\004H\010\210\001\001\022\024\n\004kind\030\224\367\310" - + "\001 \001(\tH\t\210\001\001\022J\n\nlog_config\030\235\321\301\247\001 \001(\0132-.goo" - + "gle.cloud.compute.v1.HealthCheckLogConfi" - + "gH\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\013\210\001\001\022\026\n\006region\030\364" - + "\315\240B \001(\tH\014\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\r\210\001\001" - + "\022J\n\020ssl_health_check\030\270\351\303\205\001 \001(\0132\'.google." - + "cloud.compute.v1.SSLHealthCheckH\016\210\001\001\022J\n\020" - + "tcp_health_check\030\203\252\215\340\001 \001(\0132\'.google.clou" - + "d.compute.v1.TCPHealthCheckH\017\210\001\001\022\033\n\013time" - + "out_sec\030\363\300\222& \001(\005H\020\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\tH\021" - + "\210\001\001\022#\n\023unhealthy_threshold\030\320\275\331l \001(\005H\022\210\001\001" - + "\"w\n\004Type\022\022\n\016UNDEFINED_TYPE\020\000\022\013\n\004GRPC\020\236\210\206" - + "\001\022\013\n\004HTTP\020\210\201\210\001\022\014\n\005HTTP2\020\252\241\370 \022\014\n\005HTTPS\020\313\241" - + "\370 \022\017\n\007INVALID\020\327\373\355\374\001\022\t\n\003SSL\020\354\203\005\022\t\n\003TCP\020\301\207" - + "\005B\025\n\023_check_interval_secB\025\n\023_creation_ti" - + "mestampB\016\n\014_descriptionB\024\n\022_grpc_health_" - + "checkB\024\n\022_healthy_thresholdB\025\n\023_http2_he" - + "alth_checkB\024\n\022_http_health_checkB\025\n\023_htt" - + "ps_health_checkB\005\n\003_idB\007\n\005_kindB\r\n\013_log_" - + "configB\007\n\005_nameB\t\n\007_regionB\014\n\n_self_link" - + "B\023\n\021_ssl_health_checkB\023\n\021_tcp_health_che" - + "ckB\016\n\014_timeout_secB\007\n\005_typeB\026\n\024_unhealth" - + "y_threshold\"\247\002\n\017HealthCheckList\022\020\n\002id\030\233\032" - + " \001(\tH\000\210\001\001\0226\n\005items\030\300\317\367/ \003(\0132$.google.clo" - + "ud.compute.v1.HealthCheck\022\024\n\004kind\030\224\367\310\001 \001" - + "(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001" - + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030" - + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" - + "ngH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_to" - + "kenB\014\n\n_self_linkB\n\n\010_warning\":\n\024HealthC" - + "heckLogConfig\022\027\n\006enable\030\203\313\324\224\001 \001(\010H\000\210\001\001B\t" - + "\n\007_enable\"F\n\024HealthCheckReference\022\035\n\014hea" - + "lth_check\030\345\252\244\223\001 \001(\tH\000\210\001\001B\017\n\r_health_chec" - + "k\"\374\004\n\022HealthCheckService\022\"\n\022creation_tim" - + "estamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311" - + "\001 \001(\tH\001\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\002\210\001\001\022" - + "\031\n\rhealth_checks\030\256\257\346\325\001 \003(\t\0220\n health_sta" - + "tus_aggregation_policy\030\371\354\333x \001(\tH\003\210\001\001\022\020\n\002" - + "id\030\233\032 \001(\004H\004\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022\024\n\004" - + "name\030\213\365\315\001 \001(\tH\006\210\001\001\022\"\n\027network_endpoint_g" - + "roups\030\255\227\377\r \003(\t\022\"\n\026notification_endpoints" - + "\030\252\336\370\301\001 \003(\t\022\026\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022\032\n\tse" - + "lf_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\"r\n\035HealthStatusAg" - + "gregationPolicy\022.\n*UNDEFINED_HEALTH_STAT" - + "US_AGGREGATION_POLICY\020\000\022\t\n\003AND\020\267\373\003\022\026\n\016NO" - + "_AGGREGATION\020\304\222\254\313\001B\025\n\023_creation_timestam" - + "pB\016\n\014_descriptionB\016\n\014_fingerprintB#\n!_he" - + "alth_status_aggregation_policyB\005\n\003_idB\007\n" - + "\005_kindB\007\n\005_nameB\t\n\007_regionB\014\n\n_self_link" - + "\"]\n\033HealthCheckServiceReference\022%\n\024healt" - + "h_check_service\030\333\233\335\302\001 \001(\tH\000\210\001\001B\027\n\025_healt" - + "h_check_service\"\266\002\n\027HealthCheckServicesL" - + "ist\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022=\n\005items\030\300\317\367/ \003(\0132" - + "+.google.cloud.compute.v1.HealthCheckSer" - + "vice\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_" - + "token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001" - + "(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clo" - + "ud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_ki" - + "ndB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010" - + "_warning\"\304\003\n\032HealthChecksAggregatedList\022" - + "\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022P\n\005items\030\300\317\367/ \003(\0132>.go" - + "ogle.cloud.compute.v1.HealthChecksAggreg" - + "atedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001" - + "\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tse" - + "lf_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237" - + "\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clo" - + "ud.compute.v1.WarningH\004\210\001\001\032]\n\nItemsEntry" - + "\022\013\n\003key\030\001 \001(\t\022>\n\005value\030\002 \001(\0132/.google.cl" - + "oud.compute.v1.HealthChecksScopedList:\0028" - + "\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n" - + "\n_self_linkB\n\n\010_warning\"\240\001\n\026HealthChecks" - + "ScopedList\022?\n\rhealth_checks\030\256\257\346\325\001 \003(\0132$." - + "google.cloud.compute.v1.HealthCheck\0229\n\007w" - + "arning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v" - + "1.WarningH\000\210\001\001B\n\n\010_warning\"\325\005\n\014HealthSta" - + "tus\022N\n\013annotations\030\244\366\2655 \003(\01326.google.clo" - + "ud.compute.v1.HealthStatus.AnnotationsEn" - + "try\022 \n\017forwarding_rule\030\376\245\335\200\001 \001(\tH\000\210\001\001\022\"\n" - + "\022forwarding_rule_ip\030\210\254\221R \001(\tH\001\210\001\001\022\035\n\014hea" - + "lth_state\030\356\351\277\232\001 \001(\tH\002\210\001\001\022\030\n\010instance\030\225\251\332" - + "\010 \001(\tH\003\210\001\001\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH\004\210\001\001\022" - + "\024\n\004port\030\201\261\322\001 \001(\005H\005\210\001\001\022\027\n\006weight\030\370\204\305\206\001 \001(" - + "\tH\006\210\001\001\022\035\n\014weight_error\030\201\373\222\371\001 \001(\tH\007\210\001\001\0322\n" - + "\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - + "\002 \001(\t:\0028\001\"M\n\013HealthState\022\032\n\026UNDEFINED_HE" - + "ALTH_STATE\020\000\022\017\n\007HEALTHY\020\375\252\333\321\001\022\021\n\tUNHEALT" - + "HY\020\304\271\255\334\001\"\212\001\n\013WeightError\022\032\n\026UNDEFINED_WE" - + "IGHT_ERROR\020\000\022\026\n\016INVALID_WEIGHT\020\340\213\373\266\001\022\026\n\016" - + "MISSING_WEIGHT\020\221\227\217\267\001\022\032\n\022UNAVAILABLE_WEIG" - + "HT\020\347\342\306\321\001\022\023\n\013WEIGHT_NONE\020\237\351\311\357\001B\022\n\020_forwar" - + "ding_ruleB\025\n\023_forwarding_rule_ipB\017\n\r_hea" - + "lth_stateB\013\n\t_instanceB\r\n\013_ip_addressB\007\n" - + "\005_portB\t\n\007_weightB\017\n\r_weight_error\"\347\004\n\036H" - + "ealthStatusForNetworkEndpoint\022R\n\017backend" - + "_service\030\212\300\256\222\001 \001(\01320.google.cloud.comput" - + "e.v1.BackendServiceReferenceH\000\210\001\001\022R\n\017for" - + "warding_rule\030\376\245\335\200\001 \001(\01320.google.cloud.co" - + "mpute.v1.ForwardingRuleReferenceH\001\210\001\001\022L\n" - + "\014health_check\030\345\252\244\223\001 \001(\0132-.google.cloud.c" - + "ompute.v1.HealthCheckReferenceH\002\210\001\001\022[\n\024h" - + "ealth_check_service\030\333\233\335\302\001 \001(\01324.google.c" - + "loud.compute.v1.HealthCheckServiceRefere" - + "nceH\003\210\001\001\022\035\n\014health_state\030\356\351\277\232\001 \001(\tH\004\210\001\001\"" - + "p\n\013HealthState\022\032\n\026UNDEFINED_HEALTH_STATE" - + "\020\000\022\020\n\010DRAINING\020\352\325\214\345\001\022\017\n\007HEALTHY\020\375\252\333\321\001\022\021\n" - + "\tUNHEALTHY\020\304\271\255\334\001\022\017\n\007UNKNOWN\020\252\360\304\316\001B\022\n\020_ba" - + "ckend_serviceB\022\n\020_forwarding_ruleB\017\n\r_he" - + "alth_checkB\027\n\025_health_check_serviceB\017\n\r_" - + "health_state\";\n\004Help\0223\n\005links\030\271\237\2151 \003(\0132!" - + ".google.cloud.compute.v1.HelpLink\"T\n\010Hel" - + "pLink\022\034\n\013description\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\022\n\003u" - + "rl\030\357\212\007 \001(\tH\001\210\001\001B\016\n\014_descriptionB\006\n\004_url\"" - + "z\n\010HostRule\022\034\n\013description\030\374\207\326\311\001 \001(\tH\000\210\001" - + "\001\022\020\n\005hosts\030\313\377\266/ \003(\t\022\035\n\014path_matcher\030\230\276\212\241" - + "\001 \001(\tH\001\210\001\001B\016\n\014_descriptionB\017\n\r_path_matc" - + "her\"i\n\016HttpFaultAbort\022\034\n\013http_status\030\211\267\316" - + "\337\001 \001(\rH\000\210\001\001\022\032\n\npercentage\030\232\345\267H \001(\001H\001\210\001\001B" - + "\016\n\014_http_statusB\r\n\013_percentage\"\214\001\n\016HttpF" - + "aultDelay\022?\n\013fixed_delay\030\370\271\226\227\001 \001(\0132!.goo" - + "gle.cloud.compute.v1.DurationH\000\210\001\001\022\032\n\npe" - + "rcentage\030\232\345\267H \001(\001H\001\210\001\001B\016\n\014_fixed_delayB\r" - + "\n\013_percentage\"\250\001\n\022HttpFaultInjection\022>\n\005" - + "abort\030\260\306\224, \001(\0132\'.google.cloud.compute.v1" - + ".HttpFaultAbortH\000\210\001\001\022>\n\005delay\030\203\363\302- \001(\0132\'" - + ".google.cloud.compute.v1.HttpFaultDelayH" - + "\001\210\001\001B\010\n\006_abortB\010\n\006_delay\"\374\001\n\020HttpHeaderA" - + "ction\022L\n\026request_headers_to_add\030\346\256\261\" \003(\013" - + "2).google.cloud.compute.v1.HttpHeaderOpt" - + "ion\022$\n\031request_headers_to_remove\030\237\317\223h \003(" - + "\t\022M\n\027response_headers_to_add\030\364\266\251\017 \003(\0132)." - + "google.cloud.compute.v1.HttpHeaderOption" - + "\022%\n\032response_headers_to_remove\030\321\201\373# \003(\t\"" - + "\260\003\n\017HttpHeaderMatch\022\034\n\013exact_match\030\205\231\234\332\001" - + " \001(\tH\000\210\001\001\022\033\n\013header_name\030\375\301\3074 \001(\tH\001\210\001\001\022\035" - + "\n\014invert_match\030\234\310\372\356\001 \001(\010H\002\210\001\001\022\034\n\014prefix_" - + "match\030\330\363\374z \001(\tH\003\210\001\001\022\035\n\rpresent_match\030\301\372\223" - + " \001(\010H\004\210\001\001\022E\n\013range_match\030\303\250\257. \001(\0132(.goo" - + "gle.cloud.compute.v1.Int64RangeMatchH\005\210\001" - + "\001\022\033\n\013regex_match\030\315\267\2323 \001(\tH\006\210\001\001\022\035\n\014suffix" - + "_match\030\327\346\256\313\001 \001(\tH\007\210\001\001B\016\n\014_exact_matchB\016\n" - + "\014_header_nameB\017\n\r_invert_matchB\017\n\r_prefi" - + "x_matchB\020\n\016_present_matchB\016\n\014_range_matc" - + "hB\016\n\014_regex_matchB\017\n\r_suffix_match\"\223\001\n\020H" - + "ttpHeaderOption\022\033\n\013header_name\030\375\301\3074 \001(\tH" - + "\000\210\001\001\022\034\n\014header_value\030\277\362\353` \001(\tH\001\210\001\001\022\027\n\007re" - + "place\030\264\345\362\t \001(\010H\002\210\001\001B\016\n\014_header_nameB\017\n\r_" - + "header_valueB\n\n\010_replace\"\304\001\n\027HttpQueryPa" - + "rameterMatch\022\034\n\013exact_match\030\205\231\234\332\001 \001(\tH\000\210" - + "\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001\001\022\035\n\rpresent_matc" - + "h\030\301\372\223 \001(\010H\002\210\001\001\022\033\n\013regex_match\030\315\267\2323 \001(\tH" - + "\003\210\001\001B\016\n\014_exact_matchB\007\n\005_nameB\020\n\016_presen" - + "t_matchB\016\n\014_regex_match\"\214\004\n\022HttpRedirect" - + "Action\022\035\n\rhost_redirect\030\223\241\2343 \001(\tH\000\210\001\001\022\036\n" - + "\016https_redirect\030\260\361\227Q \001(\010H\001\210\001\001\022\036\n\rpath_re" - + "direct\030\266\275\356\201\001 \001(\tH\002\210\001\001\022 \n\017prefix_redirect" - + "\030\351\365\340\324\001 \001(\tH\003\210\001\001\022\'\n\026redirect_response_cod" - + "e\030\210\330\236\320\001 \001(\tH\004\210\001\001\022\033\n\013strip_query\030\341\231\367\030 \001(\010" - + "H\005\210\001\001\"\270\001\n\024RedirectResponseCode\022$\n UNDEFI" - + "NED_REDIRECT_RESPONSE_CODE\020\000\022\014\n\005FOUND\020\342\276" - + "\376\037\022!\n\031MOVED_PERMANENTLY_DEFAULT\020\321\231\262\270\001\022\032\n" - + "\022PERMANENT_REDIRECT\020\355\350\223\266\001\022\021\n\tSEE_OTHER\020\344" - + "\357\257\324\001\022\032\n\022TEMPORARY_REDIRECT\020\252\344\267\351\001B\020\n\016_hos" - + "t_redirectB\021\n\017_https_redirectB\020\n\016_path_r" - + "edirectB\022\n\020_prefix_redirectB\031\n\027_redirect" - + "_response_codeB\016\n\014_strip_query\"\264\001\n\017HttpR" - + "etryPolicy\022\033\n\013num_retries\030\215\253\201x \001(\rH\000\210\001\001\022" - + "C\n\017per_try_timeout\030\273\255\304\205\001 \001(\0132!.google.cl" - + "oud.compute.v1.DurationH\001\210\001\001\022\033\n\020retry_co" - + "nditions\030\257\341\336\r \003(\tB\016\n\014_num_retriesB\022\n\020_pe" - + "r_try_timeout\"\361\005\n\017HttpRouteAction\022A\n\013cor" - + "s_policy\030\204\314\235\276\001 \001(\0132#.google.cloud.comput" - + "e.v1.CorsPolicyH\000\210\001\001\022T\n\026fault_injection_" - + "policy\030\227\224\352\304\001 \001(\0132+.google.cloud.compute." - + "v1.HttpFaultInjectionH\001\210\001\001\022F\n\023max_stream" - + "_duration\030\230\245\245\035 \001(\0132!.google.cloud.comput" - + "e.v1.DurationH\002\210\001\001\022S\n\025request_mirror_pol" - + "icy\030\202\340\377h \001(\0132,.google.cloud.compute.v1.R" - + "equestMirrorPolicyH\003\210\001\001\022F\n\014retry_policy\030" - + "\251\345\212\033 \001(\0132(.google.cloud.compute.v1.HttpR" - + "etryPolicyH\004\210\001\001\022;\n\007timeout\030\341\232\275\215\001 \001(\0132!.g" - + "oogle.cloud.compute.v1.DurationH\005\210\001\001\022A\n\013" - + "url_rewrite\030\274\375\252\202\001 \001(\0132#.google.cloud.com" - + "pute.v1.UrlRewriteH\006\210\001\001\022V\n\031weighted_back" - + "end_services\030\321\307\332\240\001 \003(\0132/.google.cloud.co" - + "mpute.v1.WeightedBackendServiceB\016\n\014_cors" - + "_policyB\031\n\027_fault_injection_policyB\026\n\024_m" - + "ax_stream_durationB\030\n\026_request_mirror_po" - + "licyB\017\n\r_retry_policyB\n\n\010_timeoutB\016\n\014_ur" - + "l_rewrite\"\345\003\n\rHttpRouteRule\022\034\n\013descripti" - + "on\030\374\207\326\311\001 \001(\tH\000\210\001\001\022I\n\rheader_action\030\250\240\270\234\001" - + " \001(\0132).google.cloud.compute.v1.HttpHeade" - + "rActionH\001\210\001\001\022D\n\013match_rules\030\375\273\261\263\001 \003(\0132+." - + "google.cloud.compute.v1.HttpRouteRuleMat" - + "ch\022\031\n\010priority\030\244\363\241\324\001 \001(\005H\002\210\001\001\022G\n\014route_a" - + "ction\030\354\251\271\312\001 \001(\0132(.google.cloud.compute.v" - + "1.HttpRouteActionH\003\210\001\001\022\030\n\007service\030\265\215\217\262\001 " - + "\001(\tH\004\210\001\001\022J\n\014url_redirect\030\254\241\230\301\001 \001(\0132+.goo" - + "gle.cloud.compute.v1.HttpRedirectActionH" - + "\005\210\001\001B\016\n\014_descriptionB\020\n\016_header_actionB\013" - + "\n\t_priorityB\017\n\r_route_actionB\n\n\010_service" - + "B\017\n\r_url_redirect\"\267\003\n\022HttpRouteRuleMatch" - + "\022\037\n\017full_path_match\030\333\211\252f \001(\tH\000\210\001\001\022D\n\016hea" - + "der_matches\030\201\353\310\254\001 \003(\0132(.google.cloud.com" - + "pute.v1.HttpHeaderMatch\022\034\n\013ignore_case\030\375" - + "\222\264\335\001 \001(\010H\001\210\001\001\022E\n\020metadata_filters\030\353\315\314\335\001 " - + "\003(\0132\'.google.cloud.compute.v1.MetadataFi" - + "lter\022\034\n\014prefix_match\030\330\363\374z \001(\tH\002\210\001\001\022U\n\027qu" - + "ery_parameter_matches\030\346\225\276\210\001 \003(\01320.google" - + ".cloud.compute.v1.HttpQueryParameterMatc" - + "h\022\033\n\013regex_match\030\315\267\2323 \001(\tH\003\210\001\001B\022\n\020_full_" - + "path_matchB\016\n\014_ignore_caseB\017\n\r_prefix_ma" - + "tchB\016\n\014_regex_match\"\272\021\n\005Image\022\035\n\014archite" - + "cture\030\323\322\261\220\001 \001(\tH\000\210\001\001\022#\n\022archive_size_byt" - + "es\030\312\214\334\265\001 \001(\003H\001\210\001\001\022\"\n\022creation_timestamp\030" - + "\266\217\307\016 \001(\tH\002\210\001\001\022G\n\ndeprecated\030\263\313\321\365\001 \001(\0132*." - + "google.cloud.compute.v1.DeprecationStatu" - + "sH\003\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\004\210\001\001\022\035\n\014" - + "disk_size_gb\030\267\232\347\226\001 \001(\003H\005\210\001\001\022\027\n\006family\030\344\266" - + "\341\234\001 \001(\tH\006\210\001\001\022E\n\021guest_os_features\030\321\340\347% \003" - + "(\0132\'.google.cloud.compute.v1.GuestOsFeat" - + "ure\022\020\n\002id\030\233\032 \001(\004H\007\210\001\001\022U\n\024image_encryptio" - + "n_key\030\207\316\373\264\001 \001(\0132..google.cloud.compute.v" - + "1.CustomerEncryptionKeyH\010\210\001\001\022\024\n\004kind\030\224\367\310" - + "\001 \001(\tH\t\210\001\001\022!\n\021label_fingerprint\030\231\360\367T \001(\t" - + "H\n\210\001\001\022>\n\006labels\030\377\277\301\356\001 \003(\0132*.google.cloud" - + ".compute.v1.Image.LabelsEntry\022\030\n\rlicense" - + "_codes\030\250\205\330\025 \003(\003\022\024\n\010licenses\030\322\210\200\241\001 \003(\t\022\024\n" - + "\004name\030\213\365\315\001 \001(\tH\013\210\001\001\022;\n\010raw_disk\030\324\316\363\357\001 \001(" - + "\0132 .google.cloud.compute.v1.RawDiskH\014\210\001\001" - + "\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001(\010H\r\210\001\001\022\032\n\tself" - + "_link\030\215\222\305\331\001 \001(\tH\016\210\001\001\022\\\n\037shielded_instanc" - + "e_initial_state\030\203\304\334[ \001(\0132+.google.cloud." - + "compute.v1.InitialStateConfigH\017\210\001\001\022\034\n\013so" - + "urce_disk\030\301\356\264\327\001 \001(\tH\020\210\001\001\022[\n\032source_disk_" - + "encryption_key\030\341\240\270\375\001 \001(\0132..google.cloud." - + "compute.v1.CustomerEncryptionKeyH\021\210\001\001\022\037\n" - + "\016source_disk_id\030\331\315\311\330\001 \001(\tH\022\210\001\001\022\034\n\014source" - + "_image\030\267\350\206\030 \001(\tH\023\210\001\001\022\\\n\033source_image_enc" - + "ryption_key\030\253\221\365\265\001 \001(\0132..google.cloud.com" - + "pute.v1.CustomerEncryptionKeyH\024\210\001\001\022\037\n\017so" - + "urce_image_id\030\243\374\260\032 \001(\tH\025\210\001\001\022\037\n\017source_sn" - + "apshot\030\350\232\216< \001(\tH\026\210\001\001\022_\n\036source_snapshot_" - + "encryption_key\030\332\216\347\220\001 \001(\0132..google.cloud." - + "compute.v1.CustomerEncryptionKeyH\027\210\001\001\022\"\n" - + "\022source_snapshot_id\030\322\226\230/ \001(\tH\030\210\001\001\022\034\n\013sou" - + "rce_type\030\336\361\322\327\001 \001(\tH\031\210\001\001\022\026\n\006status\030\362\237\267V \001" - + "(\tH\032\210\001\001\022\035\n\021storage_locations\030\232\355\263\234\001 \003(\t\032-" - + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001\"j\n\014Architecture\022\032\n\026UNDEFINED_ARCHI" - + "TECTURE\020\000\022 \n\030ARCHITECTURE_UNSPECIFIED\020\253\324" - + "\235\274\001\022\014\n\005ARM64\020\372\313\351\035\022\016\n\006X86_64\020\307\244\346\312\001\"2\n\nSou" - + "rceType\022\031\n\025UNDEFINED_SOURCE_TYPE\020\000\022\t\n\003RA" - + "W\020\210\370\004\"^\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\020\n" - + "\010DELETING\020\250\247\207\374\001\022\016\n\006FAILED\020\275\220\246\331\001\022\016\n\007PENDI" - + "NG\020\367\252\360\020\022\014\n\005READY\020\203\303\217%B\017\n\r_architectureB\025" - + "\n\023_archive_size_bytesB\025\n\023_creation_times" - + "tampB\r\n\013_deprecatedB\016\n\014_descriptionB\017\n\r_" - + "disk_size_gbB\t\n\007_familyB\005\n\003_idB\027\n\025_image" - + "_encryption_keyB\007\n\005_kindB\024\n\022_label_finge" - + "rprintB\007\n\005_nameB\013\n\t_raw_diskB\020\n\016_satisfi" - + "es_pzsB\014\n\n_self_linkB\"\n _shielded_instan" - + "ce_initial_stateB\016\n\014_source_diskB\035\n\033_sou" - + "rce_disk_encryption_keyB\021\n\017_source_disk_" - + "idB\017\n\r_source_imageB\036\n\034_source_image_enc" - + "ryption_keyB\022\n\020_source_image_idB\022\n\020_sour" - + "ce_snapshotB!\n\037_source_snapshot_encrypti" - + "on_keyB\025\n\023_source_snapshot_idB\016\n\014_source" - + "_typeB\t\n\007_status\"R\n\017ImageFamilyView\0225\n\005i" - + "mage\030\333\322\352/ \001(\0132\036.google.cloud.compute.v1." - + "ImageH\000\210\001\001B\010\n\006_image\"\233\002\n\tImageList\022\020\n\002id" - + "\030\233\032 \001(\tH\000\210\001\001\0220\n\005items\030\300\317\367/ \003(\0132\036.google." - + "cloud.compute.v1.Image\022\024\n\004kind\030\224\367\310\001 \001(\tH" - + "\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n" - + "\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226" - + "\030 \001(\0132 .google.cloud.compute.v1.WarningH" - + "\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_token" - + "B\014\n\n_self_linkB\n\n\010_warning\"\216\002\n\022InitialSt" - + "ateConfig\0229\n\003dbs\030\265\207\006 \003(\0132*.google.cloud." - + "compute.v1.FileContentBuffer\022;\n\004dbxs\030\371\347\273" - + "\001 \003(\0132*.google.cloud.compute.v1.FileCont" - + "entBuffer\022;\n\004keks\030\302\330\310\001 \003(\0132*.google.clou" - + "d.compute.v1.FileContentBuffer\022<\n\002pk\030\373\033 " - + "\001(\0132*.google.cloud.compute.v1.FileConten" - + "tBufferH\000\210\001\001B\005\n\003_pk\"\312\001\n\024InsertAddressReq" - + "uest\022C\n\020address_resource\030\371\227\336\346\001 \001(\0132 .goo" - + "gle.cloud.compute.v1.AddressB\003\340A\002\022!\n\007pro" - + "ject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364" - + "\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021" - + " \001(\tH\000\210\001\001B\r\n\013_request_id\"\316\001\n\027InsertAutos" - + "calerRequest\022H\n\023autoscaler_resource\030\366\360\377b" - + " \001(\0132#.google.cloud.compute.v1.Autoscale" - + "rB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007projec" - + "t\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307" - + "\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\274\001\n\032In" - + "sertBackendBucketRequest\022P\n\027backend_buck" - + "et_resource\030\230\316\307\265\001 \001(\0132&.google.cloud.com" - + "pute.v1.BackendBucketB\003\340A\002\022!\n\007project\030\231\226" - + "\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021" - + " \001(\tH\000\210\001\001B\r\n\013_request_id\"\277\001\n\033InsertBacke" - + "ndServiceRequest\022R\n\030backend_service_reso" - + "urce\030\243\201\337\245\001 \001(\0132\'.google.cloud.compute.v1" - + ".BackendServiceB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" - + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" - + "\210\001\001B\r\n\013_request_id\"\353\001\n\021InsertDiskRequest" - + "\022<\n\rdisk_resource\030\360\320\253\014 \001(\0132\035.google.clou" - + "d.compute.v1.DiskB\003\340A\002\022!\n\007project\030\231\226\301l \001" - + "(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\t" - + "H\000\210\001\001\022\034\n\014source_image\030\267\350\206\030 \001(\tH\001\210\001\001\022\033\n\004z" - + "one\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_idB" - + "\017\n\r_source_image\"\314\001\n\037InsertExternalVpnGa" - + "tewayRequest\022[\n\035external_vpn_gateway_res" - + "ource\030\210\337\220\350\001 \001(\0132+.google.cloud.compute.v" - + "1.ExternalVpnGatewayB\003\340A\002\022!\n\007project\030\231\226\301" - + "l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 " - + "\001(\tH\000\210\001\001B\r\n\013_request_id\"\304\001\n\033InsertFirewa" - + "llPolicyRequest\022R\n\030firewall_policy_resou" - + "rce\030\274\266\207\354\001 \001(\0132\'.google.cloud.compute.v1." - + "FirewallPolicyB\003\340A\002\022&\n\tparent_id\030\320\341\232\333\001 \001" - + "(\tB\017\362G\tparent_id\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001" - + "(\tH\000\210\001\001B\r\n\013_request_id\"\253\001\n\025InsertFirewal" - + "lRequest\022D\n\021firewall_resource\030\355\260\340\023 \001(\0132!" - + ".google.cloud.compute.v1.FirewallB\003\340A\002\022!" - + "\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreq" - + "uest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\340\001\n" - + "\033InsertForwardingRuleRequest\022R\n\030forwardi" + + "\221\226\303)\022\033\n\023SEV_LIVE_MIGRATABLE\020\214\233\370\272\001\022\025\n\017SEV" + + "_SNP_CAPABLE\020\247\207\032\022\026\n\017UEFI_COMPATIBLE\020\300\326\262]" + + "\022\035\n\026VIRTIO_SCSI_MULTIQUEUE\020\215\301\220`\022\017\n\007WINDO" + + "WS\020\343\334\354\331\001B\007\n\005_type\"\203\004\n\020HTTP2HealthCheck\022\024" + + "\n\004host\030\250\353\303\001 \001(\tH\000\210\001\001\022\024\n\004port\030\201\261\322\001 \001(\005H\001\210" + + "\001\001\022\031\n\tport_name\030\211\207\347\023 \001(\tH\002\210\001\001\022\"\n\022port_sp" + + "ecification\030\305\353\314\030 \001(\tH\003\210\001\001\022\034\n\014proxy_heade" + + "r\030\376\272\274L \001(\tH\004\210\001\001\022\034\n\014request_path\030\325\327\261m \001(\t" + + "H\005\210\001\001\022\030\n\010response\030\301\250\334] \001(\tH\006\210\001\001\"~\n\021PortS" + + "pecification\022 \n\034UNDEFINED_PORT_SPECIFICA" + + "TION\020\000\022\025\n\016USE_FIXED_PORT\020\344\210\333Z\022\026\n\016USE_NAM" + + "ED_PORT\020\277\317\307\246\001\022\030\n\020USE_SERVING_PORT\020\314\321\365\254\001\"" + + "H\n\013ProxyHeader\022\032\n\026UNDEFINED_PROXY_HEADER" + + "\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237\001B\007\n\005_ho" + + "stB\007\n\005_portB\014\n\n_port_nameB\025\n\023_port_speci" + + "ficationB\017\n\r_proxy_headerB\017\n\r_request_pa" + + "thB\013\n\t_response\"\202\004\n\017HTTPHealthCheck\022\024\n\004h" + + "ost\030\250\353\303\001 \001(\tH\000\210\001\001\022\024\n\004port\030\201\261\322\001 \001(\005H\001\210\001\001\022" + + "\031\n\tport_name\030\211\207\347\023 \001(\tH\002\210\001\001\022\"\n\022port_speci" + + "fication\030\305\353\314\030 \001(\tH\003\210\001\001\022\034\n\014proxy_header\030\376" + + "\272\274L \001(\tH\004\210\001\001\022\034\n\014request_path\030\325\327\261m \001(\tH\005\210" + + "\001\001\022\030\n\010response\030\301\250\334] \001(\tH\006\210\001\001\"~\n\021PortSpec", + "ification\022 \n\034UNDEFINED_PORT_SPECIFICATIO" + + "N\020\000\022\025\n\016USE_FIXED_PORT\020\344\210\333Z\022\026\n\016USE_NAMED_" + + "PORT\020\277\317\307\246\001\022\030\n\020USE_SERVING_PORT\020\314\321\365\254\001\"H\n\013" + + "ProxyHeader\022\032\n\026UNDEFINED_PROXY_HEADER\020\000\022" + + "\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237\001B\007\n\005_hostB" + + "\007\n\005_portB\014\n\n_port_nameB\025\n\023_port_specific" + + "ationB\017\n\r_proxy_headerB\017\n\r_request_pathB" + + "\013\n\t_response\"\203\004\n\020HTTPSHealthCheck\022\024\n\004hos" + + "t\030\250\353\303\001 \001(\tH\000\210\001\001\022\024\n\004port\030\201\261\322\001 \001(\005H\001\210\001\001\022\031\n" + + "\tport_name\030\211\207\347\023 \001(\tH\002\210\001\001\022\"\n\022port_specifi" + + "cation\030\305\353\314\030 \001(\tH\003\210\001\001\022\034\n\014proxy_header\030\376\272\274" + + "L \001(\tH\004\210\001\001\022\034\n\014request_path\030\325\327\261m \001(\tH\005\210\001\001" + + "\022\030\n\010response\030\301\250\334] \001(\tH\006\210\001\001\"~\n\021PortSpecif" + + "ication\022 \n\034UNDEFINED_PORT_SPECIFICATION\020" + + "\000\022\025\n\016USE_FIXED_PORT\020\344\210\333Z\022\026\n\016USE_NAMED_PO" + + "RT\020\277\317\307\246\001\022\030\n\020USE_SERVING_PORT\020\314\321\365\254\001\"H\n\013Pr" + + "oxyHeader\022\032\n\026UNDEFINED_PROXY_HEADER\020\000\022\013\n" + + "\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237\001B\007\n\005_hostB\007\n" + + "\005_portB\014\n\n_port_nameB\025\n\023_port_specificat" + + "ionB\017\n\r_proxy_headerB\017\n\r_request_pathB\013\n" + + "\t_response\"\303\n\n\013HealthCheck\022#\n\022check_inte" + + "rval_sec\030\256\257\343\244\001 \001(\005H\000\210\001\001\022\"\n\022creation_time" + + "stamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013description\030\374\207\326\311\001" + + " \001(\tH\002\210\001\001\022K\n\021grpc_health_check\030\346\247\344( \001(\0132" + + "(.google.cloud.compute.v1.GRPCHealthChec" + + "kH\003\210\001\001\022\"\n\021healthy_threshold\030\311\220\242\300\001 \001(\005H\004\210" + + "\001\001\022M\n\022http2_health_check\030\332\265\265\005 \001(\0132).goog" + + "le.cloud.compute.v1.HTTP2HealthCheckH\005\210\001" + + "\001\022L\n\021http_health_check\030\274\247\336\304\001 \001(\0132(.googl" + + "e.cloud.compute.v1.HTTPHealthCheckH\006\210\001\001\022" + + "N\n\022https_health_check\030\271\230\366\317\001 \001(\0132).google" + + ".cloud.compute.v1.HTTPSHealthCheckH\007\210\001\001\022" + + "\020\n\002id\030\233\032 \001(\004H\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\t\210\001\001\022" + + "J\n\nlog_config\030\235\321\301\247\001 \001(\0132-.google.cloud.c" + + "ompute.v1.HealthCheckLogConfigH\n\210\001\001\022\024\n\004n" + + "ame\030\213\365\315\001 \001(\tH\013\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\014\210\001" + + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\r\210\001\001\022J\n\020ssl_hea" + + "lth_check\030\270\351\303\205\001 \001(\0132\'.google.cloud.compu" + + "te.v1.SSLHealthCheckH\016\210\001\001\022J\n\020tcp_health_" + + "check\030\203\252\215\340\001 \001(\0132\'.google.cloud.compute.v" + + "1.TCPHealthCheckH\017\210\001\001\022\033\n\013timeout_sec\030\363\300\222" + + "& \001(\005H\020\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\tH\021\210\001\001\022#\n\023unhe" + + "althy_threshold\030\320\275\331l \001(\005H\022\210\001\001\"w\n\004Type\022\022\n" + + "\016UNDEFINED_TYPE\020\000\022\013\n\004GRPC\020\236\210\206\001\022\013\n\004HTTP\020\210" + + "\201\210\001\022\014\n\005HTTP2\020\252\241\370 \022\014\n\005HTTPS\020\313\241\370 \022\017\n\007INVAL" + + "ID\020\327\373\355\374\001\022\t\n\003SSL\020\354\203\005\022\t\n\003TCP\020\301\207\005B\025\n\023_check" + + "_interval_secB\025\n\023_creation_timestampB\016\n\014" + + "_descriptionB\024\n\022_grpc_health_checkB\024\n\022_h" + + "ealthy_thresholdB\025\n\023_http2_health_checkB" + + "\024\n\022_http_health_checkB\025\n\023_https_health_c" + + "heckB\005\n\003_idB\007\n\005_kindB\r\n\013_log_configB\007\n\005_" + + "nameB\t\n\007_regionB\014\n\n_self_linkB\023\n\021_ssl_he" + + "alth_checkB\023\n\021_tcp_health_checkB\016\n\014_time" + + "out_secB\007\n\005_typeB\026\n\024_unhealthy_threshold" + + "\"\247\002\n\017HealthCheckList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0226" + + "\n\005items\030\300\317\367/ \003(\0132$.google.cloud.compute." + + "v1.HealthCheck\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017" + + "next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_li" + + "nk\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 ." + + "google.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003" + + "_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_sel" + + "f_linkB\n\n\010_warning\":\n\024HealthCheckLogConf" + + "ig\022\027\n\006enable\030\203\313\324\224\001 \001(\010H\000\210\001\001B\t\n\007_enable\"F" + + "\n\024HealthCheckReference\022\035\n\014health_check\030\345" + + "\252\244\223\001 \001(\tH\000\210\001\001B\017\n\r_health_check\"\374\004\n\022Healt" + + "hCheckService\022\"\n\022creation_timestamp\030\266\217\307\016" + + " \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022" + + "\033\n\013fingerprint\030\344\321\363o \001(\tH\002\210\001\001\022\031\n\rhealth_c" + + "hecks\030\256\257\346\325\001 \003(\t\0220\n health_status_aggrega" + + "tion_policy\030\371\354\333x \001(\tH\003\210\001\001\022\020\n\002id\030\233\032 \001(\004H\004" + + "\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001" + + "(\tH\006\210\001\001\022\"\n\027network_endpoint_groups\030\255\227\377\r " + + "\003(\t\022\"\n\026notification_endpoints\030\252\336\370\301\001 \003(\t\022" + + "\026\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022\032\n\tself_link\030\215\222\305" + + "\331\001 \001(\tH\010\210\001\001\"r\n\035HealthStatusAggregationPo" + + "licy\022.\n*UNDEFINED_HEALTH_STATUS_AGGREGAT" + + "ION_POLICY\020\000\022\t\n\003AND\020\267\373\003\022\026\n\016NO_AGGREGATIO" + + "N\020\304\222\254\313\001B\025\n\023_creation_timestampB\016\n\014_descr" + + "iptionB\016\n\014_fingerprintB#\n!_health_status" + + "_aggregation_policyB\005\n\003_idB\007\n\005_kindB\007\n\005_" + + "nameB\t\n\007_regionB\014\n\n_self_link\"]\n\033HealthC" + + "heckServiceReference\022%\n\024health_check_ser" + + "vice\030\333\233\335\302\001 \001(\tH\000\210\001\001B\027\n\025_health_check_ser" + + "vice\"\266\002\n\027HealthCheckServicesList\022\020\n\002id\030\233" + + "\032 \001(\tH\000\210\001\001\022=\n\005items\030\300\317\367/ \003(\0132+.google.cl" + + "oud.compute.v1.HealthCheckService\022\024\n\004kin" + + "d\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& " + + "\001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007" + + "warning\030\234\337\226\030 \001(\0132 .google.cloud.compute." + + "v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next" + + "_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\304\003" + + "\n\032HealthChecksAggregatedList\022\020\n\002id\030\233\032 \001(" + + "\tH\000\210\001\001\022P\n\005items\030\300\317\367/ \003(\0132>.google.cloud." + + "compute.v1.HealthChecksAggregatedList.It" + + "emsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_p" + + "age_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305" + + "\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007" + + "warning\030\234\337\226\030 \001(\0132 .google.cloud.compute." + + "v1.WarningH\004\210\001\001\032]\n\nItemsEntry\022\013\n\003key\030\001 \001" + + "(\t\022>\n\005value\030\002 \001(\0132/.google.cloud.compute" + + ".v1.HealthChecksScopedList:\0028\001B\005\n\003_idB\007\n" + + "\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_link" + + "B\n\n\010_warning\"\240\001\n\026HealthChecksScopedList\022" + + "?\n\rhealth_checks\030\256\257\346\325\001 \003(\0132$.google.clou" + + "d.compute.v1.HealthCheck\0229\n\007warning\030\234\337\226\030" + + " \001(\0132 .google.cloud.compute.v1.WarningH\000" + + "\210\001\001B\n\n\010_warning\"\325\005\n\014HealthStatus\022N\n\013anno" + + "tations\030\244\366\2655 \003(\01326.google.cloud.compute." + + "v1.HealthStatus.AnnotationsEntry\022 \n\017forw" + + "arding_rule\030\376\245\335\200\001 \001(\tH\000\210\001\001\022\"\n\022forwarding" + + "_rule_ip\030\210\254\221R \001(\tH\001\210\001\001\022\035\n\014health_state\030\356" + + "\351\277\232\001 \001(\tH\002\210\001\001\022\030\n\010instance\030\225\251\332\010 \001(\tH\003\210\001\001\022" + + "\033\n\nip_address\030\334\361\334\301\001 \001(\tH\004\210\001\001\022\024\n\004port\030\201\261\322" + + "\001 \001(\005H\005\210\001\001\022\027\n\006weight\030\370\204\305\206\001 \001(\tH\006\210\001\001\022\035\n\014w" + + "eight_error\030\201\373\222\371\001 \001(\tH\007\210\001\001\0322\n\020Annotation" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"M" + + "\n\013HealthState\022\032\n\026UNDEFINED_HEALTH_STATE\020" + + "\000\022\017\n\007HEALTHY\020\375\252\333\321\001\022\021\n\tUNHEALTHY\020\304\271\255\334\001\"\212\001" + + "\n\013WeightError\022\032\n\026UNDEFINED_WEIGHT_ERROR\020" + + "\000\022\026\n\016INVALID_WEIGHT\020\340\213\373\266\001\022\026\n\016MISSING_WEI" + + "GHT\020\221\227\217\267\001\022\032\n\022UNAVAILABLE_WEIGHT\020\347\342\306\321\001\022\023\n" + + "\013WEIGHT_NONE\020\237\351\311\357\001B\022\n\020_forwarding_ruleB\025" + + "\n\023_forwarding_rule_ipB\017\n\r_health_stateB\013" + + "\n\t_instanceB\r\n\013_ip_addressB\007\n\005_portB\t\n\007_" + + "weightB\017\n\r_weight_error\"\347\004\n\036HealthStatus" + + "ForNetworkEndpoint\022R\n\017backend_service\030\212\300" + + "\256\222\001 \001(\01320.google.cloud.compute.v1.Backen" + + "dServiceReferenceH\000\210\001\001\022R\n\017forwarding_rul" + + "e\030\376\245\335\200\001 \001(\01320.google.cloud.compute.v1.Fo" + + "rwardingRuleReferenceH\001\210\001\001\022L\n\014health_che" + + "ck\030\345\252\244\223\001 \001(\0132-.google.cloud.compute.v1.H" + + "ealthCheckReferenceH\002\210\001\001\022[\n\024health_check" + + "_service\030\333\233\335\302\001 \001(\01324.google.cloud.comput" + + "e.v1.HealthCheckServiceReferenceH\003\210\001\001\022\035\n" + + "\014health_state\030\356\351\277\232\001 \001(\tH\004\210\001\001\"p\n\013HealthSt" + + "ate\022\032\n\026UNDEFINED_HEALTH_STATE\020\000\022\020\n\010DRAIN" + + "ING\020\352\325\214\345\001\022\017\n\007HEALTHY\020\375\252\333\321\001\022\021\n\tUNHEALTHY\020" + + "\304\271\255\334\001\022\017\n\007UNKNOWN\020\252\360\304\316\001B\022\n\020_backend_servi" + + "ceB\022\n\020_forwarding_ruleB\017\n\r_health_checkB" + + "\027\n\025_health_check_serviceB\017\n\r_health_stat" + + "e\";\n\004Help\0223\n\005links\030\271\237\2151 \003(\0132!.google.clo" + + "ud.compute.v1.HelpLink\"T\n\010HelpLink\022\034\n\013de" + + "scription\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\022\n\003url\030\357\212\007 \001(\tH" + + "\001\210\001\001B\016\n\014_descriptionB\006\n\004_url\"z\n\010HostRule" + + "\022\034\n\013description\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\020\n\005hosts\030" + + "\313\377\266/ \003(\t\022\035\n\014path_matcher\030\230\276\212\241\001 \001(\tH\001\210\001\001B" + + "\016\n\014_descriptionB\017\n\r_path_matcher\"i\n\016Http" + + "FaultAbort\022\034\n\013http_status\030\211\267\316\337\001 \001(\rH\000\210\001\001" + + "\022\032\n\npercentage\030\232\345\267H \001(\001H\001\210\001\001B\016\n\014_http_st" + + "atusB\r\n\013_percentage\"\214\001\n\016HttpFaultDelay\022?" + + "\n\013fixed_delay\030\370\271\226\227\001 \001(\0132!.google.cloud.c" + + "ompute.v1.DurationH\000\210\001\001\022\032\n\npercentage\030\232\345" + + "\267H \001(\001H\001\210\001\001B\016\n\014_fixed_delayB\r\n\013_percenta" + + "ge\"\250\001\n\022HttpFaultInjection\022>\n\005abort\030\260\306\224, " + + "\001(\0132\'.google.cloud.compute.v1.HttpFaultA" + + "bortH\000\210\001\001\022>\n\005delay\030\203\363\302- \001(\0132\'.google.clo" + + "ud.compute.v1.HttpFaultDelayH\001\210\001\001B\010\n\006_ab" + + "ortB\010\n\006_delay\"\374\001\n\020HttpHeaderAction\022L\n\026re" + + "quest_headers_to_add\030\346\256\261\" \003(\0132).google.c" + + "loud.compute.v1.HttpHeaderOption\022$\n\031requ" + + "est_headers_to_remove\030\237\317\223h \003(\t\022M\n\027respon" + + "se_headers_to_add\030\364\266\251\017 \003(\0132).google.clou" + + "d.compute.v1.HttpHeaderOption\022%\n\032respons" + + "e_headers_to_remove\030\321\201\373# \003(\t\"\260\003\n\017HttpHea" + + "derMatch\022\034\n\013exact_match\030\205\231\234\332\001 \001(\tH\000\210\001\001\022\033" + + "\n\013header_name\030\375\301\3074 \001(\tH\001\210\001\001\022\035\n\014invert_ma" + + "tch\030\234\310\372\356\001 \001(\010H\002\210\001\001\022\034\n\014prefix_match\030\330\363\374z " + + "\001(\tH\003\210\001\001\022\035\n\rpresent_match\030\301\372\223 \001(\010H\004\210\001\001\022" + + "E\n\013range_match\030\303\250\257. \001(\0132(.google.cloud.c" + + "ompute.v1.Int64RangeMatchH\005\210\001\001\022\033\n\013regex_" + + "match\030\315\267\2323 \001(\tH\006\210\001\001\022\035\n\014suffix_match\030\327\346\256\313" + + "\001 \001(\tH\007\210\001\001B\016\n\014_exact_matchB\016\n\014_header_na" + + "meB\017\n\r_invert_matchB\017\n\r_prefix_matchB\020\n\016" + + "_present_matchB\016\n\014_range_matchB\016\n\014_regex" + + "_matchB\017\n\r_suffix_match\"\223\001\n\020HttpHeaderOp" + + "tion\022\033\n\013header_name\030\375\301\3074 \001(\tH\000\210\001\001\022\034\n\014hea" + + "der_value\030\277\362\353` \001(\tH\001\210\001\001\022\027\n\007replace\030\264\345\362\t " + + "\001(\010H\002\210\001\001B\016\n\014_header_nameB\017\n\r_header_valu" + + "eB\n\n\010_replace\"\304\001\n\027HttpQueryParameterMatc" + + "h\022\034\n\013exact_match\030\205\231\234\332\001 \001(\tH\000\210\001\001\022\024\n\004name\030" + + "\213\365\315\001 \001(\tH\001\210\001\001\022\035\n\rpresent_match\030\301\372\223 \001(\010H" + + "\002\210\001\001\022\033\n\013regex_match\030\315\267\2323 \001(\tH\003\210\001\001B\016\n\014_ex" + + "act_matchB\007\n\005_nameB\020\n\016_present_matchB\016\n\014" + + "_regex_match\"\214\004\n\022HttpRedirectAction\022\035\n\rh" + + "ost_redirect\030\223\241\2343 \001(\tH\000\210\001\001\022\036\n\016https_redi" + + "rect\030\260\361\227Q \001(\010H\001\210\001\001\022\036\n\rpath_redirect\030\266\275\356\201" + + "\001 \001(\tH\002\210\001\001\022 \n\017prefix_redirect\030\351\365\340\324\001 \001(\tH" + + "\003\210\001\001\022\'\n\026redirect_response_code\030\210\330\236\320\001 \001(\t" + + "H\004\210\001\001\022\033\n\013strip_query\030\341\231\367\030 \001(\010H\005\210\001\001\"\270\001\n\024R" + + "edirectResponseCode\022$\n UNDEFINED_REDIREC" + + "T_RESPONSE_CODE\020\000\022\014\n\005FOUND\020\342\276\376\037\022!\n\031MOVED" + + "_PERMANENTLY_DEFAULT\020\321\231\262\270\001\022\032\n\022PERMANENT_" + + "REDIRECT\020\355\350\223\266\001\022\021\n\tSEE_OTHER\020\344\357\257\324\001\022\032\n\022TEM" + + "PORARY_REDIRECT\020\252\344\267\351\001B\020\n\016_host_redirectB" + + "\021\n\017_https_redirectB\020\n\016_path_redirectB\022\n\020" + + "_prefix_redirectB\031\n\027_redirect_response_c" + + "odeB\016\n\014_strip_query\"\264\001\n\017HttpRetryPolicy\022" + + "\033\n\013num_retries\030\215\253\201x \001(\rH\000\210\001\001\022C\n\017per_try_" + + "timeout\030\273\255\304\205\001 \001(\0132!.google.cloud.compute" + + ".v1.DurationH\001\210\001\001\022\033\n\020retry_conditions\030\257\341" + + "\336\r \003(\tB\016\n\014_num_retriesB\022\n\020_per_try_timeo" + + "ut\"\361\005\n\017HttpRouteAction\022A\n\013cors_policy\030\204\314" + + "\235\276\001 \001(\0132#.google.cloud.compute.v1.CorsPo" + + "licyH\000\210\001\001\022T\n\026fault_injection_policy\030\227\224\352\304" + + "\001 \001(\0132+.google.cloud.compute.v1.HttpFaul" + + "tInjectionH\001\210\001\001\022F\n\023max_stream_duration\030\230" + + "\245\245\035 \001(\0132!.google.cloud.compute.v1.Durati" + + "onH\002\210\001\001\022S\n\025request_mirror_policy\030\202\340\377h \001(" + + "\0132,.google.cloud.compute.v1.RequestMirro" + + "rPolicyH\003\210\001\001\022F\n\014retry_policy\030\251\345\212\033 \001(\0132(." + + "google.cloud.compute.v1.HttpRetryPolicyH" + + "\004\210\001\001\022;\n\007timeout\030\341\232\275\215\001 \001(\0132!.google.cloud" + + ".compute.v1.DurationH\005\210\001\001\022A\n\013url_rewrite" + + "\030\274\375\252\202\001 \001(\0132#.google.cloud.compute.v1.Url" + + "RewriteH\006\210\001\001\022V\n\031weighted_backend_service" + + "s\030\321\307\332\240\001 \003(\0132/.google.cloud.compute.v1.We" + + "ightedBackendServiceB\016\n\014_cors_policyB\031\n\027" + + "_fault_injection_policyB\026\n\024_max_stream_d" + + "urationB\030\n\026_request_mirror_policyB\017\n\r_re" + + "try_policyB\n\n\010_timeoutB\016\n\014_url_rewrite\"\345" + + "\003\n\rHttpRouteRule\022\034\n\013description\030\374\207\326\311\001 \001(" + + "\tH\000\210\001\001\022I\n\rheader_action\030\250\240\270\234\001 \001(\0132).goog" + + "le.cloud.compute.v1.HttpHeaderActionH\001\210\001" + + "\001\022D\n\013match_rules\030\375\273\261\263\001 \003(\0132+.google.clou" + + "d.compute.v1.HttpRouteRuleMatch\022\031\n\010prior" + + "ity\030\244\363\241\324\001 \001(\005H\002\210\001\001\022G\n\014route_action\030\354\251\271\312\001" + + " \001(\0132(.google.cloud.compute.v1.HttpRoute" + + "ActionH\003\210\001\001\022\030\n\007service\030\265\215\217\262\001 \001(\tH\004\210\001\001\022J\n" + + "\014url_redirect\030\254\241\230\301\001 \001(\0132+.google.cloud.c" + + "ompute.v1.HttpRedirectActionH\005\210\001\001B\016\n\014_de" + + "scriptionB\020\n\016_header_actionB\013\n\t_priority" + + "B\017\n\r_route_actionB\n\n\010_serviceB\017\n\r_url_re" + + "direct\"\267\003\n\022HttpRouteRuleMatch\022\037\n\017full_pa" + + "th_match\030\333\211\252f \001(\tH\000\210\001\001\022D\n\016header_matches" + + "\030\201\353\310\254\001 \003(\0132(.google.cloud.compute.v1.Htt" + + "pHeaderMatch\022\034\n\013ignore_case\030\375\222\264\335\001 \001(\010H\001\210" + + "\001\001\022E\n\020metadata_filters\030\353\315\314\335\001 \003(\0132\'.googl" + + "e.cloud.compute.v1.MetadataFilter\022\034\n\014pre" + + "fix_match\030\330\363\374z \001(\tH\002\210\001\001\022U\n\027query_paramet" + + "er_matches\030\346\225\276\210\001 \003(\01320.google.cloud.comp" + + "ute.v1.HttpQueryParameterMatch\022\033\n\013regex_" + + "match\030\315\267\2323 \001(\tH\003\210\001\001B\022\n\020_full_path_matchB" + + "\016\n\014_ignore_caseB\017\n\r_prefix_matchB\016\n\014_reg" + + "ex_match\"\272\021\n\005Image\022\035\n\014architecture\030\323\322\261\220\001" + + " \001(\tH\000\210\001\001\022#\n\022archive_size_bytes\030\312\214\334\265\001 \001(" + + "\003H\001\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\002\210" + + "\001\001\022G\n\ndeprecated\030\263\313\321\365\001 \001(\0132*.google.clou" + + "d.compute.v1.DeprecationStatusH\003\210\001\001\022\034\n\013d" + + "escription\030\374\207\326\311\001 \001(\tH\004\210\001\001\022\035\n\014disk_size_g" + + "b\030\267\232\347\226\001 \001(\003H\005\210\001\001\022\027\n\006family\030\344\266\341\234\001 \001(\tH\006\210\001" + + "\001\022E\n\021guest_os_features\030\321\340\347% \003(\0132\'.google" + + ".cloud.compute.v1.GuestOsFeature\022\020\n\002id\030\233" + + "\032 \001(\004H\007\210\001\001\022U\n\024image_encryption_key\030\207\316\373\264\001" + + " \001(\0132..google.cloud.compute.v1.CustomerE" + + "ncryptionKeyH\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\t\210\001\001\022" + + "!\n\021label_fingerprint\030\231\360\367T \001(\tH\n\210\001\001\022>\n\006la" + + "bels\030\377\277\301\356\001 \003(\0132*.google.cloud.compute.v1" + + ".Image.LabelsEntry\022\030\n\rlicense_codes\030\250\205\330\025" + + " \003(\003\022\024\n\010licenses\030\322\210\200\241\001 \003(\t\022\024\n\004name\030\213\365\315\001 " + + "\001(\tH\013\210\001\001\022;\n\010raw_disk\030\324\316\363\357\001 \001(\0132 .google." + + "cloud.compute.v1.RawDiskH\014\210\001\001\022\036\n\rsatisfi" + + "es_pzs\030\253\335\253\345\001 \001(\010H\r\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" + + " \001(\tH\016\210\001\001\022\\\n\037shielded_instance_initial_s" + + "tate\030\203\304\334[ \001(\0132+.google.cloud.compute.v1." + + "InitialStateConfigH\017\210\001\001\022\034\n\013source_disk\030\301" + + "\356\264\327\001 \001(\tH\020\210\001\001\022[\n\032source_disk_encryption_" + + "key\030\341\240\270\375\001 \001(\0132..google.cloud.compute.v1." + + "CustomerEncryptionKeyH\021\210\001\001\022\037\n\016source_dis" + + "k_id\030\331\315\311\330\001 \001(\tH\022\210\001\001\022\034\n\014source_image\030\267\350\206\030" + + " \001(\tH\023\210\001\001\022\\\n\033source_image_encryption_key" + + "\030\253\221\365\265\001 \001(\0132..google.cloud.compute.v1.Cus" + + "tomerEncryptionKeyH\024\210\001\001\022\037\n\017source_image_" + + "id\030\243\374\260\032 \001(\tH\025\210\001\001\022\037\n\017source_snapshot\030\350\232\216<" + + " \001(\tH\026\210\001\001\022_\n\036source_snapshot_encryption_" + + "key\030\332\216\347\220\001 \001(\0132..google.cloud.compute.v1." + + "CustomerEncryptionKeyH\027\210\001\001\022\"\n\022source_sna" + + "pshot_id\030\322\226\230/ \001(\tH\030\210\001\001\022\034\n\013source_type\030\336\361" + + "\322\327\001 \001(\tH\031\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\032\210\001\001\022\035\n\021" + + "storage_locations\030\232\355\263\234\001 \003(\t\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"j\n\014Ar" + + "chitecture\022\032\n\026UNDEFINED_ARCHITECTURE\020\000\022 " + + "\n\030ARCHITECTURE_UNSPECIFIED\020\253\324\235\274\001\022\014\n\005ARM6" + + "4\020\372\313\351\035\022\016\n\006X86_64\020\307\244\346\312\001\"2\n\nSourceType\022\031\n\025" + + "UNDEFINED_SOURCE_TYPE\020\000\022\t\n\003RAW\020\210\370\004\"^\n\006St" + + "atus\022\024\n\020UNDEFINED_STATUS\020\000\022\020\n\010DELETING\020\250" + + "\247\207\374\001\022\016\n\006FAILED\020\275\220\246\331\001\022\016\n\007PENDING\020\367\252\360\020\022\014\n\005" + + "READY\020\203\303\217%B\017\n\r_architectureB\025\n\023_archive_" + + "size_bytesB\025\n\023_creation_timestampB\r\n\013_de" + + "precatedB\016\n\014_descriptionB\017\n\r_disk_size_g" + + "bB\t\n\007_familyB\005\n\003_idB\027\n\025_image_encryption" + + "_keyB\007\n\005_kindB\024\n\022_label_fingerprintB\007\n\005_" + + "nameB\013\n\t_raw_diskB\020\n\016_satisfies_pzsB\014\n\n_" + + "self_linkB\"\n _shielded_instance_initial_" + + "stateB\016\n\014_source_diskB\035\n\033_source_disk_en" + + "cryption_keyB\021\n\017_source_disk_idB\017\n\r_sour" + + "ce_imageB\036\n\034_source_image_encryption_key" + + "B\022\n\020_source_image_idB\022\n\020_source_snapshot" + + "B!\n\037_source_snapshot_encryption_keyB\025\n\023_" + + "source_snapshot_idB\016\n\014_source_typeB\t\n\007_s" + + "tatus\"R\n\017ImageFamilyView\0225\n\005image\030\333\322\352/ \001" + + "(\0132\036.google.cloud.compute.v1.ImageH\000\210\001\001B" + + "\010\n\006_image\"\233\002\n\tImageList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" + + "\001\0220\n\005items\030\300\317\367/ \003(\0132\036.google.cloud.compu" + + "te.v1.Image\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017nex" + + "t_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030" + + "\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .goo" + + "gle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_id" + + "B\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_l" + + "inkB\n\n\010_warning\"\216\002\n\022InitialStateConfig\0229" + + "\n\003dbs\030\265\207\006 \003(\0132*.google.cloud.compute.v1." + + "FileContentBuffer\022;\n\004dbxs\030\371\347\273\001 \003(\0132*.goo" + + "gle.cloud.compute.v1.FileContentBuffer\022;" + + "\n\004keks\030\302\330\310\001 \003(\0132*.google.cloud.compute.v" + + "1.FileContentBuffer\022<\n\002pk\030\373\033 \001(\0132*.googl" + + "e.cloud.compute.v1.FileContentBufferH\000\210\001" + + "\001B\005\n\003_pk\"\312\001\n\024InsertAddressRequest\022C\n\020add" + + "ress_resource\030\371\227\336\346\001 \001(\0132 .google.cloud.c" + + "ompute.v1.AddressB\003\340A\002\022!\n\007project\030\231\226\301l \001" + + "(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A" + + "\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r" + + "\n\013_request_id\"\316\001\n\027InsertAutoscalerReques" + + "t\022H\n\023autoscaler_resource\030\366\360\377b \001(\0132#.goog" + + "le.cloud.compute.v1.AutoscalerB\003\340A\002\022!\n\007p" + + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreques" + + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002" + + "\362G\004zoneB\r\n\013_request_id\"\274\001\n\032InsertBackend" + + "BucketRequest\022P\n\027backend_bucket_resource" + + "\030\230\316\307\265\001 \001(\0132&.google.cloud.compute.v1.Bac" + + "kendBucketB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" + + "\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r" + + "\n\013_request_id\"\277\001\n\033InsertBackendServiceRe" + + "quest\022R\n\030backend_service_resource\030\243\201\337\245\001 " + + "\001(\0132\'.google.cloud.compute.v1.BackendSer" + + "viceB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" + + "ject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_req" + + "uest_id\"\353\001\n\021InsertDiskRequest\022<\n\rdisk_re" + + "source\030\360\320\253\014 \001(\0132\035.google.cloud.compute.v" + + "1.DiskB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\034\n\014so" + + "urce_image\030\267\350\206\030 \001(\tH\001\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(" + + "\tB\n\340A\002\362G\004zoneB\r\n\013_request_idB\017\n\r_source_" + + "image\"\314\001\n\037InsertExternalVpnGatewayReques" + + "t\022[\n\035external_vpn_gateway_resource\030\210\337\220\350\001" + + " \001(\0132+.google.cloud.compute.v1.ExternalV" + + "pnGatewayB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" + + "G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n" + + "\013_request_id\"\304\001\n\033InsertFirewallPolicyReq" + + "uest\022R\n\030firewall_policy_resource\030\274\266\207\354\001 \001" + + "(\0132\'.google.cloud.compute.v1.FirewallPol" + + "icyB\003\340A\002\022&\n\tparent_id\030\320\341\232\333\001 \001(\tB\017\362G\tpare" + + "nt_id\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013" + + "_request_id\"\253\001\n\025InsertFirewallRequest\022D\n" + + "\021firewall_resource\030\355\260\340\023 \001(\0132!.google.clo" + + "ud.compute.v1.FirewallB\003\340A\002\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331" + + "\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\340\001\n\033InsertForw" + + "ardingRuleRequest\022R\n\030forwarding_rule_res" + + "ource\030\257\300\320\217\001 \001(\0132\'.google.cloud.compute.v" + + "1.ForwardingRuleB\003\340A\002\022!\n\007project\030\231\226\301l \001(" + + "\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002" + + "\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n" + + "\013_request_id\"\257\001\n\032InsertGlobalAddressRequ" + + "est\022C\n\020address_resource\030\371\227\336\346\001 \001(\0132 .goog" + + "le.cloud.compute.v1.AddressB\003\340A\002\022!\n\007proj" + + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_i" + + "d\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\305\001\n!Inser" + + "tGlobalForwardingRuleRequest\022R\n\030forwardi" + "ng_rule_resource\030\257\300\320\217\001 \001(\0132\'.google.clou" + "d.compute.v1.ForwardingRuleB\003\340A\002\022!\n\007proj" - + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315" - + "\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 " - + "\001(\tH\000\210\001\001B\r\n\013_request_id\"\257\001\n\032InsertGlobal" - + "AddressRequest\022C\n\020address_resource\030\371\227\336\346\001" - + " \001(\0132 .google.cloud.compute.v1.AddressB\003" - + "\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032" - + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_i" - + "d\"\305\001\n!InsertGlobalForwardingRuleRequest\022" - + "R\n\030forwarding_rule_resource\030\257\300\320\217\001 \001(\0132\'." - + "google.cloud.compute.v1.ForwardingRuleB\003" - + "\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032" - + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_i" - + "d\"\330\001\n\'InsertGlobalNetworkEndpointGroupRe" - + "quest\022_\n\037network_endpoint_group_resource" - + "\030\247\315\333\372\001 \001(\0132-.google.cloud.compute.v1.Net" - + "workEndpointGroupB\003\340A\002\022!\n\007project\030\231\226\301l \001" + + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_i" + + "d\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\330\001\n\'Inser" + + "tGlobalNetworkEndpointGroupRequest\022_\n\037ne" + + "twork_endpoint_group_resource\030\247\315\333\372\001 \001(\0132" + + "-.google.cloud.compute.v1.NetworkEndpoin" + + "tGroupB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_r" + + "equest_id\"\333\001\n)InsertGlobalPublicDelegate" + + "dPrefixeRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" + + "\362G\007project\022`\n public_delegated_prefix_re" + + "source\030\205\370\330\026 \001(\0132..google.cloud.compute.v" + + "1.PublicDelegatedPrefixB\003\340A\002\022\032\n\nrequest_" + + "id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\265\001\n\030Inse" + + "rtHealthCheckRequest\022K\n\025health_check_res" + + "ource\030\250\303\244` \001(\0132$.google.cloud.compute.v1" + + ".HealthCheckB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340" + + "A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001" + + "B\r\n\013_request_id\"\322\001\n\022InsertImageRequest\022\034" + + "\n\014force_create\030\320\211\244^ \001(\010H\000\210\001\001\022?\n\016image_re" + + "source\030\362\304\376\260\001 \001(\0132\036.google.cloud.compute." + + "v1.ImageB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G" + + "\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\017\n\r" + + "_force_createB\r\n\013_request_id\"\356\001\n!InsertI" + + "nstanceGroupManagerRequest\022^\n\037instance_g" + + "roup_manager_resource\030\212\212\276| \001(\0132-.google." + + "cloud.compute.v1.InstanceGroupManagerB\003\340" + + "A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n" + + "\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001" + + "(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\331\001\n\032Insert" + + "InstanceGroupRequest\022P\n\027instance_group_r" + + "esource\030\270\265\325\210\001 \001(\0132&.google.cloud.compute", + ".v1.InstanceGroupB\003\340A\002\022!\n\007project\030\231\226\301l \001" + "(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\t" - + "H\000\210\001\001B\r\n\013_request_id\"\333\001\n)InsertGlobalPub" - + "licDelegatedPrefixeRequest\022!\n\007project\030\231\226" - + "\301l \001(\tB\r\340A\002\362G\007project\022`\n public_delegate" - + "d_prefix_resource\030\205\370\330\026 \001(\0132..google.clou" - + "d.compute.v1.PublicDelegatedPrefixB\003\340A\002\022" - + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_" - + "id\"\265\001\n\030InsertHealthCheckRequest\022K\n\025healt" - + "h_check_resource\030\250\303\244` \001(\0132$.google.cloud" - + ".compute.v1.HealthCheckB\003\340A\002\022!\n\007project\030" + + "H\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_r" + + "equest_id\"\317\002\n\025InsertInstanceRequest\022D\n\021i" + + "nstance_resource\030\370\360\376f \001(\0132!.google.cloud" + + ".compute.v1.InstanceB\003\340A\002\022!\n\007project\030\231\226\301" + + "l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 " + + "\001(\tH\000\210\001\001\022)\n\030source_instance_template\030\300\303\301" + + "\236\001 \001(\tH\001\210\001\001\022$\n\024source_machine_image\030\277\334\260\n" + + " \001(\tH\002\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r" + + "\n\013_request_idB\033\n\031_source_instance_templa" + + "teB\027\n\025_source_machine_image\"\304\001\n\035InsertIn" + + "stanceTemplateRequest\022U\n\032instance_templa" + + "te_resource\030\211\352\213\005 \001(\0132).google.cloud.comp" + + "ute.v1.InstanceTemplateB\003\340A\002\022!\n\007project\030" + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201" - + "\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\322\001\n\022InsertIma" - + "geRequest\022\034\n\014force_create\030\320\211\244^ \001(\010H\000\210\001\001\022" - + "?\n\016image_resource\030\362\304\376\260\001 \001(\0132\036.google.clo" - + "ud.compute.v1.ImageB\003\340A\002\022!\n\007project\030\231\226\301l" - + " \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001" - + "(\tH\001\210\001\001B\017\n\r_force_createB\r\n\013_request_id\"" - + "\356\001\n!InsertInstanceGroupManagerRequest\022^\n" - + "\037instance_group_manager_resource\030\212\212\276| \001(" - + "\0132-.google.cloud.compute.v1.InstanceGrou" - + "pManagerB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G" - + "\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004" - + "zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id" - + "\"\331\001\n\032InsertInstanceGroupRequest\022P\n\027insta" - + "nce_group_resource\030\270\265\325\210\001 \001(\0132&.google.cl" - + "oud.compute.v1.InstanceGroupB\003\340A\002\022!\n\007pro", - "ject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_" - + "id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G" - + "\004zoneB\r\n\013_request_id\"\317\002\n\025InsertInstanceR" - + "equest\022D\n\021instance_resource\030\370\360\376f \001(\0132!.g" - + "oogle.cloud.compute.v1.InstanceB\003\340A\002\022!\n\007" - + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreque" - + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001\022)\n\030source_instance_t" - + "emplate\030\300\303\301\236\001 \001(\tH\001\210\001\001\022$\n\024source_machine" - + "_image\030\277\334\260\n \001(\tH\002\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340" - + "A\002\362G\004zoneB\r\n\013_request_idB\033\n\031_source_inst" - + "ance_templateB\027\n\025_source_machine_image\"\304" - + "\001\n\035InsertInstanceTemplateRequest\022U\n\032inst" - + "ance_template_resource\030\211\352\213\005 \001(\0132).google" - + ".cloud.compute.v1.InstanceTemplateB\003\340A\002\022" - + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" - + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\250\002" - + "\n#InsertInterconnectAttachmentRequest\022a\n" - + " interconnect_attachment_resource\030\371\244\240e \001" - + "(\0132/.google.cloud.compute.v1.Interconnec" - + "tAttachmentB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006re" - + "gion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\035\n\rvali" - + "date_only\030\265\372\337s \001(\010H\001\210\001\001B\r\n\013_request_idB\020" - + "\n\016_validate_only\"\270\001\n\031InsertInterconnectR" - + "equest\022M\n\025interconnect_resource\030\237\241\314\275\001 \001(" - + "\0132%.google.cloud.compute.v1.Interconnect" - + "B\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project" - + "\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request" - + "_id\"\251\001\n\024InsertLicenseRequest\022C\n\020license_" - + "resource\030\314\324\352\320\001 \001(\0132 .google.cloud.comput" - + "e.v1.LicenseB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340" - + "A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001" - + "B\r\n\013_request_id\"\356\001\n\031InsertMachineImageRe" - + "quest\022M\n\026machine_image_resource\030\352\252\373\034 \001(\013" - + "2%.google.cloud.compute.v1.MachineImageB" - + "\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022" - + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022 \n\017source_in" - + "stance\030\271\230\375\274\001 \001(\tH\001\210\001\001B\r\n\013_request_idB\022\n\020" - + "_source_instance\"\350\001\n\036InsertNetworkAttach" - + "mentRequest\022W\n\033network_attachment_resour" - + "ce\030\231\360\314d \001(\0132*.google.cloud.compute.v1.Ne" - + "tworkAttachmentB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" - + "B\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362" - + "G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013" - + "_request_id\"\267\002\n\'InsertNetworkEdgeSecurit" - + "yServiceRequest\022l\n&network_edge_security" - + "_service_resource\030\246\243\333\343\001 \001(\01323.google.clo" - + "ud.compute.v1.NetworkEdgeSecurityService" + + "\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\250\002\n#InsertInt" + + "erconnectAttachmentRequest\022a\n interconne" + + "ct_attachment_resource\030\371\244\240e \001(\0132/.google" + + ".cloud.compute.v1.InterconnectAttachment" + "B\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project" + "\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreq" + "uest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\035\n\rvalidate_only\030\265" + "\372\337s \001(\010H\001\210\001\001B\r\n\013_request_idB\020\n\016_validate" - + "_only\"\357\001\n!InsertNetworkEndpointGroupRequ" - + "est\022_\n\037network_endpoint_group_resource\030\247" - + "\315\333\372\001 \001(\0132-.google.cloud.compute.v1.Netwo" - + "rkEndpointGroupB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" - + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" - + "\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_req" - + "uest_id\"\306\001\n\"InsertNetworkFirewallPolicyR" - + "equest\022R\n\030firewall_policy_resource\030\274\266\207\354\001" - + " \001(\0132\'.google.cloud.compute.v1.FirewallP" - + "olicyB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pr" - + "oject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_re" - + "quest_id\"\250\001\n\024InsertNetworkRequest\022B\n\020net" - + "work_resource\030\377\335\234: \001(\0132 .google.cloud.co" - + "mpute.v1.NetworkB\003\340A\002\022!\n\007project\030\231\226\301l \001(" - + "\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" - + "\000\210\001\001B\r\n\013_request_id\"\361\001\n\026InsertNodeGroupR" - + "equest\022\"\n\022initial_node_count\030\355\310\247\" \001(\005B\003\340" - + "A\002\022H\n\023node_group_resource\030\253\263\372\360\001 \001(\0132\".go" - + "ogle.cloud.compute.v1.NodeGroupB\003\340A\002\022!\n\007" - + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreque" - + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A" - + "\002\362G\004zoneB\r\n\013_request_id\"\331\001\n\031InsertNodeTe" - + "mplateRequest\022M\n\026node_template_resource\030" - + "\266\332\335< \001(\0132%.google.cloud.compute.v1.NodeT" - + "emplateB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007" - + "project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region" - + "\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request" - + "_id\"\343\001\n\034InsertPacketMirroringRequest\022T\n\031" - + "packet_mirroring_resource\030\241\374\250\353\001 \001(\0132(.go" - + "ogle.cloud.compute.v1.PacketMirroringB\003\340" - + "A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n" - + "\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreques" - + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\330\001\n$In" - + "sertPublicAdvertisedPrefixeRequest\022!\n\007pr" - + "oject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022b\n!public_" - + "advertised_prefix_resource\030\217\327\262o \001(\0132/.go" - + "ogle.cloud.compute.v1.PublicAdvertisedPr" - + "efixB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n" - + "\013_request_id\"\366\001\n#InsertPublicDelegatedPr" - + "efixeRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007" - + "project\022`\n public_delegated_prefix_resou" - + "rce\030\205\370\330\026 \001(\0132..google.cloud.compute.v1.P" - + "ublicDelegatedPrefixB\003\340A\002\022\037\n\006region\030\364\315\240B" - + " \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001B\r\n\013_request_id\"\330\001\n\035InsertRegionAu" - + "toscalerRequest\022H\n\023autoscaler_resource\030\366" - + "\360\377b \001(\0132#.google.cloud.compute.v1.Autosc" - + "alerB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" + + "_only\"\270\001\n\031InsertInterconnectRequest\022M\n\025i" + + "nterconnect_resource\030\237\241\314\275\001 \001(\0132%.google." + + "cloud.compute.v1.InterconnectB\003\340A\002\022!\n\007pr" + + "oject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest" + + "_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\251\001\n\024Ins" + + "ertLicenseRequest\022C\n\020license_resource\030\314\324" + + "\352\320\001 \001(\0132 .google.cloud.compute.v1.Licens" + + "eB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007projec" + + "t\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_reques" + + "t_id\"\356\001\n\031InsertMachineImageRequest\022M\n\026ma" + + "chine_image_resource\030\352\252\373\034 \001(\0132%.google.c" + + "loud.compute.v1.MachineImageB\003\340A\002\022!\n\007pro" + + "ject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_" + + "id\030\313\201\331\021 \001(\tH\000\210\001\001\022 \n\017source_instance\030\271\230\375\274" + + "\001 \001(\tH\001\210\001\001B\r\n\013_request_idB\022\n\020_source_ins" + + "tance\"\350\001\n\036InsertNetworkAttachmentRequest" + + "\022W\n\033network_attachment_resource\030\231\360\314d \001(\013" + + "2*.google.cloud.compute.v1.NetworkAttach" + + "mentB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" + "ject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n" + "\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id" - + "\"\346\001\n!InsertRegionBackendServiceRequest\022R" - + "\n\030backend_service_resource\030\243\201\337\245\001 \001(\0132\'.g" - + "oogle.cloud.compute.v1.BackendServiceB\003\340" - + "A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n" - + "\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreques" - + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\330\001\n\035In" - + "sertRegionCommitmentRequest\022H\n\023commitmen" - + "t_resource\030\370\243\273t \001(\0132#.google.cloud.compu" - + "te.v1.CommitmentB\003\340A\002\022!\n\007project\030\231\226\301l \001(" - + "\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002" - + "\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n" - + "\013_request_id\"\365\001\n\027InsertRegionDiskRequest" - + "\022<\n\rdisk_resource\030\360\320\253\014 \001(\0132\035.google.clou" - + "d.compute.v1.DiskB\003\340A\002\022!\n\007project\030\231\226\301l \001" - + "(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A" - + "\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\034" - + "\n\014source_image\030\267\350\206\030 \001(\tH\001\210\001\001B\r\n\013_request" - + "_idB\017\n\r_source_image\"\334\001\n\036InsertRegionHea" - + "lthCheckRequest\022K\n\025health_check_resource" - + "\030\250\303\244` \001(\0132$.google.cloud.compute.v1.Heal" - + "thCheckB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007" - + "project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region" - + "\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request" - + "_id\"\363\001\n%InsertRegionHealthCheckServiceRe" - + "quest\022[\n\035health_check_service_resource\030\362" - + "\233\320\343\001 \001(\0132+.google.cloud.compute.v1.Healt" - + "hCheckServiceB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r" - + "\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006" - + "region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_r" - + "equest_id\"\370\001\n\'InsertRegionInstanceGroupM" - + "anagerRequest\022^\n\037instance_group_manager_" - + "resource\030\212\212\276| \001(\0132-.google.cloud.compute" - + ".v1.InstanceGroupManagerB\003\340A\002\022!\n\007project" - + "\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B " - + "\001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\t" - + "H\000\210\001\001B\r\n\013_request_id\"\353\001\n#InsertRegionIns" - + "tanceTemplateRequest\022U\n\032instance_templat" - + "e_resource\030\211\352\213\005 \001(\0132).google.cloud.compu" - + "te.v1.InstanceTemplateB\003\340A\002\022!\n\007project\030\231" - + "\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(" - + "\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" - + "\210\001\001B\r\n\013_request_id\"\371\001\n\'InsertRegionNetwo" - + "rkEndpointGroupRequest\022_\n\037network_endpoi" - + "nt_group_resource\030\247\315\333\372\001 \001(\0132-.google.clo" - + "ud.compute.v1.NetworkEndpointGroupB\003\340A\002\022" - + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006re" - + "gion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_i" - + "d\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\355\001\n(Inser" - + "tRegionNetworkFirewallPolicyRequest\022R\n\030f" + + "\"\267\002\n\'InsertNetworkEdgeSecurityServiceReq" + + "uest\022l\n&network_edge_security_service_re" + + "source\030\246\243\333\343\001 \001(\01323.google.cloud.compute." + + "v1.NetworkEdgeSecurityServiceB\003\340A\002\022!\n\007pr" + + "oject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030" + + "\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331" + + "\021 \001(\tH\000\210\001\001\022\035\n\rvalidate_only\030\265\372\337s \001(\010H\001\210\001" + + "\001B\r\n\013_request_idB\020\n\016_validate_only\"\357\001\n!I" + + "nsertNetworkEndpointGroupRequest\022_\n\037netw" + + "ork_endpoint_group_resource\030\247\315\333\372\001 \001(\0132-." + + "google.cloud.compute.v1.NetworkEndpointG" + + "roupB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" + + "ject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone" + + "\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\306\001\n" + + "\"InsertNetworkFirewallPolicyRequest\022R\n\030f" + "irewall_policy_resource\030\274\266\207\354\001 \001(\0132\'.goog" + "le.cloud.compute.v1.FirewallPolicyB\003\340A\002\022" - + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006re" - + "gion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_i" - + "d\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\370\001\n\'Inser" - + "tRegionNotificationEndpointRequest\022^\n\036no" - + "tification_endpoint_resource\030\244\372\261\241\001 \001(\0132-" - + ".google.cloud.compute.v1.NotificationEnd" - + "pointB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pr" + + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" + + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\250\001" + + "\n\024InsertNetworkRequest\022B\n\020network_resour" + + "ce\030\377\335\234: \001(\0132 .google.cloud.compute.v1.Ne" + + "tworkB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pr" + + "oject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_re" + + "quest_id\"\361\001\n\026InsertNodeGroupRequest\022\"\n\022i" + + "nitial_node_count\030\355\310\247\" \001(\005B\003\340A\002\022H\n\023node_" + + "group_resource\030\253\263\372\360\001 \001(\0132\".google.cloud." + + "compute.v1.NodeGroupB\003\340A\002\022!\n\007project\030\231\226\301" + + "l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 " + + "\001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n" + + "\013_request_id\"\331\001\n\031InsertNodeTemplateReque" + + "st\022M\n\026node_template_resource\030\266\332\335< \001(\0132%." + + "google.cloud.compute.v1.NodeTemplateB\003\340A" + + "\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006" + + "region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest" + + "_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\343\001\n\034Ins" + + "ertPacketMirroringRequest\022T\n\031packet_mirr" + + "oring_resource\030\241\374\250\353\001 \001(\0132(.google.cloud." + + "compute.v1.PacketMirroringB\003\340A\002\022!\n\007proje" + + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240" + + "B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001" + + "(\tH\000\210\001\001B\r\n\013_request_id\"\330\001\n$InsertPublicA" + + "dvertisedPrefixeRequest\022!\n\007project\030\231\226\301l " + + "\001(\tB\r\340A\002\362G\007project\022b\n!public_advertised_" + + "prefix_resource\030\217\327\262o \001(\0132/.google.cloud." + + "compute.v1.PublicAdvertisedPrefixB\003\340A\002\022\032" + + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_i" + + "d\"\366\001\n#InsertPublicDelegatedPrefixeReques" + + "t\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022`\n " + + "public_delegated_prefix_resource\030\205\370\330\026 \001(" + + "\0132..google.cloud.compute.v1.PublicDelega" + + "tedPrefixB\003\340A\002\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G" + + "\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_" + + "request_id\"\330\001\n\035InsertRegionAutoscalerReq" + + "uest\022H\n\023autoscaler_resource\030\366\360\377b \001(\0132#.g" + + "oogle.cloud.compute.v1.AutoscalerB\003\340A\002\022!" + + "\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006reg" + + "ion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id" + + "\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\346\001\n!Insert" + + "RegionBackendServiceRequest\022R\n\030backend_s" + + "ervice_resource\030\243\201\337\245\001 \001(\0132\'.google.cloud" + + ".compute.v1.BackendServiceB\003\340A\002\022!\n\007proje" + + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240" + + "B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001" + + "(\tH\000\210\001\001B\r\n\013_request_id\"\330\001\n\035InsertRegionC" + + "ommitmentRequest\022H\n\023commitment_resource\030" + + "\370\243\273t \001(\0132#.google.cloud.compute.v1.Commi" + + "tmentB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pr" + "oject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032" + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_i" - + "d\"\226\002\n!InsertRegionSecurityPolicyRequest\022" + + "d\"\365\001\n\027InsertRegionDiskRequest\022<\n\rdisk_re" + + "source\030\360\320\253\014 \001(\0132\035.google.cloud.compute.v" + + "1.DiskB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "roject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022" + + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\034\n\014source_im" + + "age\030\267\350\206\030 \001(\tH\001\210\001\001B\r\n\013_request_idB\017\n\r_sou" + + "rce_image\"\334\001\n\036InsertRegionHealthCheckReq" + + "uest\022K\n\025health_check_resource\030\250\303\244` \001(\0132$" + + ".google.cloud.compute.v1.HealthCheckB\003\340A" + + "\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006" + + "region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest" + + "_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\363\001\n%Ins" + + "ertRegionHealthCheckServiceRequest\022[\n\035he" + + "alth_check_service_resource\030\362\233\320\343\001 \001(\0132+." + + "google.cloud.compute.v1.HealthCheckServi" + + "ceB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proje" + + "ct\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nr" + + "equest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\370" + + "\001\n\'InsertRegionInstanceGroupManagerReque" + + "st\022^\n\037instance_group_manager_resource\030\212\212" + + "\276| \001(\0132-.google.cloud.compute.v1.Instanc" + + "eGroupManagerB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r" + + "\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006" + + "region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_r" + + "equest_id\"\353\001\n#InsertRegionInstanceTempla" + + "teRequest\022U\n\032instance_template_resource\030" + + "\211\352\213\005 \001(\0132).google.cloud.compute.v1.Insta" + + "nceTemplateB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" + + "\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006re" + + "gion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_req" + + "uest_id\"\371\001\n\'InsertRegionNetworkEndpointG" + + "roupRequest\022_\n\037network_endpoint_group_re" + + "source\030\247\315\333\372\001 \001(\0132-.google.cloud.compute." + + "v1.NetworkEndpointGroupB\003\340A\002\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001" + + "(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" + + "\000\210\001\001B\r\n\013_request_id\"\355\001\n(InsertRegionNetw" + + "orkFirewallPolicyRequest\022R\n\030firewall_pol" + + "icy_resource\030\274\266\207\354\001 \001(\0132\'.google.cloud.co" + + "mpute.v1.FirewallPolicyB\003\340A\002\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001" + + "(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" + + "\000\210\001\001B\r\n\013_request_id\"\370\001\n\'InsertRegionNoti" + + "ficationEndpointRequest\022^\n\036notification_" + + "endpoint_resource\030\244\372\261\241\001 \001(\0132-.google.clo" + + "ud.compute.v1.NotificationEndpointB\003\340A\002\022" + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006re" + "gion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_i" - + "d\030\313\201\331\021 \001(\tH\000\210\001\001\022Q\n\030security_policy_resou" - + "rce\030\374\252\211g \001(\0132\'.google.cloud.compute.v1.S" - + "ecurityPolicyB\003\340A\002\022\035\n\rvalidate_only\030\265\372\337s" - + " \001(\010H\001\210\001\001B\r\n\013_request_idB\020\n\016_validate_on" - + "ly\"\345\001\n!InsertRegionSslCertificateRequest" + + "d\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\226\002\n!Inser" + + "tRegionSecurityPolicyRequest\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001" + + "(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" + + "\000\210\001\001\022Q\n\030security_policy_resource\030\374\252\211g \001(" + + "\0132\'.google.cloud.compute.v1.SecurityPoli" + + "cyB\003\340A\002\022\035\n\rvalidate_only\030\265\372\337s \001(\010H\001\210\001\001B\r" + + "\n\013_request_idB\020\n\016_validate_only\"\345\001\n!Inse" + + "rtRegionSslCertificateRequest\022!\n\007project" + + "\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B " + + "\001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\t" + + "H\000\210\001\001\022Q\n\030ssl_certificate_resource\030\211\324\225V \001" + + "(\0132\'.google.cloud.compute.v1.SslCertific" + + "ateB\003\340A\002B\r\n\013_request_id\"\327\001\n\034InsertRegion" + + "SslPolicyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A" + + "\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006re" + + "gion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022H\n\023ssl_" + + "policy_resource\030\310\210\212\203\001 \001(\0132\".google.cloud" + + ".compute.v1.SslPolicyB\003\340A\002B\r\n\013_request_i" + + "d\"\351\001\n\"InsertRegionTargetHttpProxyRequest" + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006r" + "egion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_" - + "id\030\313\201\331\021 \001(\tH\000\210\001\001\022Q\n\030ssl_certificate_reso" - + "urce\030\211\324\225V \001(\0132\'.google.cloud.compute.v1." - + "SslCertificateB\003\340A\002B\r\n\013_request_id\"\327\001\n\034I" - + "nsertRegionSslPolicyRequest\022!\n\007project\030\231" - + "\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(" - + "\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" - + "\210\001\001\022H\n\023ssl_policy_resource\030\310\210\212\203\001 \001(\0132\".g" - + "oogle.cloud.compute.v1.SslPolicyB\003\340A\002B\r\n" - + "\013_request_id\"\351\001\n\"InsertRegionTargetHttpP" - + "roxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" - + "roject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022" - + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022T\n\032target_ht" - + "tp_proxy_resource\030\250\257\343\013 \001(\0132(.google.clou" - + "d.compute.v1.TargetHttpProxyB\003\340A\002B\r\n\013_re" - + "quest_id\"\355\001\n#InsertRegionTargetHttpsProx" - + "yRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" - + "ect\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\n" - + "request_id\030\313\201\331\021 \001(\tH\000\210\001\001\022W\n\033target_https" - + "_proxy_resource\030\201\255\344\316\001 \001(\0132).google.cloud" - + ".compute.v1.TargetHttpsProxyB\003\340A\002B\r\n\013_re" - + "quest_id\"\346\001\n!InsertRegionTargetTcpProxyR" - + "equest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007projec" - + "t\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nre" - + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022R\n\031target_tcp_pro" - + "xy_resource\030\313\360\311E \001(\0132\'.google.cloud.comp" - + "ute.v1.TargetTcpProxyB\003\340A\002B\r\n\013_request_i" - + "d\"\315\001\n\031InsertRegionUrlMapRequest\022!\n\007proje" - + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240" - + "B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001" - + "(\tH\000\210\001\001\022A\n\020url_map_resource\030\341\220\267P \001(\0132\037.g" - + "oogle.cloud.compute.v1.UrlMapB\003\340A\002B\r\n\013_r" - + "equest_id\"\322\001\n\030InsertReservationRequest\022!" - + "\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreq" - + "uest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022K\n\024reservation_res" - + "ource\030\241\356\364\207\001 \001(\0132$.google.cloud.compute.v" - + "1.ReservationB\003\340A\002\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002" - + "\362G\004zoneB\r\n\013_request_id\"\337\001\n\033InsertResourc" - + "ePolicyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" - + "G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006regi" - + "on\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022Q\n\030resour" - + "ce_policy_resource\030\312\214\321$ \001(\0132\'.google.clo" - + "ud.compute.v1.ResourcePolicyB\003\340A\002B\r\n\013_re" - + "quest_id\"\242\001\n\022InsertRouteRequest\022!\n\007proje" - + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id" - + "\030\313\201\331\021 \001(\tH\000\210\001\001\022>\n\016route_resource\030\304\212\277k \001(" - + "\0132\036.google.cloud.compute.v1.RouteB\003\340A\002B\r" - + "\n\013_request_id\"\306\001\n\023InsertRouterRequest\022!\n" + + "id\030\313\201\331\021 \001(\tH\000\210\001\001\022T\n\032target_http_proxy_re" + + "source\030\250\257\343\013 \001(\0132(.google.cloud.compute.v" + + "1.TargetHttpProxyB\003\340A\002B\r\n\013_request_id\"\355\001" + + "\n#InsertRegionTargetHttpsProxyRequest\022!\n" + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006regi" + "on\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030" - + "\313\201\331\021 \001(\tH\000\210\001\001\022@\n\017router_resource\030\304\200\202J \001(" - + "\0132\037.google.cloud.compute.v1.RouterB\003\340A\002B" - + "\r\n\013_request_id\"\357\001\n\033InsertSecurityPolicyR" - + "equest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007projec" - + "t\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022Q\n\030securit" - + "y_policy_resource\030\374\252\211g \001(\0132\'.google.clou" - + "d.compute.v1.SecurityPolicyB\003\340A\002\022\035\n\rvali" - + "date_only\030\265\372\337s \001(\010H\001\210\001\001B\r\n\013_request_idB\020" - + "\n\016_validate_only\"\351\001\n\036InsertServiceAttach" - + "mentRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" - + "roject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022" - + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022X\n\033service_a" - + "ttachment_resource\030\240\266\304\341\001 \001(\0132*.google.cl" - + "oud.compute.v1.ServiceAttachmentB\003\340A\002B\r\n" - + "\013_request_id\"\254\001\n\025InsertSnapshotRequest\022!" - + "\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreq" - + "uest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022E\n\021snapshot_resour" - + "ce\030\251\270\301\345\001 \001(\0132!.google.cloud.compute.v1.S" - + "napshotB\003\340A\002B\r\n\013_request_id\"\276\001\n\033InsertSs" - + "lCertificateRequest\022!\n\007project\030\231\226\301l \001(\tB" - + "\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210" - + "\001\001\022Q\n\030ssl_certificate_resource\030\211\324\225V \001(\0132" - + "\'.google.cloud.compute.v1.SslCertificate" - + "B\003\340A\002B\r\n\013_request_id\"\260\001\n\026InsertSslPolicy" - + "Request\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proje" - + "ct\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022H\n\023ssl_po" - + "licy_resource\030\310\210\212\203\001 \001(\0132\".google.cloud.c" - + "ompute.v1.SslPolicyB\003\340A\002B\r\n\013_request_id\"" - + "\322\001\n\027InsertSubnetworkRequest\022!\n\007project\030\231" - + "\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(" - + "\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" - + "\210\001\001\022H\n\023subnetwork_resource\030\277\332\221\024 \001(\0132#.go" - + "ogle.cloud.compute.v1.SubnetworkB\003\340A\002B\r\n" - + "\013_request_id\"\303\001\n\034InsertTargetGrpcProxyRe" - + "quest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project" - + "\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022U\n\032target_g" - + "rpc_proxy_resource\030\322\352\353\234\001 \001(\0132(.google.cl" - + "oud.compute.v1.TargetGrpcProxyB\003\340A\002B\r\n\013_" - + "request_id\"\302\001\n\034InsertTargetHttpProxyRequ" - + "est\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032" - + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022T\n\032target_htt" - + "p_proxy_resource\030\250\257\343\013 \001(\0132(.google.cloud" - + ".compute.v1.TargetHttpProxyB\003\340A\002B\r\n\013_req" - + "uest_id\"\306\001\n\035InsertTargetHttpsProxyReques" - + "t\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\n" - + "request_id\030\313\201\331\021 \001(\tH\000\210\001\001\022W\n\033target_https" - + "_proxy_resource\030\201\255\344\316\001 \001(\0132).google.cloud" - + ".compute.v1.TargetHttpsProxyB\003\340A\002B\r\n\013_re" - + "quest_id\"\334\001\n\033InsertTargetInstanceRequest" - + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nr" - + "equest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022R\n\030target_instan" - + "ce_resource\030\312\342\240\315\001 \001(\0132\'.google.cloud.com" - + "pute.v1.TargetInstanceB\003\340A\002\022\033\n\004zone\030\254\307\344\001" - + " \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\323\001\n\027Inse" - + "rtTargetPoolRequest\022!\n\007project\030\231\226\301l \001(\tB" - + "\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G" - + "\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022I\n\024t" - + "arget_pool_resource\030\243\335\2450 \001(\0132#.google.cl" - + "oud.compute.v1.TargetPoolB\003\340A\002B\r\n\013_reque" - + "st_id\"\277\001\n\033InsertTargetSslProxyRequest\022!\n" - + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequ" - + "est_id\030\313\201\331\021 \001(\tH\000\210\001\001\022R\n\031target_ssl_proxy" - + "_resource\030\300\375\333C \001(\0132\'.google.cloud.comput" - + "e.v1.TargetSslProxyB\003\340A\002B\r\n\013_request_id\"" - + "\277\001\n\033InsertTargetTcpProxyRequest\022!\n\007proje" - + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id" - + "\030\313\201\331\021 \001(\tH\000\210\001\001\022R\n\031target_tcp_proxy_resou" - + "rce\030\313\360\311E \001(\0132\'.google.cloud.compute.v1.T" - + "argetTcpProxyB\003\340A\002B\r\n\013_request_id\"\345\001\n\035In" - + "sertTargetVpnGatewayRequest\022!\n\007project\030\231" - + "\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(" - + "\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" - + "\210\001\001\022U\n\033target_vpn_gateway_resource\030\202\263\036 \001" - + "(\0132).google.cloud.compute.v1.TargetVpnGa" - + "tewayB\003\340A\002B\r\n\013_request_id\"\246\001\n\023InsertUrlM" - + "apRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" - + "ject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022A\n\020url_" - + "map_resource\030\341\220\267P \001(\0132\037.google.cloud.com" - + "pute.v1.UrlMapB\003\340A\002B\r\n\013_request_id\"\323\001\n\027I" - + "nsertVpnGatewayRequest\022!\n\007project\030\231\226\301l \001" - + "(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A" - + "\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022I" - + "\n\024vpn_gateway_resource\030\224\267\216W \001(\0132#.google" - + ".cloud.compute.v1.VpnGatewayB\003\340A\002B\r\n\013_re" - + "quest_id\"\320\001\n\026InsertVpnTunnelRequest\022!\n\007p" + + "\313\201\331\021 \001(\tH\000\210\001\001\022W\n\033target_https_proxy_reso" + + "urce\030\201\255\344\316\001 \001(\0132).google.cloud.compute.v1" + + ".TargetHttpsProxyB\003\340A\002B\r\n\013_request_id\"\346\001" + + "\n!InsertRegionTargetTcpProxyRequest\022!\n\007p" + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region" + "\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201" - + "\331\021 \001(\tH\000\210\001\001\022G\n\023vpn_tunnel_resource\030\272\241\264) " - + "\001(\0132\".google.cloud.compute.v1.VpnTunnelB" - + "\003\340A\002B\r\n\013_request_id\"\300\034\n\010Instance\022\\\n\031adva" + + "\331\021 \001(\tH\000\210\001\001\022R\n\031target_tcp_proxy_resource" + + "\030\313\360\311E \001(\0132\'.google.cloud.compute.v1.Targ" + + "etTcpProxyB\003\340A\002B\r\n\013_request_id\"\315\001\n\031Inser" + + "tRegionUrlMapRequest\022!\n\007project\030\231\226\301l \001(\t" + + "B\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362" + + "G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022A\n\020" + + "url_map_resource\030\341\220\267P \001(\0132\037.google.cloud" + + ".compute.v1.UrlMapB\003\340A\002B\r\n\013_request_id\"\322" + + "\001\n\030InsertReservationRequest\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331" + + "\021 \001(\tH\000\210\001\001\022K\n\024reservation_resource\030\241\356\364\207\001" + + " \001(\0132$.google.cloud.compute.v1.Reservati" + + "onB\003\340A\002\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013" + + "_request_id\"\337\001\n\033InsertResourcePolicyRequ" + + "est\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037" + + "\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreque" + + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001\022Q\n\030resource_policy_r" + + "esource\030\312\214\321$ \001(\0132\'.google.cloud.compute." + + "v1.ResourcePolicyB\003\340A\002B\r\n\013_request_id\"\242\001" + + "\n\022InsertRouteRequest\022!\n\007project\030\231\226\301l \001(\t" + + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001\022>\n\016route_resource\030\304\212\277k \001(\0132\036.google." + + "cloud.compute.v1.RouteB\003\340A\002B\r\n\013_request_" + + "id\"\306\001\n\023InsertRouterRequest\022!\n\007project\030\231\226" + + "\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\t" + + "B\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210" + + "\001\001\022@\n\017router_resource\030\304\200\202J \001(\0132\037.google." + + "cloud.compute.v1.RouterB\003\340A\002B\r\n\013_request" + + "_id\"\357\001\n\033InsertSecurityPolicyRequest\022!\n\007p" + + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreques" + + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001\022Q\n\030security_policy_re" + + "source\030\374\252\211g \001(\0132\'.google.cloud.compute.v" + + "1.SecurityPolicyB\003\340A\002\022\035\n\rvalidate_only\030\265" + + "\372\337s \001(\010H\001\210\001\001B\r\n\013_request_idB\020\n\016_validate" + + "_only\"\351\001\n\036InsertServiceAttachmentRequest" + + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006r" + + "egion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_" + + "id\030\313\201\331\021 \001(\tH\000\210\001\001\022X\n\033service_attachment_r" + + "esource\030\240\266\304\341\001 \001(\0132*.google.cloud.compute" + + ".v1.ServiceAttachmentB\003\340A\002B\r\n\013_request_i" + + "d\"\254\001\n\025InsertSnapshotRequest\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331" + + "\021 \001(\tH\000\210\001\001\022E\n\021snapshot_resource\030\251\270\301\345\001 \001(" + + "\0132!.google.cloud.compute.v1.SnapshotB\003\340A" + + "\002B\r\n\013_request_id\"\276\001\n\033InsertSslCertificat" + + "eRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" + + "ect\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022Q\n\030ssl_c" + + "ertificate_resource\030\211\324\225V \001(\0132\'.google.cl" + + "oud.compute.v1.SslCertificateB\003\340A\002B\r\n\013_r" + + "equest_id\"\260\001\n\026InsertSslPolicyRequest\022!\n\007" + + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreque" + + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001\022H\n\023ssl_policy_resour" + + "ce\030\310\210\212\203\001 \001(\0132\".google.cloud.compute.v1.S" + + "slPolicyB\003\340A\002B\r\n\013_request_id\"\322\001\n\027InsertS" + + "ubnetworkRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A" + + "\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006re" + + "gion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022H\n\023subn" + + "etwork_resource\030\277\332\221\024 \001(\0132#.google.cloud." + + "compute.v1.SubnetworkB\003\340A\002B\r\n\013_request_i" + + "d\"\303\001\n\034InsertTargetGrpcProxyRequest\022!\n\007pr" + + "oject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest" + + "_id\030\313\201\331\021 \001(\tH\000\210\001\001\022U\n\032target_grpc_proxy_r" + + "esource\030\322\352\353\234\001 \001(\0132(.google.cloud.compute" + + ".v1.TargetGrpcProxyB\003\340A\002B\r\n\013_request_id\"" + + "\302\001\n\034InsertTargetHttpProxyRequest\022!\n\007proj" + + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_i" + + "d\030\313\201\331\021 \001(\tH\000\210\001\001\022T\n\032target_http_proxy_res" + + "ource\030\250\257\343\013 \001(\0132(.google.cloud.compute.v1" + + ".TargetHttpProxyB\003\340A\002B\r\n\013_request_id\"\306\001\n" + + "\035InsertTargetHttpsProxyRequest\022!\n\007projec" + + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030" + + "\313\201\331\021 \001(\tH\000\210\001\001\022W\n\033target_https_proxy_reso" + + "urce\030\201\255\344\316\001 \001(\0132).google.cloud.compute.v1" + + ".TargetHttpsProxyB\003\340A\002B\r\n\013_request_id\"\334\001" + + "\n\033InsertTargetInstanceRequest\022!\n\007project" + + "\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313" + + "\201\331\021 \001(\tH\000\210\001\001\022R\n\030target_instance_resource" + + "\030\312\342\240\315\001 \001(\0132\'.google.cloud.compute.v1.Tar" + + "getInstanceB\003\340A\002\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G" + + "\004zoneB\r\n\013_request_id\"\323\001\n\027InsertTargetPoo" + + "lRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" + + "ect\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\n" + + "request_id\030\313\201\331\021 \001(\tH\000\210\001\001\022I\n\024target_pool_" + + "resource\030\243\335\2450 \001(\0132#.google.cloud.compute" + + ".v1.TargetPoolB\003\340A\002B\r\n\013_request_id\"\277\001\n\033I" + + "nsertTargetSslProxyRequest\022!\n\007project\030\231\226" + + "\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021" + + " \001(\tH\000\210\001\001\022R\n\031target_ssl_proxy_resource\030\300" + + "\375\333C \001(\0132\'.google.cloud.compute.v1.Target" + + "SslProxyB\003\340A\002B\r\n\013_request_id\"\277\001\n\033InsertT" + + "argetTcpProxyRequest\022!\n\007project\030\231\226\301l \001(\t" + + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001\022R\n\031target_tcp_proxy_resource\030\313\360\311E \001(" + + "\0132\'.google.cloud.compute.v1.TargetTcpPro" + + "xyB\003\340A\002B\r\n\013_request_id\"\345\001\n\035InsertTargetV" + + "pnGatewayRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A" + + "\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006re" + + "gion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022U\n\033targ" + + "et_vpn_gateway_resource\030\202\263\036 \001(\0132).google" + + ".cloud.compute.v1.TargetVpnGatewayB\003\340A\002B" + + "\r\n\013_request_id\"\246\001\n\023InsertUrlMapRequest\022!" + + "\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreq" + + "uest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022A\n\020url_map_resourc" + + "e\030\341\220\267P \001(\0132\037.google.cloud.compute.v1.Url" + + "MapB\003\340A\002B\r\n\013_request_id\"\323\001\n\027InsertVpnGat" + + "ewayRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "roject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022" + + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022I\n\024vpn_gatew" + + "ay_resource\030\224\267\216W \001(\0132#.google.cloud.comp" + + "ute.v1.VpnGatewayB\003\340A\002B\r\n\013_request_id\"\320\001" + + "\n\026InsertVpnTunnelRequest\022!\n\007project\030\231\226\301l" + + " \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014" + + "\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001" + + "\022G\n\023vpn_tunnel_resource\030\272\241\264) \001(\0132\".googl" + + "e.cloud.compute.v1.VpnTunnelB\003\340A\002B\r\n\013_re" + + "quest_id\"\300\034\n\010Instance\022\\\n\031advanced_machin" + + "e_features\030\262\347\252\303\001 \001(\01320.google.cloud.comp" + + "ute.v1.AdvancedMachineFeaturesH\000\210\001\001\022\037\n\016c" + + "an_ip_forward\030\374\206\204\337\001 \001(\010H\001\210\001\001\022b\n\034confiden" + + "tial_instance_config\030\365\222\372\351\001 \001(\01323.google." + + "cloud.compute.v1.ConfidentialInstanceCon" + + "figH\002\210\001\001\022\035\n\014cpu_platform\030\252\352\321\303\001 \001(\tH\003\210\001\001\022" + + "\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\004\210\001\001\022$\n\023d" + + "eletion_protection\030\352\377\262\332\001 \001(\010H\005\210\001\001\022\034\n\013des" + + "cription\030\374\207\326\311\001 \001(\tH\006\210\001\001\0227\n\005disks\030\366\314\312- \003(" + + "\0132%.google.cloud.compute.v1.AttachedDisk" + + "\022F\n\016display_device\030\363\210\274{ \001(\0132&.google.clo" + + "ud.compute.v1.DisplayDeviceH\007\210\001\001\022\033\n\013fing" + + "erprint\030\344\321\363o \001(\tH\010\210\001\001\022J\n\022guest_accelerat" + + "ors\030\357\314\207\335\001 \003(\0132*.google.cloud.compute.v1." + + "AcceleratorConfig\022\030\n\010hostname\030\263\270\205q \001(\tH\t" + + "\210\001\001\022\020\n\002id\030\233\032 \001(\004H\n\210\001\001\022*\n\032key_revocation_" + + "action_type\030\342\334\300p \001(\tH\013\210\001\001\022\024\n\004kind\030\224\367\310\001 \001" + + "(\tH\014\210\001\001\022!\n\021label_fingerprint\030\231\360\367T \001(\tH\r\210" + + "\001\001\022A\n\006labels\030\377\277\301\356\001 \003(\0132-.google.cloud.co" + + "mpute.v1.Instance.LabelsEntry\022%\n\024last_st" + + "art_timestamp\030\320\243\321\323\001 \001(\tH\016\210\001\001\022$\n\023last_sto" + + "p_timestamp\030\342\333\354\304\001 \001(\tH\017\210\001\001\022)\n\030last_suspe" + + "nded_timestamp\030\211\251\361\251\001 \001(\tH\020\210\001\001\022\034\n\014machine" + + "_type\030\262\260\312l \001(\tH\021\210\001\001\022;\n\010metadata\030\257\366\265) \001(\013" + + "2!.google.cloud.compute.v1.MetadataH\022\210\001\001" + + "\022 \n\020min_cpu_platform\030\367\233\352s \001(\tH\023\210\001\001\022\024\n\004na" + + "me\030\213\365\315\001 \001(\tH\024\210\001\001\022H\n\022network_interfaces\030\213" + + "\332\222\031 \003(\0132).google.cloud.compute.v1.Networ" + + "kInterface\022^\n\032network_performance_config" + + "\030\342\227\370\275\001 \001(\01321.google.cloud.compute.v1.Net" + + "workPerformanceConfigH\025\210\001\001\022?\n\006params\030\206\363\253" + + "% \001(\0132\'.google.cloud.compute.v1.Instance" + + "ParamsH\026\210\001\001\022*\n\032private_ipv6_google_acces" + + "s\030\216\314\202\027 \001(\tH\027\210\001\001\022R\n\024reservation_affinity\030" + + "\273\270\242K \001(\0132,.google.cloud.compute.v1.Reser" + + "vationAffinityH\030\210\001\001\022\034\n\021resource_policies" + + "\030\341\234\314\n \003(\t\022H\n\017resource_status\030\303\372\367v \001(\0132\'." + + "google.cloud.compute.v1.ResourceStatusH\031" + + "\210\001\001\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001(\010H\032\210\001\001\022@\n\ns" + + "cheduling\030\224\313\261\270\001 \001(\0132#.google.cloud.compu" + + "te.v1.SchedulingH\033\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" + + " \001(\tH\034\210\001\001\022E\n\020service_accounts\030\260\304\253\204\001 \003(\0132" + + "\'.google.cloud.compute.v1.ServiceAccount" + + "\022Y\n\030shielded_instance_config\030\265\213\221\006 \001(\0132/." + + "google.cloud.compute.v1.ShieldedInstance" + + "ConfigH\035\210\001\001\022l\n\"shielded_instance_integri" + + "ty_policy\030\227\242\207N \001(\01328.google.cloud.comput" + + "e.v1.ShieldedInstanceIntegrityPolicyH\036\210\001" + + "\001\022$\n\024source_machine_image\030\277\334\260\n \001(\tH\037\210\001\001\022" + + "c\n#source_machine_image_encryption_key\030\243" + + "\373\371[ \001(\0132..google.cloud.compute.v1.Custom" + + "erEncryptionKeyH \210\001\001\022 \n\020start_restricted" + + "\030\330\320\375: \001(\010H!\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\"\210\001\001\022\037" + + "\n\016status_message\030\272\311\351\215\001 \001(\tH#\210\001\001\0223\n\004tags\030" + + "\231\350\330\001 \001(\0132\035.google.cloud.compute.v1.TagsH" + + "$\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH%\210\001\001\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\215\001\n\027Ke" + + "yRevocationActionType\022(\n$UNDEFINED_KEY_R" + + "EVOCATION_ACTION_TYPE\020\000\022.\n&KEY_REVOCATIO" + + "N_ACTION_TYPE_UNSPECIFIED\020\332\221\336\336\001\022\013\n\004NONE\020" + + "\270\316\222\001\022\013\n\004STOP\020\202\200\234\001\"\300\001\n\027PrivateIpv6GoogleA" + + "ccess\022(\n$UNDEFINED_PRIVATE_IPV6_GOOGLE_A" + + "CCESS\020\000\022-\n%ENABLE_BIDIRECTIONAL_ACCESS_T" + + "O_GOOGLE\020\272\312\211\314\001\022+\n#ENABLE_OUTBOUND_VM_ACC" + + "ESS_TO_GOOGLE\020\327\372\266\211\001\022\037\n\027INHERIT_FROM_SUBN" + + "ETWORK\020\277\250\354\374\001\"\334\001\n\006Status\022\024\n\020UNDEFINED_STA" + + "TUS\020\000\022\026\n\016DEPROVISIONING\020\356\223\304\314\001\022\024\n\014PROVISI" + + "ONING\020\355\365\332\212\001\022\021\n\tREPAIRING\020\225\202\225\305\001\022\016\n\007RUNNIN" + + "G\020\237\303\3529\022\017\n\007STAGING\020\233\310\306\315\001\022\017\n\007STOPPED\020\255\273\354\323\001" + + "\022\020\n\010STOPPING\020\364\320\242\247\001\022\020\n\tSUSPENDED\020\273\273\266\030\022\022\n\n" + + "SUSPENDING\020\246\324\230\365\001\022\021\n\nTERMINATED\020\243\364\233wB\034\n\032_" + + "advanced_machine_featuresB\021\n\017_can_ip_for" + + "wardB\037\n\035_confidential_instance_configB\017\n" + + "\r_cpu_platformB\025\n\023_creation_timestampB\026\n" + + "\024_deletion_protectionB\016\n\014_descriptionB\021\n" + + "\017_display_deviceB\016\n\014_fingerprintB\013\n\t_hos" + + "tnameB\005\n\003_idB\035\n\033_key_revocation_action_t" + + "ypeB\007\n\005_kindB\024\n\022_label_fingerprintB\027\n\025_l" + + "ast_start_timestampB\026\n\024_last_stop_timest" + + "ampB\033\n\031_last_suspended_timestampB\017\n\r_mac" + + "hine_typeB\013\n\t_metadataB\023\n\021_min_cpu_platf" + + "ormB\007\n\005_nameB\035\n\033_network_performance_con" + + "figB\t\n\007_paramsB\035\n\033_private_ipv6_google_a" + + "ccessB\027\n\025_reservation_affinityB\022\n\020_resou" + + "rce_statusB\020\n\016_satisfies_pzsB\r\n\013_schedul" + + "ingB\014\n\n_self_linkB\033\n\031_shielded_instance_" + + "configB%\n#_shielded_instance_integrity_p" + + "olicyB\027\n\025_source_machine_imageB&\n$_sourc", + "e_machine_image_encryption_keyB\023\n\021_start" + + "_restrictedB\t\n\007_statusB\021\n\017_status_messag" + + "eB\007\n\005_tagsB\007\n\005_zone\"\271\003\n\026InstanceAggregat" + + "edList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022L\n\005items\030\300\317\367/ \003" + + "(\0132:.google.cloud.compute.v1.InstanceAgg" + + "regatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH" + + "\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n" + + "\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachable" + + "s\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google." + + "cloud.compute.v1.WarningH\004\210\001\001\032Z\n\nItemsEn" + + "try\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google" + + ".cloud.compute.v1.InstancesScopedList:\0028" + + "\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n" + + "\n_self_linkB\n\n\010_warning\"\251\001\n\027InstanceCons" + + "umptionData\022R\n\020consumption_info\030\322\345\344E \001(\013" + + "20.google.cloud.compute.v1.InstanceConsu" + + "mptionInfoH\000\210\001\001\022\030\n\010instance\030\225\251\332\010 \001(\tH\001\210\001" + + "\001B\023\n\021_consumption_infoB\013\n\t_instance\"\320\001\n\027" + + "InstanceConsumptionInfo\022\033\n\nguest_cpus\030\322\313" + + "\310\273\001 \001(\005H\000\210\001\001\022\035\n\014local_ssd_gb\030\312\210\377\234\001 \001(\005H\001" + + "\210\001\001\022\031\n\tmemory_mb\030\223\223\2507 \001(\005H\002\210\001\001\022\036\n\rmin_no" + + "de_cpus\030\273\244\242\227\001 \001(\005H\003\210\001\001B\r\n\013_guest_cpusB\017\n" + + "\r_local_ssd_gbB\014\n\n_memory_mbB\020\n\016_min_nod" + + "e_cpus\"\225\004\n\rInstanceGroup\022\"\n\022creation_tim" + + "estamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311" + + "\001 \001(\tH\001\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\002\210\001\001\022" + + "\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022" + + "\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022;\n\013named_ports\030\214\307\362" + + "\313\001 \003(\0132\".google.cloud.compute.v1.NamedPo" + + "rt\022\027\n\007network\030\256\264\205o \001(\tH\006\210\001\001\022\026\n\006region\030\364\315" + + "\240B \001(\tH\007\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022" + + "\024\n\004size\030\201\300\327\001 \001(\005H\t\210\001\001\022\033\n\nsubnetwork\030\356\247\344\222" + + "\001 \001(\tH\n\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH\013\210\001\001B\025\n\023_cre" + + "ation_timestampB\016\n\014_descriptionB\016\n\014_fing" + + "erprintB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\n\n\010_net" + + "workB\t\n\007_regionB\014\n\n_self_linkB\007\n\005_sizeB\r" + + "\n\013_subnetworkB\007\n\005_zone\"\310\003\n\033InstanceGroup" + + "AggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022Q\n\005item" + + "s\030\300\317\367/ \003(\0132?.google.cloud.compute.v1.Ins" + + "tanceGroupAggregatedList.ItemsEntry\022\024\n\004k" + + "ind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206" + + "& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027" + + "\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 " + + "\001(\0132 .google.cloud.compute.v1.WarningH\004\210" + + "\001\001\032_\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022@\n\005value\030\002" + + " \001(\01321.google.cloud.compute.v1.InstanceG" + + "roupsScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_" + + "next_page_tokenB\014\n\n_self_linkB\n\n\010_warnin" + + "g\"\253\002\n\021InstanceGroupList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" + + "\001\0228\n\005items\030\300\317\367/ \003(\0132&.google.cloud.compu" + + "te.v1.InstanceGroup\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001" + + "\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tse" + + "lf_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001" + + "(\0132 .google.cloud.compute.v1.WarningH\004\210\001" + + "\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n" + + "\n_self_linkB\n\n\010_warning\"\215\014\n\024InstanceGrou" + + "pManager\022a\n\025auto_healing_policies\030\205\347\350\331\001 " + + "\003(\0132>.google.cloud.compute.v1.InstanceGr" + + "oupManagerAutoHealingPolicy\022#\n\022base_inst" + + "ance_name\030\207\226\305\271\001 \001(\tH\000\210\001\001\022\"\n\022creation_tim" + + "estamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\\\n\017current_actions\030" + + "\267\310\234N \001(\0132;.google.cloud.compute.v1.Insta" + + "nceGroupManagerActionsSummaryH\002\210\001\001\022\034\n\013de" + + "scription\030\374\207\326\311\001 \001(\tH\003\210\001\001\022Q\n\023distribution" + + "_policy\030\315\356\362\376\001 \001(\0132+.google.cloud.compute" + + ".v1.DistributionPolicyH\004\210\001\001\022\033\n\013fingerpri" + + "nt\030\344\321\363o \001(\tH\005\210\001\001\022\020\n\002id\030\233\032 \001(\004H\006\210\001\001\022\036\n\016in" + + "stance_group\030\325\324\325& \001(\tH\007\210\001\001\022\"\n\021instance_t" + + "emplate\030\344\201\273\223\001 \001(\tH\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH" + + "\t\210\001\001\022/\n\036list_managed_instances_results\030\264" + + "\244\225\215\001 \001(\tH\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\013\210\001\001\022;\n\013n" + + "amed_ports\030\214\307\362\313\001 \003(\0132\".google.cloud.comp" + + "ute.v1.NamedPort\022\026\n\006region\030\364\315\240B \001(\tH\014\210\001\001" + + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\r\210\001\001\022H\n\017stateful" + + "_policy\030\205\303\325\026 \001(\0132\'.google.cloud.compute." + + "v1.StatefulPolicyH\016\210\001\001\022K\n\006status\030\362\237\267V \001(" + + "\01323.google.cloud.compute.v1.InstanceGrou" + + "pManagerStatusH\017\210\001\001\022\030\n\014target_pools\030\251\237\240\240" + + "\001 \003(\t\022\033\n\013target_size\030\357\363\375\035 \001(\005H\020\210\001\001\022X\n\rup" + + "date_policy\030\350\312\352S \001(\01329.google.cloud.comp" + + "ute.v1.InstanceGroupManagerUpdatePolicyH" + + "\021\210\001\001\022I\n\010versions\030\233\375\271M \003(\01324.google.cloud" + + ".compute.v1.InstanceGroupManagerVersion\022" + + "\024\n\004zone\030\254\307\344\001 \001(\tH\022\210\001\001\"n\n\033ListManagedInst" + + "ancesResults\022,\n(UNDEFINED_LIST_MANAGED_I" + + "NSTANCES_RESULTS\020\000\022\017\n\010PAGELESS\020\250\251\254\017\022\020\n\tP" + + "AGINATED\020\255\205\225\023B\025\n\023_base_instance_nameB\025\n\023" + + "_creation_timestampB\022\n\020_current_actionsB" + + "\016\n\014_descriptionB\026\n\024_distribution_policyB" + + "\016\n\014_fingerprintB\005\n\003_idB\021\n\017_instance_grou" + + "pB\024\n\022_instance_templateB\007\n\005_kindB!\n\037_lis" + + "t_managed_instances_resultsB\007\n\005_nameB\t\n\007" + + "_regionB\014\n\n_self_linkB\022\n\020_stateful_polic" + + "yB\t\n\007_statusB\016\n\014_target_sizeB\020\n\016_update_" + + "policyB\007\n\005_zone\"\323\004\n\"InstanceGroupManager" + + "ActionsSummary\022\033\n\nabandoning\030\315\362\350\321\001 \001(\005H\000" + + "\210\001\001\022\030\n\010creating\030\271\335\205d \001(\005H\001\210\001\001\022)\n\030creatin" + + "g_without_retries\030\311\366\261\260\001 \001(\005H\002\210\001\001\022\031\n\010dele" + + "ting\030\250\307\357\206\001 \001(\005H\003\210\001\001\022\024\n\004none\030\270\336\316\001 \001(\005H\004\210\001" + + "\001\022\033\n\nrecreating\030\354\263\326\241\001 \001(\005H\005\210\001\001\022\032\n\nrefres" + + "hing\030\247\246\305f \001(\005H\006\210\001\001\022\033\n\nrestarting\030\363\226\304\261\001 \001" + + "(\005H\007\210\001\001\022\030\n\010resuming\030\252\233\362_ \001(\005H\010\210\001\001\022\030\n\010sta" + + "rting\030\300\300\363s \001(\005H\t\210\001\001\022\030\n\010stopping\030\364\360\2122 \001(\005" + + "H\n\210\001\001\022\032\n\nsuspending\030\246\374\360\r \001(\005H\013\210\001\001\022\032\n\tver" + + "ifying\030\311\241\254\327\001 \001(\005H\014\210\001\001B\r\n\013_abandoningB\013\n\t" + + "_creatingB\033\n\031_creating_without_retriesB\013" + + "\n\t_deletingB\007\n\005_noneB\r\n\013_recreatingB\r\n\013_" + + "refreshingB\r\n\013_restartingB\013\n\t_resumingB\013" + + "\n\t_startingB\013\n\t_stoppingB\r\n\013_suspendingB" + + "\014\n\n_verifying\"\335\003\n\"InstanceGroupManagerAg" + + "gregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022X\n\005items\030" + + "\300\317\367/ \003(\0132F.google.cloud.compute.v1.Insta" + + "nceGroupManagerAggregatedList.ItemsEntry" + + "\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_toke" + + "n\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003" + + "\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030" + + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" + + "ngH\004\210\001\001\032f\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022G\n\005va" + + "lue\030\002 \001(\01328.google.cloud.compute.v1.Inst" + + "anceGroupManagersScopedList:\0028\001B\005\n\003_idB\007" + + "\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_lin" + + "kB\n\n\010_warning\"\220\001\n%InstanceGroupManagerAu" + + "toHealingPolicy\022\035\n\014health_check\030\345\252\244\223\001 \001(" + + "\tH\000\210\001\001\022!\n\021initial_delay_sec\030\332\360\300} \001(\005H\001\210\001" + + "\001B\017\n\r_health_checkB\024\n\022_initial_delay_sec" + + "\"\271\002\n\030InstanceGroupManagerList\022\020\n\002id\030\233\032 \001" + + "(\tH\000\210\001\001\022?\n\005items\030\300\317\367/ \003(\0132-.google.cloud" + + ".compute.v1.InstanceGroupManager\022\024\n\004kind" + + "\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001" + + "(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007w" + + "arning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v" + + "1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_" + + "page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\313\002\n" + + "\032InstanceGroupManagerStatus\022\033\n\nautoscale" + + "r\030\327\375\322\366\001 \001(\tH\000\210\001\001\022\031\n\tis_stable\030\360\357\3303 \001(\010H\001" + + "\210\001\001\022U\n\010stateful\030\314\346\310t \001(\0132;.google.cloud." + + "compute.v1.InstanceGroupManagerStatusSta" + + "tefulH\002\210\001\001\022a\n\016version_target\030\330\335\376\211\001 \001(\0132@" + + ".google.cloud.compute.v1.InstanceGroupMa" + + "nagerStatusVersionTargetH\003\210\001\001B\r\n\013_autosc" + + "alerB\014\n\n_is_stableB\013\n\t_statefulB\021\n\017_vers" + + "ion_target\"\360\001\n\"InstanceGroupManagerStatu" + + "sStateful\022#\n\023has_stateful_config\030\360\347\3264 \001(" + + "\010H\000\210\001\001\022t\n\024per_instance_configs\030\251\325\370\372\001 \001(\013" + + "2M.google.cloud.compute.v1.InstanceGroup" + + "ManagerStatusStatefulPerInstanceConfigsH" + + "\001\210\001\001B\026\n\024_has_stateful_configB\027\n\025_per_ins" + + "tance_configs\"h\n4InstanceGroupManagerSta" + + "tusStatefulPerInstanceConfigs\022\036\n\rall_eff" + + "ective\030\211\221\247\366\001 \001(\010H\000\210\001\001B\020\n\016_all_effective\"" + + "U\n\'InstanceGroupManagerStatusVersionTarg" + + "et\022\033\n\nis_reached\030\275\376\310\316\001 \001(\010H\000\210\001\001B\r\n\013_is_r" + + "eached\"\334\006\n InstanceGroupManagerUpdatePol" + + "icy\022-\n\034instance_redistribution_type\030\230\337\304\213" + + "\001 \001(\tH\000\210\001\001\022C\n\tmax_surge\030\223\311\243\220\001 \001(\0132\'.goog" + + "le.cloud.compute.v1.FixedOrPercentH\001\210\001\001\022" + + "I\n\017max_unavailable\030\365\313\213\301\001 \001(\0132\'.google.cl" + + "oud.compute.v1.FixedOrPercentH\002\210\001\001\022\037\n\016mi" + + "nimal_action\030\224\215\202\201\001 \001(\tH\003\210\001\001\022.\n\036most_disr" + + "uptive_allowed_action\030\215\316\302\037 \001(\tH\004\210\001\001\022#\n\022r" + + "eplacement_method\030\256\317\237\361\001 \001(\tH\005\210\001\001\022\024\n\004type" + + "\030\272\236\332\001 \001(\tH\006\210\001\001\"H\n\032InstanceRedistribution" + + "Type\022*\n&UNDEFINED_INSTANCE_REDISTRIBUTIO" + + "N_TYPE\020\000\"-\n\rMinimalAction\022\034\n\030UNDEFINED_M" + + "INIMAL_ACTION\020\000\"K\n\033MostDisruptiveAllowed" + + "Action\022,\n(UNDEFINED_MOST_DISRUPTIVE_ALLO" + + "WED_ACTION\020\000\"[\n\021ReplacementMethod\022 \n\034UND" + + "EFINED_REPLACEMENT_METHOD\020\000\022\020\n\010RECREATE\020" + + "\357\331\233\371\001\022\022\n\nSUBSTITUTE\020\232\241\372\205\001\"1\n\004Type\022\022\n\016UND" + + "EFINED_TYPE\020\000\022\025\n\rOPPORTUNISTIC\020\351\267\350\314\001B\037\n\035" + + "_instance_redistribution_typeB\014\n\n_max_su" + + "rgeB\022\n\020_max_unavailableB\021\n\017_minimal_acti" + + "onB!\n\037_most_disruptive_allowed_actionB\025\n" + + "\023_replacement_methodB\007\n\005_type\"\314\001\n\033Instan" + + "ceGroupManagerVersion\022\"\n\021instance_templa" + + "te\030\344\201\273\223\001 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001\001\022" + + "D\n\013target_size\030\357\363\375\035 \001(\0132\'.google.cloud.c" + + "ompute.v1.FixedOrPercentH\002\210\001\001B\024\n\022_instan" + + "ce_templateB\007\n\005_nameB\016\n\014_target_size\"D\n," + + "InstanceGroupManagersAbandonInstancesReq" + + "uest\022\024\n\tinstances\030\376\374\357\r \003(\t\"\365\002\n(InstanceG" + + "roupManagersApplyUpdatesRequest\022\036\n\rall_i" + + "nstances\030\340\272\276\300\001 \001(\010H\000\210\001\001\022\024\n\tinstances\030\376\374\357" + + "\r \003(\t\022\037\n\016minimal_action\030\224\215\202\201\001 \001(\tH\001\210\001\001\022." + + "\n\036most_disruptive_allowed_action\030\215\316\302\037 \001(" + + "\tH\002\210\001\001\"-\n\rMinimalAction\022\034\n\030UNDEFINED_MIN" + + "IMAL_ACTION\020\000\"K\n\033MostDisruptiveAllowedAc" + + "tion\022,\n(UNDEFINED_MOST_DISRUPTIVE_ALLOWE" + + "D_ACTION\020\000B\020\n\016_all_instancesB\021\n\017_minimal" + + "_actionB!\n\037_most_disruptive_allowed_acti" + + "on\"o\n+InstanceGroupManagersCreateInstanc" + + "esRequest\022@\n\tinstances\030\376\374\357\r \003(\0132*.google" + + ".cloud.compute.v1.PerInstanceConfig\"\236\001\n+" + + "InstanceGroupManagersDeleteInstancesRequ" + + "est\022\024\n\tinstances\030\376\374\357\r \003(\t\0222\n\"skip_instan" + + "ces_on_validation_error\030\241\366\257\023 \001(\010H\000\210\001\001B%\n" + + "#_skip_instances_on_validation_error\"D\n0" + + "InstanceGroupManagersDeletePerInstanceCo" + + "nfigsReq\022\020\n\005names\030\310\256\3571 \003(\t\"\244\001\n\'InstanceG" + + "roupManagersListErrorsResponse\022D\n\005items\030" + + "\300\317\367/ \003(\01322.google.cloud.compute.v1.Insta" + + "nceManagedByIgmError\022\037\n\017next_page_token\030" + + "\225\272\206& \001(\tH\000\210\001\001B\022\n\020_next_page_token\"\261\001\n1In" + + "stanceGroupManagersListManagedInstancesR" + + "esponse\022G\n\021managed_instances\030\336\233\251\240\001 \003(\0132(" + + ".google.cloud.compute.v1.ManagedInstance" + + "\022\037\n\017next_page_token\030\225\272\206& \001(\tH\000\210\001\001B\022\n\020_ne" + + "xt_page_token\"\353\001\n/InstanceGroupManagersL" + + "istPerInstanceConfigsResp\022<\n\005items\030\300\317\367/ " + + "\003(\0132*.google.cloud.compute.v1.PerInstanc" + + "eConfig\022\037\n\017next_page_token\030\225\272\206& \001(\tH\000\210\001\001" + + "\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comp" + + "ute.v1.WarningH\001\210\001\001B\022\n\020_next_page_tokenB" + + "\n\n\010_warning\"\177\n/InstanceGroupManagersPatc" + + "hPerInstanceConfigsReq\022L\n\024per_instance_c" + + "onfigs\030\251\325\370\372\001 \003(\0132*.google.cloud.compute." + + "v1.PerInstanceConfig\"E\n-InstanceGroupMan" + + "agersRecreateInstancesRequest\022\024\n\tinstanc" + + "es\030\376\374\357\r \003(\t\"\273\001\n\037InstanceGroupManagersSco" + + "pedList\022Q\n\027instance_group_managers\030\220\372\211f " + + "\003(\0132-.google.cloud.compute.v1.InstanceGr" + + "oupManager\0229\n\007warning\030\234\337\226\030 \001(\0132 .google." + + "cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_warnin" + + "g\"k\n/InstanceGroupManagersSetInstanceTem" + + "plateRequest\022\"\n\021instance_template\030\344\201\273\223\001 " + + "\001(\tH\000\210\001\001B\024\n\022_instance_template\"s\n*Instan" + + "ceGroupManagersSetTargetPoolsRequest\022\033\n\013" + + "fingerprint\030\344\321\363o \001(\tH\000\210\001\001\022\030\n\014target_pool" + + "s\030\251\237\240\240\001 \003(\tB\016\n\014_fingerprint\"\200\001\n0Instance" + + "GroupManagersUpdatePerInstanceConfigsReq" + + "\022L\n\024per_instance_configs\030\251\325\370\372\001 \003(\0132*.goo" + + "gle.cloud.compute.v1.PerInstanceConfig\"e" + + "\n!InstanceGroupsAddInstancesRequest\022@\n\ti" + + "nstances\030\376\374\357\r \003(\0132*.google.cloud.compute" + + ".v1.InstanceReference\"\276\002\n\033InstanceGroups" + + "ListInstances\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022A\n\005items" + + "\030\300\317\367/ \003(\0132/.google.cloud.compute.v1.Inst" + + "anceWithNamedPorts\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001" + + "\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tsel" + + "f_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(" + + "\0132 .google.cloud.compute.v1.WarningH\004\210\001\001" + + "B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n" + + "_self_linkB\n\n\010_warning\"\241\001\n\"InstanceGroup" + + "sListInstancesRequest\022\036\n\016instance_state\030" + + "\347\360\374+ \001(\tH\000\210\001\001\"H\n\rInstanceState\022\034\n\030UNDEFI" + + "NED_INSTANCE_STATE\020\000\022\t\n\003ALL\020\201\373\003\022\016\n\007RUNNI" + + "NG\020\237\303\3529B\021\n\017_instance_state\"h\n$InstanceGr" + + "oupsRemoveInstancesRequest\022@\n\tinstances\030" + + "\376\374\357\r \003(\0132*.google.cloud.compute.v1.Insta" + + "nceReference\"\246\001\n\030InstanceGroupsScopedLis" + + "t\022C\n\017instance_groups\030\276\301\337\256\001 \003(\0132&.google." + + "cloud.compute.v1.InstanceGroup\0229\n\007warnin" + + "g\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.War" + + "ningH\000\210\001\001B\n\n\010_warning\"\216\001\n\"InstanceGroups" + + "SetNamedPortsRequest\022\033\n\013fingerprint\030\344\321\363o" + + " \001(\tH\000\210\001\001\022;\n\013named_ports\030\214\307\362\313\001 \003(\0132\".goo" + + "gle.cloud.compute.v1.NamedPortB\016\n\014_finge" + + "rprint\"\241\002\n\014InstanceList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" + + "\001\0223\n\005items\030\300\317\367/ \003(\0132!.google.cloud.compu" + + "te.v1.Instance\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017" + + "next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_li" + + "nk\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 ." + + "google.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003" + + "_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_sel" + + "f_linkB\n\n\010_warning\"\253\002\n\025InstanceListRefer" + + "rers\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0224\n\005items\030\300\317\367/ \003(\013" + + "2\".google.cloud.compute.v1.Reference\022\024\n\004" + + "kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272" + + "\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022" + + "9\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compu" + + "te.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_n" + + "ext_page_tokenB\014\n\n_self_linkB\n\n\010_warning" + + "\"\274\002\n\031InstanceManagedByIgmError\022]\n\005error\030" + + "\210\244\223. \001(\0132F.google.cloud.compute.v1.Insta" + + "nceManagedByIgmErrorManagedInstanceError" + + "H\000\210\001\001\022q\n\027instance_action_details\030\243\374\253\213\001 \001" + + "(\0132G.google.cloud.compute.v1.InstanceMan" + + "agedByIgmErrorInstanceActionDetailsH\001\210\001\001" + + "\022\031\n\ttimestamp\030\226\322\244\032 \001(\tH\002\210\001\001B\010\n\006_errorB\032\n" + + "\030_instance_action_detailsB\014\n\n_timestamp\"" + + "\360\003\n.InstanceManagedByIgmErrorInstanceAct" + + "ionDetails\022\026\n\006action\030\266\374\275Y \001(\tH\000\210\001\001\022\030\n\010in" + + "stance\030\225\251\332\010 \001(\tH\001\210\001\001\022I\n\007version\030\330\271\324\247\001 \001(" + + "\0132/.google.cloud.compute.v1.ManagedInsta" + + "nceVersionH\002\210\001\001\"\234\002\n\006Action\022\024\n\020UNDEFINED_" + + "ACTION\020\000\022\022\n\nABANDONING\020\315\312\220\271\001\022\020\n\010CREATING" + + "\020\271\275\235\331\001\022 \n\030CREATING_WITHOUT_RETRIES\020\211\306\276\314\001" + + "\022\020\n\010DELETING\020\250\247\207\374\001\022\013\n\004NONE\020\270\316\222\001\022\022\n\nRECRE" + + "ATING\020\354\213\376\210\001\022\021\n\nREFRESHING\020\247\376\354M\022\022\n\nRESTAR" + + "TING\020\363\356\353\230\001\022\020\n\010RESUMING\020\252\373\211\325\001\022\020\n\010STARTING" + + "\020\300\240\213\351\001\022\020\n\010STOPPING\020\364\320\242\247\001\022\022\n\nSUSPENDING\020\246" + + "\324\230\365\001\022\020\n\tVERIFYING\020\251\301\214\010B\t\n\007_actionB\013\n\t_in" + + "stanceB\n\n\010_version\"t\n-InstanceManagedByI" + + "gmErrorManagedInstanceError\022\024\n\004code\030\355\333\272\001" + + " \001(\tH\000\210\001\001\022\030\n\007message\030\207\200\254\307\001 \001(\tH\001\210\001\001B\007\n\005_" + + "codeB\n\n\010_message\"\202\001\n\023InstanceMoveRequest" + + "\022 \n\020destination_zone\030\275\342\357> \001(\tH\000\210\001\001\022 \n\017ta" + + "rget_instance\030\203\217\226\212\001 \001(\tH\001\210\001\001B\023\n\021_destina" + + "tion_zoneB\022\n\020_target_instance\"\261\001\n\016Instan" + + "ceParams\022c\n\025resource_manager_tags\030\374\233\213\264\001 " + + "\003(\0132@.google.cloud.compute.v1.InstancePa" + + "rams.ResourceManagerTagsEntry\032:\n\030Resourc" + + "eManagerTagsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"\330\020\n\022InstanceProperties\022\\\n\031adva" + "nced_machine_features\030\262\347\252\303\001 \001(\01320.google" + ".cloud.compute.v1.AdvancedMachineFeature" + "sH\000\210\001\001\022\037\n\016can_ip_forward\030\374\206\204\337\001 \001(\010H\001\210\001\001\022" + "b\n\034confidential_instance_config\030\365\222\372\351\001 \001(" + "\01323.google.cloud.compute.v1.Confidential" - + "InstanceConfigH\002\210\001\001\022\035\n\014cpu_platform\030\252\352\321\303" - + "\001 \001(\tH\003\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(" - + "\tH\004\210\001\001\022$\n\023deletion_protection\030\352\377\262\332\001 \001(\010H" - + "\005\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\006\210\001\001\0227\n\005di" - + "sks\030\366\314\312- \003(\0132%.google.cloud.compute.v1.A" - + "ttachedDisk\022F\n\016display_device\030\363\210\274{ \001(\0132&" - + ".google.cloud.compute.v1.DisplayDeviceH\007" - + "\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\010\210\001\001\022J\n\022gues" - + "t_accelerators\030\357\314\207\335\001 \003(\0132*.google.cloud." - + "compute.v1.AcceleratorConfig\022\030\n\010hostname" - + "\030\263\270\205q \001(\tH\t\210\001\001\022\020\n\002id\030\233\032 \001(\004H\n\210\001\001\022*\n\032key_" - + "revocation_action_type\030\342\334\300p \001(\tH\013\210\001\001\022\024\n\004" - + "kind\030\224\367\310\001 \001(\tH\014\210\001\001\022!\n\021label_fingerprint\030" - + "\231\360\367T \001(\tH\r\210\001\001\022A\n\006labels\030\377\277\301\356\001 \003(\0132-.goog" - + "le.cloud.compute.v1.Instance.LabelsEntry" - + "\022%\n\024last_start_timestamp\030\320\243\321\323\001 \001(\tH\016\210\001\001\022" - + "$\n\023last_stop_timestamp\030\342\333\354\304\001 \001(\tH\017\210\001\001\022)\n" - + "\030last_suspended_timestamp\030\211\251\361\251\001 \001(\tH\020\210\001\001" - + "\022\034\n\014machine_type\030\262\260\312l \001(\tH\021\210\001\001\022;\n\010metada" - + "ta\030\257\366\265) \001(\0132!.google.cloud.compute.v1.Me" - + "tadataH\022\210\001\001\022 \n\020min_cpu_platform\030\367\233\352s \001(\t" - + "H\023\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\024\210\001\001\022H\n\022network_i" - + "nterfaces\030\213\332\222\031 \003(\0132).google.cloud.comput" - + "e.v1.NetworkInterface\022^\n\032network_perform" - + "ance_config\030\342\227\370\275\001 \001(\01321.google.cloud.com" - + "pute.v1.NetworkPerformanceConfigH\025\210\001\001\022?\n" - + "\006params\030\206\363\253% \001(\0132\'.google.cloud.compute." - + "v1.InstanceParamsH\026\210\001\001\022*\n\032private_ipv6_g" - + "oogle_access\030\216\314\202\027 \001(\tH\027\210\001\001\022R\n\024reservatio" - + "n_affinity\030\273\270\242K \001(\0132,.google.cloud.compu" - + "te.v1.ReservationAffinityH\030\210\001\001\022\034\n\021resour" - + "ce_policies\030\341\234\314\n \003(\t\022H\n\017resource_status\030" - + "\303\372\367v \001(\0132\'.google.cloud.compute.v1.Resou" - + "rceStatusH\031\210\001\001\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001(" - + "\010H\032\210\001\001\022@\n\nscheduling\030\224\313\261\270\001 \001(\0132#.google." - + "cloud.compute.v1.SchedulingH\033\210\001\001\022\032\n\tself" - + "_link\030\215\222\305\331\001 \001(\tH\034\210\001\001\022E\n\020service_accounts" - + "\030\260\304\253\204\001 \003(\0132\'.google.cloud.compute.v1.Ser" - + "viceAccount\022Y\n\030shielded_instance_config\030" - + "\265\213\221\006 \001(\0132/.google.cloud.compute.v1.Shiel" - + "dedInstanceConfigH\035\210\001\001\022l\n\"shielded_insta" - + "nce_integrity_policy\030\227\242\207N \001(\01328.google.c" - + "loud.compute.v1.ShieldedInstanceIntegrit" - + "yPolicyH\036\210\001\001\022$\n\024source_machine_image\030\277\334\260" - + "\n \001(\tH\037\210\001\001\022c\n#source_machine_image_encry" - + "ption_key\030\243\373\371[ \001(\0132..google.cloud.comput" - + "e.v1.CustomerEncryptionKeyH \210\001\001\022 \n\020start" - + "_restricted\030\330\320\375: \001(\010H!\210\001\001\022\026\n\006status\030\362\237\267V" - + " \001(\tH\"\210\001\001\022\037\n\016status_message\030\272\311\351\215\001 \001(\tH#\210" - + "\001\001\0223\n\004tags\030\231\350\330\001 \001(\0132\035.google.cloud.compu" - + "te.v1.TagsH$\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH%\210\001\001\032-\n" - + "\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" - + ":\0028\001\"\215\001\n\027KeyRevocationActionType\022(\n$UNDE" - + "FINED_KEY_REVOCATION_ACTION_TYPE\020\000\022.\n&KE" - + "Y_REVOCATION_ACTION_TYPE_UNSPECIFIED\020\332\221\336" - + "\336\001\022\013\n\004NONE\020\270\316\222\001\022\013\n\004STOP\020\202\200\234\001\"\300\001\n\027Private" - + "Ipv6GoogleAccess\022(\n$UNDEFINED_PRIVATE_IP" - + "V6_GOOGLE_ACCESS\020\000\022-\n%ENABLE_BIDIRECTION" - + "AL_ACCESS_TO_GOOGLE\020\272\312\211\314\001\022+\n#ENABLE_OUTB" - + "OUND_VM_ACCESS_TO_GOOGLE\020\327\372\266\211\001\022\037\n\027INHERI" - + "T_FROM_SUBNETWORK\020\277\250\354\374\001\"\334\001\n\006Status\022\024\n\020UN" - + "DEFINED_STATUS\020\000\022\026\n\016DEPROVISIONING\020\356\223\304\314\001" - + "\022\024\n\014PROVISIONING\020\355\365\332\212\001\022\021\n\tREPAIRING\020\225\202\225\305" - + "\001\022\016\n\007RUNNING\020\237\303\3529\022\017\n\007STAGING\020\233\310\306\315\001\022\017\n\007ST" - + "OPPED\020\255\273\354\323\001\022\020\n\010STOPPING\020\364\320\242\247\001\022\020\n\tSUSPEND" - + "ED\020\273\273\266\030\022\022\n\nSUSPENDING\020\246\324\230\365\001\022\021\n\nTERMINATE" - + "D\020\243\364\233wB\034\n\032_advanced_machine_featuresB\021\n\017" - + "_can_ip_forwardB\037\n\035_confidential_instanc" - + "e_configB\017\n\r_cpu_platformB\025\n\023_creation_t" - + "imestampB\026\n\024_deletion_protectionB\016\n\014_des" - + "criptionB\021\n\017_display_deviceB\016\n\014_fingerpr" - + "intB\013\n\t_hostnameB\005\n\003_idB\035\n\033_key_revocati" - + "on_action_typeB\007\n\005_kindB\024\n\022_label_finger" - + "printB\027\n\025_last_start_timestampB\026\n\024_last_" - + "stop_timestampB\033\n\031_last_suspended_timest" - + "ampB\017\n\r_machine_typeB\013\n\t_metadataB\023\n\021_mi" - + "n_cpu_platformB\007\n\005_nameB\035\n\033_network_perf" - + "ormance_configB\t\n\007_paramsB\035\n\033_private_ip" - + "v6_google_accessB\027\n\025_reservation_affinit" - + "yB\022\n\020_resource_statusB\020\n\016_satisfies_pzsB" - + "\r\n\013_schedulingB\014\n\n_self_linkB\033\n\031_shielde" - + "d_instance_configB%\n#_shielded_instance_" - + "integrity_policyB\027\n\025_source_machine_imag" - + "eB&\n$_source_machine_image_encryption_ke", - "yB\023\n\021_start_restrictedB\t\n\007_statusB\021\n\017_st" - + "atus_messageB\007\n\005_tagsB\007\n\005_zone\"\271\003\n\026Insta" - + "nceAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022L\n\005i" - + "tems\030\300\317\367/ \003(\0132:.google.cloud.compute.v1." - + "InstanceAggregatedList.ItemsEntry\022\024\n\004kin" - + "d\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& " - + "\001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014" - + "unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(" - + "\0132 .google.cloud.compute.v1.WarningH\004\210\001\001" - + "\032Z\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001" - + "(\0132,.google.cloud.compute.v1.InstancesSc" - + "opedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_pa" - + "ge_tokenB\014\n\n_self_linkB\n\n\010_warning\"\251\001\n\027I" - + "nstanceConsumptionData\022R\n\020consumption_in" - + "fo\030\322\345\344E \001(\01320.google.cloud.compute.v1.In" - + "stanceConsumptionInfoH\000\210\001\001\022\030\n\010instance\030\225" - + "\251\332\010 \001(\tH\001\210\001\001B\023\n\021_consumption_infoB\013\n\t_in" - + "stance\"\320\001\n\027InstanceConsumptionInfo\022\033\n\ngu" - + "est_cpus\030\322\313\310\273\001 \001(\005H\000\210\001\001\022\035\n\014local_ssd_gb\030" - + "\312\210\377\234\001 \001(\005H\001\210\001\001\022\031\n\tmemory_mb\030\223\223\2507 \001(\005H\002\210\001" - + "\001\022\036\n\rmin_node_cpus\030\273\244\242\227\001 \001(\005H\003\210\001\001B\r\n\013_gu" - + "est_cpusB\017\n\r_local_ssd_gbB\014\n\n_memory_mbB" - + "\020\n\016_min_node_cpus\"\225\004\n\rInstanceGroup\022\"\n\022c" - + "reation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013descr" - + "iption\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\033\n\013fingerprint\030\344\321\363" - + "o \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310" - + "\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022;\n\013name" - + "d_ports\030\214\307\362\313\001 \003(\0132\".google.cloud.compute" - + ".v1.NamedPort\022\027\n\007network\030\256\264\205o \001(\tH\006\210\001\001\022\026" - + "\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022\032\n\tself_link\030\215\222\305\331" - + "\001 \001(\tH\010\210\001\001\022\024\n\004size\030\201\300\327\001 \001(\005H\t\210\001\001\022\033\n\nsubn" - + "etwork\030\356\247\344\222\001 \001(\tH\n\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH\013" + + "InstanceConfigH\002\210\001\001\022\034\n\013description\030\374\207\326\311\001" + + " \001(\tH\003\210\001\001\0227\n\005disks\030\366\314\312- \003(\0132%.google.clo" + + "ud.compute.v1.AttachedDisk\022J\n\022guest_acce" + + "lerators\030\357\314\207\335\001 \003(\0132*.google.cloud.comput" + + "e.v1.AcceleratorConfig\022*\n\032key_revocation" + + "_action_type\030\342\334\300p \001(\tH\004\210\001\001\022K\n\006labels\030\377\277\301" + + "\356\001 \003(\01327.google.cloud.compute.v1.Instanc" + + "eProperties.LabelsEntry\022\034\n\014machine_type\030" + + "\262\260\312l \001(\tH\005\210\001\001\022;\n\010metadata\030\257\366\265) \001(\0132!.goo" + + "gle.cloud.compute.v1.MetadataH\006\210\001\001\022 \n\020mi" + + "n_cpu_platform\030\367\233\352s \001(\tH\007\210\001\001\022H\n\022network_" + + "interfaces\030\213\332\222\031 \003(\0132).google.cloud.compu" + + "te.v1.NetworkInterface\022^\n\032network_perfor" + + "mance_config\030\342\227\370\275\001 \001(\01321.google.cloud.co" + + "mpute.v1.NetworkPerformanceConfigH\010\210\001\001\022*" + + "\n\032private_ipv6_google_access\030\216\314\202\027 \001(\tH\t\210" + + "\001\001\022R\n\024reservation_affinity\030\273\270\242K \001(\0132,.go" + + "ogle.cloud.compute.v1.ReservationAffinit" + + "yH\n\210\001\001\022g\n\025resource_manager_tags\030\374\233\213\264\001 \003(" + + "\0132D.google.cloud.compute.v1.InstanceProp" + + "erties.ResourceManagerTagsEntry\022\034\n\021resou" + + "rce_policies\030\341\234\314\n \003(\t\022@\n\nscheduling\030\224\313\261\270" + + "\001 \001(\0132#.google.cloud.compute.v1.Scheduli" + + "ngH\013\210\001\001\022E\n\020service_accounts\030\260\304\253\204\001 \003(\0132\'." + + "google.cloud.compute.v1.ServiceAccount\022Y" + + "\n\030shielded_instance_config\030\265\213\221\006 \001(\0132/.go" + + "ogle.cloud.compute.v1.ShieldedInstanceCo" + + "nfigH\014\210\001\001\0223\n\004tags\030\231\350\330\001 \001(\0132\035.google.clou" + + "d.compute.v1.TagsH\r\210\001\001\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032:\n\030Resourc" + + "eManagerTagsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"\215\001\n\027KeyRevocationActionType\022(\n" + + "$UNDEFINED_KEY_REVOCATION_ACTION_TYPE\020\000\022" + + ".\n&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIE" + + "D\020\332\221\336\336\001\022\013\n\004NONE\020\270\316\222\001\022\013\n\004STOP\020\202\200\234\001\"\300\001\n\027Pr" + + "ivateIpv6GoogleAccess\022(\n$UNDEFINED_PRIVA" + + "TE_IPV6_GOOGLE_ACCESS\020\000\022-\n%ENABLE_BIDIRE" + + "CTIONAL_ACCESS_TO_GOOGLE\020\272\312\211\314\001\022+\n#ENABLE" + + "_OUTBOUND_VM_ACCESS_TO_GOOGLE\020\327\372\266\211\001\022\037\n\027I" + + "NHERIT_FROM_SUBNETWORK\020\277\250\354\374\001B\034\n\032_advance" + + "d_machine_featuresB\021\n\017_can_ip_forwardB\037\n" + + "\035_confidential_instance_configB\016\n\014_descr" + + "iptionB\035\n\033_key_revocation_action_typeB\017\n" + + "\r_machine_typeB\013\n\t_metadataB\023\n\021_min_cpu_" + + "platformB\035\n\033_network_performance_configB" + + "\035\n\033_private_ipv6_google_accessB\027\n\025_reser" + + "vation_affinityB\r\n\013_schedulingB\033\n\031_shiel" + + "ded_instance_configB\007\n\005_tags\":\n\021Instance" + + "Reference\022\030\n\010instance\030\225\251\332\010 \001(\tH\000\210\001\001B\013\n\t_" + + "instance\"\237\004\n\020InstanceTemplate\022\"\n\022creatio" + + "n_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description" + + "\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\020\n\002id\030\233\032 \001(\004H\002\210\001\001\022\024\n\004kin" + + "d\030\224\367\310\001 \001(\tH\003\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\004\210\001\001\022G\n" + + "\nproperties\030\263\232\266F \001(\0132+.google.cloud.comp" + + "ute.v1.InstancePropertiesH\005\210\001\001\022\026\n\006region" + + "\030\364\315\240B \001(\tH\006\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\007\210" + + "\001\001\022 \n\017source_instance\030\271\230\375\274\001 \001(\tH\010\210\001\001\022U\n\026" + + "source_instance_params\030\314\320\304@ \001(\0132-.google" + + ".cloud.compute.v1.SourceInstanceParamsH\t" + "\210\001\001B\025\n\023_creation_timestampB\016\n\014_descripti" - + "onB\016\n\014_fingerprintB\005\n\003_idB\007\n\005_kindB\007\n\005_n" - + "ameB\n\n\010_networkB\t\n\007_regionB\014\n\n_self_link" - + "B\007\n\005_sizeB\r\n\013_subnetworkB\007\n\005_zone\"\310\003\n\033In" - + "stanceGroupAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000" - + "\210\001\001\022Q\n\005items\030\300\317\367/ \003(\0132?.google.cloud.com" - + "pute.v1.InstanceGroupAggregatedList.Item" - + "sEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_pag" - + "e_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" - + " \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007wa" - + "rning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1" - + ".WarningH\004\210\001\001\032_\n\nItemsEntry\022\013\n\003key\030\001 \001(\t" - + "\022@\n\005value\030\002 \001(\01321.google.cloud.compute.v" - + "1.InstanceGroupsScopedList:\0028\001B\005\n\003_idB\007\n" - + "\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_link" - + "B\n\n\010_warning\"\253\002\n\021InstanceGroupList\022\020\n\002id" - + "\030\233\032 \001(\tH\000\210\001\001\0228\n\005items\030\300\317\367/ \003(\0132&.google." - + "cloud.compute.v1.InstanceGroup\022\024\n\004kind\030\224" + + "onB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\r\n\013_properti" + + "esB\t\n\007_regionB\014\n\n_self_linkB\022\n\020_source_i" + + "nstanceB\031\n\027_source_instance_params\"\270\003\n\036I" + + "nstanceTemplateAggregatedList\022\020\n\002id\030\233\032 \001" + + "(\tH\000\210\001\001\022T\n\005items\030\300\317\367/ \003(\0132B.google.cloud" + + ".compute.v1.InstanceTemplateAggregatedLi" + + "st.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017n" + + "ext_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_lin" + + "k\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .g" + + "oogle.cloud.compute.v1.WarningH\004\210\001\001\032b\n\nI" + + "temsEntry\022\013\n\003key\030\001 \001(\t\022C\n\005value\030\002 \001(\01324." + + "google.cloud.compute.v1.InstanceTemplate" + + "sScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next" + + "_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\261\002" + + "\n\024InstanceTemplateList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001" + + "\022;\n\005items\030\300\317\367/ \003(\0132).google.cloud.comput" + + "e.v1.InstanceTemplate\022\024\n\004kind\030\224\367\310\001 \001(\tH\001" + + "\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\t" + + "self_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030" + + " \001(\0132 .google.cloud.compute.v1.WarningH\004" + + "\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB" + + "\014\n\n_self_linkB\n\n\010_warning\"\257\001\n\033InstanceTe" + + "mplatesScopedList\022I\n\022instance_templates\030" + + "\217\270\245\333\001 \003(\0132).google.cloud.compute.v1.Inst" + + "anceTemplate\0229\n\007warning\030\234\337\226\030 \001(\0132 .googl" + + "e.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_warn" + + "ing\"\376\002\n\026InstanceWithNamedPorts\022\030\n\010instan" + + "ce\030\225\251\332\010 \001(\tH\000\210\001\001\022;\n\013named_ports\030\214\307\362\313\001 \003(" + + "\0132\".google.cloud.compute.v1.NamedPort\022\026\n" + + "\006status\030\362\237\267V \001(\tH\001\210\001\001\"\334\001\n\006Status\022\024\n\020UNDE" + + "FINED_STATUS\020\000\022\026\n\016DEPROVISIONING\020\356\223\304\314\001\022\024", + "\n\014PROVISIONING\020\355\365\332\212\001\022\021\n\tREPAIRING\020\225\202\225\305\001\022" + + "\016\n\007RUNNING\020\237\303\3529\022\017\n\007STAGING\020\233\310\306\315\001\022\017\n\007STOP" + + "PED\020\255\273\354\323\001\022\020\n\010STOPPING\020\364\320\242\247\001\022\020\n\tSUSPENDED" + + "\020\273\273\266\030\022\022\n\nSUSPENDING\020\246\324\230\365\001\022\021\n\nTERMINATED\020" + + "\243\364\233wB\013\n\t_instanceB\t\n\007_status\"C\n#Instance" + + "sAddResourcePoliciesRequest\022\034\n\021resource_" + + "policies\030\341\234\314\n \003(\t\"\330\001\n&InstancesGetEffect" + + "iveFirewallsResponse\022t\n\020firewall_policys" + + "\030\302\312\374\303\001 \003(\0132V.google.cloud.compute.v1.Ins" + + "tancesGetEffectiveFirewallsResponseEffec" + + "tiveFirewallPolicy\0228\n\tfirewalls\030\363\306\350\201\001 \003(" + + "\0132!.google.cloud.compute.v1.Firewall\"\204\003\n" + + "=InstancesGetEffectiveFirewallsResponseE" + + "ffectiveFirewallPolicy\022\034\n\014display_name\030\350" + + "\207\221\002 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001\001\022=\n\005ru" + + "les\030\367\221\3653 \003(\0132+.google.cloud.compute.v1.F" + + "irewallPolicyRule\022\033\n\nshort_name\030\356\270\320\352\001 \001(" + + "\tH\002\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\tH\003\210\001\001\"k\n\004Type\022\022\n\016" + + "UNDEFINED_TYPE\020\000\022\020\n\tHIERARCHY\020\225\304\252!\022\017\n\007NE" + + "TWORK\020\216\314\263\305\001\022\027\n\020NETWORK_REGIONAL\020\260\342\375Z\022\023\n\013" + + "UNSPECIFIED\020\227\276\230\373\001B\017\n\r_display_nameB\007\n\005_n" + + "ameB\r\n\013_short_nameB\007\n\005_type\"F\n&Instances" + + "RemoveResourcePoliciesRequest\022\034\n\021resourc" + + "e_policies\030\341\234\314\n \003(\t\"\225\001\n\023InstancesScopedL" + + "ist\0227\n\tinstances\030\376\374\357\r \003(\0132!.google.cloud" + + ".compute.v1.Instance\0229\n\007warning\030\234\337\226\030 \001(\013" + + "2 .google.cloud.compute.v1.WarningH\000\210\001\001B" + + "\n\n\010_warning\"\327\001\n\031InstancesSetLabelsReques" + + "t\022!\n\021label_fingerprint\030\231\360\367T \001(\tH\000\210\001\001\022R\n\006" + + "labels\030\377\277\301\356\001 \003(\0132>.google.cloud.compute." + + "v1.InstancesSetLabelsRequest.LabelsEntry" + + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001B\024\n\022_label_fingerprint\"q\n#Instanc" + + "esSetMachineResourcesRequest\022J\n\022guest_ac" + + "celerators\030\357\314\207\335\001 \003(\0132*.google.cloud.comp" + + "ute.v1.AcceleratorConfig\"O\n\036InstancesSet" + + "MachineTypeRequest\022\034\n\014machine_type\030\262\260\312l " + + "\001(\tH\000\210\001\001B\017\n\r_machine_type\"Z\n!InstancesSe" + + "tMinCpuPlatformRequest\022 \n\020min_cpu_platfo" + + "rm\030\367\233\352s \001(\tH\000\210\001\001B\023\n\021_min_cpu_platform\"h\n" + + "\027InstancesSetNameRequest\022\035\n\014current_name" + + "\030\221\363\253\274\001 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001\001B\017\n" + + "\r_current_nameB\007\n\005_name\"W\n!InstancesSetS" + + "erviceAccountRequest\022\025\n\005email\030\234\227\211. \001(\tH\000" + + "\210\001\001\022\021\n\006scopes\030\237\231\222O \003(\tB\010\n\006_email\"w\n&Inst" + + "ancesStartWithEncryptionKeyRequest\022M\n\005di" + + "sks\030\366\314\312- \003(\0132;.google.cloud.compute.v1.C" + + "ustomerEncryptionKeyProtectedDisk\"h\n\017Int" + + "64RangeMatch\022\032\n\trange_end\030\331\225\340\231\001 \001(\003H\000\210\001\001" + + "\022\033\n\013range_start\030\340\375\2421 \001(\003H\001\210\001\001B\014\n\n_range_" + + "endB\016\n\014_range_start\"\244\014\n\014Interconnect\022\036\n\r" + + "admin_enabled\030\321\354\301\324\001 \001(\010H\000\210\001\001\022J\n\rcircuit_" + + "infos\030\257\203\315N \003(\01320.google.cloud.compute.v1" + + ".InterconnectCircuitInfo\022\"\n\022creation_tim" + + "estamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\035\n\rcustomer_name\030\314\334" + + "\337\001 \001(\tH\002\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\003\210\001" + + "\001\022T\n\020expected_outages\030\233\352\216~ \003(\01327.google." + + "cloud.compute.v1.InterconnectOutageNotif" + + "ication\022\"\n\021google_ip_address\030\242\205\245\323\001 \001(\tH\004" + + "\210\001\001\022$\n\023google_reference_id\030\325\265\212\377\001 \001(\tH\005\210\001" + + "\001\022\020\n\002id\030\233\032 \001(\004H\006\210\001\001\022$\n\030interconnect_atta" + + "chments\030\377\322\353\312\001 \003(\t\022\"\n\021interconnect_type\030\313" + + "\230\323\365\001 \001(\tH\007\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\010\210\001\001\022\032\n\tl" + + "ink_type\030\337\210\276\371\001 \001(\tH\t\210\001\001\022\031\n\010location\030\265\277\276\212" + + "\001 \001(\tH\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\013\210\001\001\022!\n\021noc_" + + "contact_email\030\200\370\332\006 \001(\tH\014\210\001\001\022\"\n\022operation" + + "al_status\030\377\261\360_ \001(\tH\r\210\001\001\022\037\n\017peer_ip_addre" + + "ss\030\331\227\207c \001(\tH\016\210\001\001\022\'\n\026provisioned_link_cou" + + "nt\030\365\322\366\303\001 \001(\005H\017\210\001\001\022$\n\024requested_link_coun" + + "t\030\373\333\275\025 \001(\005H\020\210\001\001\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001" + + "(\010H\021\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\022\210\001\001\022\025\n\005s" + + "tate\030\221\211\2534 \001(\tH\023\210\001\001\"j\n\020InterconnectType\022\037" + + "\n\033UNDEFINED_INTERCONNECT_TYPE\020\000\022\020\n\tDEDIC" + + "ATED\020\317\233\234{\022\022\n\nIT_PRIVATE\020\317\214\210\240\001\022\017\n\007PARTNER" + + "\020\250\321\241\334\001\"i\n\010LinkType\022\027\n\023UNDEFINED_LINK_TYP" + + "E\020\000\022\"\n\032LINK_TYPE_ETHERNET_100G_LR\020\347\362\201\241\001\022" + + " \n\031LINK_TYPE_ETHERNET_10G_LR\020\245\271\361p\"`\n\021Ope" + + "rationalStatus\022 \n\034UNDEFINED_OPERATIONAL_" + + "STATUS\020\000\022\020\n\tOS_ACTIVE\020\301\373\310\032\022\027\n\020OS_UNPROVI" + + "SIONED\020\300\301\252r\"C\n\005State\022\023\n\017UNDEFINED_STATE\020" + + "\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\025\n\rUNPROVISIONED\020\333\307\327\366\001" + + "B\020\n\016_admin_enabledB\025\n\023_creation_timestam" + + "pB\020\n\016_customer_nameB\016\n\014_descriptionB\024\n\022_" + + "google_ip_addressB\026\n\024_google_reference_i" + + "dB\005\n\003_idB\024\n\022_interconnect_typeB\007\n\005_kindB" + + "\014\n\n_link_typeB\013\n\t_locationB\007\n\005_nameB\024\n\022_" + + "noc_contact_emailB\025\n\023_operational_status" + + "B\022\n\020_peer_ip_addressB\031\n\027_provisioned_lin" + + "k_countB\027\n\025_requested_link_countB\020\n\016_sat" + + "isfies_pzsB\014\n\n_self_linkB\010\n\006_state\"\232\026\n\026I" + + "nterconnectAttachment\022\036\n\radmin_enabled\030\321" + + "\354\301\324\001 \001(\010H\000\210\001\001\022\031\n\tbandwidth\030\261\201\323V \001(\tH\001\210\001\001" + + "\022!\n\026candidate_ipv6_subnets\030\232\217\332! \003(\t\022\034\n\021c" + + "andidate_subnets\030\372\343\264q \003(\t\022(\n\027cloud_route" + + "r_ip_address\030\210\210\205\211\001 \001(\tH\002\210\001\001\022*\n\031cloud_rou" + + "ter_ipv6_address\030\310\223\277\327\001 \001(\tH\003\210\001\001\022/\n\036cloud" + + "_router_ipv6_interface_id\030\215\311\310\370\001 \001(\tH\004\210\001\001" + + "\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\005\210\001\001\022+\n\032" + + "customer_router_ip_address\030\361\332\304\236\001 \001(\tH\006\210\001" + + "\001\022-\n\034customer_router_ipv6_address\030\361\371\253\212\001 " + + "\001(\tH\007\210\001\001\0222\n!customer_router_ipv6_interfa" + + "ce_id\030\204\206\326\265\001 \001(\tH\010\210\001\001\022!\n\021dataplane_versio" + + "n\030\213\255\323\020 \001(\005H\t\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\t" + + "H\n\210\001\001\022(\n\030edge_availability_domain\030\246\225\377! \001" + + "(\tH\013\210\001\001\022\032\n\nencryption\030\203\237\334. \001(\tH\014\210\001\001\022$\n\023g" + + "oogle_reference_id\030\325\265\212\377\001 \001(\tH\r\210\001\001\022\020\n\002id\030" + + "\233\032 \001(\004H\016\210\001\001\022\034\n\014interconnect\030\216\311\214k \001(\tH\017\210\001" + + "\001\022$\n\030ipsec_internal_addresses\030\265\362\260\302\001 \003(\t\022" + + "\024\n\004kind\030\224\367\310\001 \001(\tH\020\210\001\001\022\022\n\003mtu\030\256\317\006 \001(\005H\021\210\001" + + "\001\022\024\n\004name\030\213\365\315\001 \001(\tH\022\210\001\001\022\"\n\022operational_s" + + "tatus\030\377\261\360_ \001(\tH\023\210\001\001\022\034\n\013pairing_key\030\350\360\324\321\001" + + " \001(\tH\024\210\001\001\022\034\n\013partner_asn\030\205\305\367\320\001 \001(\003H\025\210\001\001\022" + + "`\n\020partner_metadata\030\306\341\266\037 \001(\0132>.google.cl" + + "oud.compute.v1.InterconnectAttachmentPar" + + "tnerMetadataH\026\210\001\001\022e\n\031private_interconnec" + + "t_info\030\203\354\221q \001(\0132:.google.cloud.compute.v" + + "1.InterconnectAttachmentPrivateInfoH\027\210\001\001" + + "\022\026\n\006region\030\364\315\240B \001(\tH\030\210\001\001\022\026\n\006router\030\311\256\356F " + + "\001(\tH\031\210\001\001\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001(\010H\032\210\001\001" + + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\033\210\001\001\022\033\n\nstack_ty" + + "pe\030\221\265\213\313\001 \001(\tH\034\210\001\001\022\025\n\005state\030\221\211\2534 \001(\tH\035\210\001\001" + + "\022\024\n\004type\030\272\236\332\001 \001(\tH\036\210\001\001\022\035\n\rvlan_tag8021q\030" + + "\234\350\2279 \001(\005H\037\210\001\001\"\355\001\n\tBandwidth\022\027\n\023UNDEFINED" + + "_BANDWIDTH\020\000\022\017\n\010BPS_100M\020\266\225\320\027\022\017\n\007BPS_10G" + + "\020\216\211\362\204\001\022\016\n\006BPS_1G\020\360\255\271\251\001\022\017\n\010BPS_200M\020\225\376\321\027\022" + + "\017\n\007BPS_20G\020\317\220\362\204\001\022\016\n\006BPS_2G\020\217\256\271\251\001\022\017\n\010BPS_" + + "300M\020\364\346\323\027\022\017\n\010BPS_400M\020\323\317\325\027\022\017\n\010BPS_500M\020\262" + + "\270\327\027\022\017\n\007BPS_50G\020\222\247\362\204\001\022\017\n\007BPS_50M\020\230\247\362\204\001\022\016\n" + + "\006BPS_5G\020\354\256\271\251\001\"\237\001\n\026EdgeAvailabilityDomain" + + "\022&\n\"UNDEFINED_EDGE_AVAILABILITY_DOMAIN\020\000" + + "\022\035\n\025AVAILABILITY_DOMAIN_1\020\332\373\326\246\001\022\035\n\025AVAIL" + + "ABILITY_DOMAIN_2\020\333\373\326\246\001\022\037\n\027AVAILABILITY_D" + + "OMAIN_ANY\020\265\352\367\262\001\"A\n\nEncryption\022\030\n\024UNDEFIN" + + "ED_ENCRYPTION\020\000\022\014\n\005IPSEC\020\252\243\251!\022\013\n\004NONE\020\270\316" + + "\222\001\"`\n\021OperationalStatus\022 \n\034UNDEFINED_OPE" + + "RATIONAL_STATUS\020\000\022\020\n\tOS_ACTIVE\020\301\373\310\032\022\027\n\020O" + + "S_UNPROVISIONED\020\300\301\252r\"I\n\tStackType\022\030\n\024UND" + + "EFINED_STACK_TYPE\020\000\022\020\n\tIPV4_IPV6\020\201\350\312\n\022\020\n" + + "\tIPV4_ONLY\020\246\313\325\n\"\302\001\n\005State\022\023\n\017UNDEFINED_S" + + "TATE\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\016\n\007DEFUNCT\020\257\274\2417\022 " + + "\n\030PARTNER_REQUEST_RECEIVED\020\350\360\362\364\001\022\027\n\020PEND" + + "ING_CUSTOMER\020\246\203\357O\022\027\n\017PENDING_PARTNER\020\340\373\372" + + "\270\001\022\031\n\021STATE_UNSPECIFIED\020\311\320\274\340\001\022\025\n\rUNPROVI" + + "SIONED\020\333\307\327\366\001\"W\n\004Type\022\022\n\016UNDEFINED_TYPE\020\000" + + "\022\020\n\tDEDICATED\020\317\233\234{\022\017\n\007PARTNER\020\250\321\241\334\001\022\030\n\020P" + + "ARTNER_PROVIDER\020\250\367\267\346\001B\020\n\016_admin_enabledB" + + "\014\n\n_bandwidthB\032\n\030_cloud_router_ip_addres" + + "sB\034\n\032_cloud_router_ipv6_addressB!\n\037_clou" + + "d_router_ipv6_interface_idB\025\n\023_creation_" + + "timestampB\035\n\033_customer_router_ip_address" + + "B\037\n\035_customer_router_ipv6_addressB$\n\"_cu" + + "stomer_router_ipv6_interface_idB\024\n\022_data" + + "plane_versionB\016\n\014_descriptionB\033\n\031_edge_a" + + "vailability_domainB\r\n\013_encryptionB\026\n\024_go" + + "ogle_reference_idB\005\n\003_idB\017\n\r_interconnec" + + "tB\007\n\005_kindB\006\n\004_mtuB\007\n\005_nameB\025\n\023_operatio" + + "nal_statusB\016\n\014_pairing_keyB\016\n\014_partner_a" + + "snB\023\n\021_partner_metadataB\034\n\032_private_inte" + + "rconnect_infoB\t\n\007_regionB\t\n\007_routerB\020\n\016_" + + "satisfies_pzsB\014\n\n_self_linkB\r\n\013_stack_ty" + + "peB\010\n\006_stateB\007\n\005_typeB\020\n\016_vlan_tag8021q\"" + + "\343\003\n$InterconnectAttachmentAggregatedList" + + "\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022Z\n\005items\030\300\317\367/ \003(\0132H.g" + + "oogle.cloud.compute.v1.InterconnectAttac" + + "hmentAggregatedList.ItemsEntry\022\024\n\004kind\030\224" + "\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\t" - + "H\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007war" - + "ning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1." - + "WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_pa" - + "ge_tokenB\014\n\n_self_linkB\n\n\010_warning\"\215\014\n\024I" - + "nstanceGroupManager\022a\n\025auto_healing_poli" - + "cies\030\205\347\350\331\001 \003(\0132>.google.cloud.compute.v1" - + ".InstanceGroupManagerAutoHealingPolicy\022#" - + "\n\022base_instance_name\030\207\226\305\271\001 \001(\tH\000\210\001\001\022\"\n\022c" - + "reation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\\\n\017curre" - + "nt_actions\030\267\310\234N \001(\0132;.google.cloud.compu" - + "te.v1.InstanceGroupManagerActionsSummary" - + "H\002\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\003\210\001\001\022Q\n\023d" - + "istribution_policy\030\315\356\362\376\001 \001(\0132+.google.cl" - + "oud.compute.v1.DistributionPolicyH\004\210\001\001\022\033" - + "\n\013fingerprint\030\344\321\363o \001(\tH\005\210\001\001\022\020\n\002id\030\233\032 \001(\004" - + "H\006\210\001\001\022\036\n\016instance_group\030\325\324\325& \001(\tH\007\210\001\001\022\"\n" - + "\021instance_template\030\344\201\273\223\001 \001(\tH\010\210\001\001\022\024\n\004kin" - + "d\030\224\367\310\001 \001(\tH\t\210\001\001\022/\n\036list_managed_instance" - + "s_results\030\264\244\225\215\001 \001(\tH\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(" - + "\tH\013\210\001\001\022;\n\013named_ports\030\214\307\362\313\001 \003(\0132\".google" - + ".cloud.compute.v1.NamedPort\022\026\n\006region\030\364\315" - + "\240B \001(\tH\014\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\r\210\001\001\022" - + "H\n\017stateful_policy\030\205\303\325\026 \001(\0132\'.google.clo" - + "ud.compute.v1.StatefulPolicyH\016\210\001\001\022K\n\006sta" - + "tus\030\362\237\267V \001(\01323.google.cloud.compute.v1.I" - + "nstanceGroupManagerStatusH\017\210\001\001\022\030\n\014target" - + "_pools\030\251\237\240\240\001 \003(\t\022\033\n\013target_size\030\357\363\375\035 \001(\005" - + "H\020\210\001\001\022X\n\rupdate_policy\030\350\312\352S \001(\01329.google" - + ".cloud.compute.v1.InstanceGroupManagerUp" - + "datePolicyH\021\210\001\001\022I\n\010versions\030\233\375\271M \003(\01324.g" - + "oogle.cloud.compute.v1.InstanceGroupMana" - + "gerVersion\022\024\n\004zone\030\254\307\344\001 \001(\tH\022\210\001\001\"n\n\033List" - + "ManagedInstancesResults\022,\n(UNDEFINED_LIS" - + "T_MANAGED_INSTANCES_RESULTS\020\000\022\017\n\010PAGELES" - + "S\020\250\251\254\017\022\020\n\tPAGINATED\020\255\205\225\023B\025\n\023_base_instan" - + "ce_nameB\025\n\023_creation_timestampB\022\n\020_curre" - + "nt_actionsB\016\n\014_descriptionB\026\n\024_distribut" - + "ion_policyB\016\n\014_fingerprintB\005\n\003_idB\021\n\017_in" - + "stance_groupB\024\n\022_instance_templateB\007\n\005_k" - + "indB!\n\037_list_managed_instances_resultsB\007" - + "\n\005_nameB\t\n\007_regionB\014\n\n_self_linkB\022\n\020_sta" - + "teful_policyB\t\n\007_statusB\016\n\014_target_sizeB" - + "\020\n\016_update_policyB\007\n\005_zone\"\323\004\n\"InstanceG" - + "roupManagerActionsSummary\022\033\n\nabandoning\030" - + "\315\362\350\321\001 \001(\005H\000\210\001\001\022\030\n\010creating\030\271\335\205d \001(\005H\001\210\001\001" - + "\022)\n\030creating_without_retries\030\311\366\261\260\001 \001(\005H\002" - + "\210\001\001\022\031\n\010deleting\030\250\307\357\206\001 \001(\005H\003\210\001\001\022\024\n\004none\030\270" - + "\336\316\001 \001(\005H\004\210\001\001\022\033\n\nrecreating\030\354\263\326\241\001 \001(\005H\005\210\001" - + "\001\022\032\n\nrefreshing\030\247\246\305f \001(\005H\006\210\001\001\022\033\n\nrestart" - + "ing\030\363\226\304\261\001 \001(\005H\007\210\001\001\022\030\n\010resuming\030\252\233\362_ \001(\005H" - + "\010\210\001\001\022\030\n\010starting\030\300\300\363s \001(\005H\t\210\001\001\022\030\n\010stoppi" - + "ng\030\364\360\2122 \001(\005H\n\210\001\001\022\032\n\nsuspending\030\246\374\360\r \001(\005H" - + "\013\210\001\001\022\032\n\tverifying\030\311\241\254\327\001 \001(\005H\014\210\001\001B\r\n\013_aba" - + "ndoningB\013\n\t_creatingB\033\n\031_creating_withou" - + "t_retriesB\013\n\t_deletingB\007\n\005_noneB\r\n\013_recr" - + "eatingB\r\n\013_refreshingB\r\n\013_restartingB\013\n\t" - + "_resumingB\013\n\t_startingB\013\n\t_stoppingB\r\n\013_" - + "suspendingB\014\n\n_verifying\"\335\003\n\"InstanceGro" - + "upManagerAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" - + "\001\022X\n\005items\030\300\317\367/ \003(\0132F.google.cloud.compu" - + "te.v1.InstanceGroupManagerAggregatedList" - + ".ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017nex" - + "t_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030" - + "\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\022" - + "9\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compu" - + "te.v1.WarningH\004\210\001\001\032f\n\nItemsEntry\022\013\n\003key\030" - + "\001 \001(\t\022G\n\005value\030\002 \001(\01328.google.cloud.comp" - + "ute.v1.InstanceGroupManagersScopedList:\002" - + "8\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014" - + "\n\n_self_linkB\n\n\010_warning\"\220\001\n%InstanceGro" - + "upManagerAutoHealingPolicy\022\035\n\014health_che" - + "ck\030\345\252\244\223\001 \001(\tH\000\210\001\001\022!\n\021initial_delay_sec\030\332" - + "\360\300} \001(\005H\001\210\001\001B\017\n\r_health_checkB\024\n\022_initia" - + "l_delay_sec\"\271\002\n\030InstanceGroupManagerList" - + "\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022?\n\005items\030\300\317\367/ \003(\0132-.g" - + "oogle.cloud.compute.v1.InstanceGroupMana" - + "ger\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_t" - + "oken\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(" - + "\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clou" - + "d.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kin" - + "dB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_" - + "warning\"\313\002\n\032InstanceGroupManagerStatus\022\033" - + "\n\nautoscaler\030\327\375\322\366\001 \001(\tH\000\210\001\001\022\031\n\tis_stable" - + "\030\360\357\3303 \001(\010H\001\210\001\001\022U\n\010stateful\030\314\346\310t \001(\0132;.go" - + "ogle.cloud.compute.v1.InstanceGroupManag" - + "erStatusStatefulH\002\210\001\001\022a\n\016version_target\030" - + "\330\335\376\211\001 \001(\0132@.google.cloud.compute.v1.Inst" - + "anceGroupManagerStatusVersionTargetH\003\210\001\001" - + "B\r\n\013_autoscalerB\014\n\n_is_stableB\013\n\t_statef" - + "ulB\021\n\017_version_target\"\360\001\n\"InstanceGroupM" - + "anagerStatusStateful\022#\n\023has_stateful_con" - + "fig\030\360\347\3264 \001(\010H\000\210\001\001\022t\n\024per_instance_config" - + "s\030\251\325\370\372\001 \001(\0132M.google.cloud.compute.v1.In" - + "stanceGroupManagerStatusStatefulPerInsta" - + "nceConfigsH\001\210\001\001B\026\n\024_has_stateful_configB" - + "\027\n\025_per_instance_configs\"h\n4InstanceGrou" - + "pManagerStatusStatefulPerInstanceConfigs" - + "\022\036\n\rall_effective\030\211\221\247\366\001 \001(\010H\000\210\001\001B\020\n\016_all" - + "_effective\"U\n\'InstanceGroupManagerStatus" - + "VersionTarget\022\033\n\nis_reached\030\275\376\310\316\001 \001(\010H\000\210" - + "\001\001B\r\n\013_is_reached\"\334\006\n InstanceGroupManag" - + "erUpdatePolicy\022-\n\034instance_redistributio" - + "n_type\030\230\337\304\213\001 \001(\tH\000\210\001\001\022C\n\tmax_surge\030\223\311\243\220\001" - + " \001(\0132\'.google.cloud.compute.v1.FixedOrPe" - + "rcentH\001\210\001\001\022I\n\017max_unavailable\030\365\313\213\301\001 \001(\0132" - + "\'.google.cloud.compute.v1.FixedOrPercent" - + "H\002\210\001\001\022\037\n\016minimal_action\030\224\215\202\201\001 \001(\tH\003\210\001\001\022." - + "\n\036most_disruptive_allowed_action\030\215\316\302\037 \001(" - + "\tH\004\210\001\001\022#\n\022replacement_method\030\256\317\237\361\001 \001(\tH\005" - + "\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\tH\006\210\001\001\"H\n\032InstanceRed" - + "istributionType\022*\n&UNDEFINED_INSTANCE_RE" - + "DISTRIBUTION_TYPE\020\000\"-\n\rMinimalAction\022\034\n\030" - + "UNDEFINED_MINIMAL_ACTION\020\000\"K\n\033MostDisrup" - + "tiveAllowedAction\022,\n(UNDEFINED_MOST_DISR" - + "UPTIVE_ALLOWED_ACTION\020\000\"[\n\021ReplacementMe" - + "thod\022 \n\034UNDEFINED_REPLACEMENT_METHOD\020\000\022\020" - + "\n\010RECREATE\020\357\331\233\371\001\022\022\n\nSUBSTITUTE\020\232\241\372\205\001\"1\n\004" - + "Type\022\022\n\016UNDEFINED_TYPE\020\000\022\025\n\rOPPORTUNISTI" - + "C\020\351\267\350\314\001B\037\n\035_instance_redistribution_type" - + "B\014\n\n_max_surgeB\022\n\020_max_unavailableB\021\n\017_m" - + "inimal_actionB!\n\037_most_disruptive_allowe" - + "d_actionB\025\n\023_replacement_methodB\007\n\005_type" - + "\"\314\001\n\033InstanceGroupManagerVersion\022\"\n\021inst" - + "ance_template\030\344\201\273\223\001 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315" - + "\001 \001(\tH\001\210\001\001\022D\n\013target_size\030\357\363\375\035 \001(\0132\'.goo" - + "gle.cloud.compute.v1.FixedOrPercentH\002\210\001\001" - + "B\024\n\022_instance_templateB\007\n\005_nameB\016\n\014_targ" - + "et_size\"D\n,InstanceGroupManagersAbandonI" - + "nstancesRequest\022\024\n\tinstances\030\376\374\357\r \003(\t\"\365\002" - + "\n(InstanceGroupManagersApplyUpdatesReque" - + "st\022\036\n\rall_instances\030\340\272\276\300\001 \001(\010H\000\210\001\001\022\024\n\tin" - + "stances\030\376\374\357\r \003(\t\022\037\n\016minimal_action\030\224\215\202\201\001" - + " \001(\tH\001\210\001\001\022.\n\036most_disruptive_allowed_act" - + "ion\030\215\316\302\037 \001(\tH\002\210\001\001\"-\n\rMinimalAction\022\034\n\030UN" - + "DEFINED_MINIMAL_ACTION\020\000\"K\n\033MostDisrupti" - + "veAllowedAction\022,\n(UNDEFINED_MOST_DISRUP" - + "TIVE_ALLOWED_ACTION\020\000B\020\n\016_all_instancesB" - + "\021\n\017_minimal_actionB!\n\037_most_disruptive_a" - + "llowed_action\"o\n+InstanceGroupManagersCr" - + "eateInstancesRequest\022@\n\tinstances\030\376\374\357\r \003" - + "(\0132*.google.cloud.compute.v1.PerInstance" - + "Config\"\236\001\n+InstanceGroupManagersDeleteIn" - + "stancesRequest\022\024\n\tinstances\030\376\374\357\r \003(\t\0222\n\"" - + "skip_instances_on_validation_error\030\241\366\257\023 " - + "\001(\010H\000\210\001\001B%\n#_skip_instances_on_validatio" - + "n_error\"D\n0InstanceGroupManagersDeletePe" - + "rInstanceConfigsReq\022\020\n\005names\030\310\256\3571 \003(\t\"\244\001" - + "\n\'InstanceGroupManagersListErrorsRespons" - + "e\022D\n\005items\030\300\317\367/ \003(\01322.google.cloud.compu" - + "te.v1.InstanceManagedByIgmError\022\037\n\017next_" - + "page_token\030\225\272\206& \001(\tH\000\210\001\001B\022\n\020_next_page_t" - + "oken\"\261\001\n1InstanceGroupManagersListManage" - + "dInstancesResponse\022G\n\021managed_instances\030" - + "\336\233\251\240\001 \003(\0132(.google.cloud.compute.v1.Mana" - + "gedInstance\022\037\n\017next_page_token\030\225\272\206& \001(\tH" - + "\000\210\001\001B\022\n\020_next_page_token\"\353\001\n/InstanceGro" - + "upManagersListPerInstanceConfigsResp\022<\n\005" - + "items\030\300\317\367/ \003(\0132*.google.cloud.compute.v1" - + ".PerInstanceConfig\022\037\n\017next_page_token\030\225\272" - + "\206& \001(\tH\000\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google" - + ".cloud.compute.v1.WarningH\001\210\001\001B\022\n\020_next_" - + "page_tokenB\n\n\010_warning\"\177\n/InstanceGroupM" - + "anagersPatchPerInstanceConfigsReq\022L\n\024per" - + "_instance_configs\030\251\325\370\372\001 \003(\0132*.google.clo" - + "ud.compute.v1.PerInstanceConfig\"E\n-Insta" - + "nceGroupManagersRecreateInstancesRequest" - + "\022\024\n\tinstances\030\376\374\357\r \003(\t\"\273\001\n\037InstanceGroup" - + "ManagersScopedList\022Q\n\027instance_group_man" - + "agers\030\220\372\211f \003(\0132-.google.cloud.compute.v1" - + ".InstanceGroupManager\0229\n\007warning\030\234\337\226\030 \001(" - + "\0132 .google.cloud.compute.v1.WarningH\000\210\001\001" - + "B\n\n\010_warning\"k\n/InstanceGroupManagersSet" - + "InstanceTemplateRequest\022\"\n\021instance_temp" - + "late\030\344\201\273\223\001 \001(\tH\000\210\001\001B\024\n\022_instance_templat" - + "e\"s\n*InstanceGroupManagersSetTargetPools" - + "Request\022\033\n\013fingerprint\030\344\321\363o \001(\tH\000\210\001\001\022\030\n\014" - + "target_pools\030\251\237\240\240\001 \003(\tB\016\n\014_fingerprint\"\200" - + "\001\n0InstanceGroupManagersUpdatePerInstanc" - + "eConfigsReq\022L\n\024per_instance_configs\030\251\325\370\372" - + "\001 \003(\0132*.google.cloud.compute.v1.PerInsta" - + "nceConfig\"e\n!InstanceGroupsAddInstancesR" - + "equest\022@\n\tinstances\030\376\374\357\r \003(\0132*.google.cl" - + "oud.compute.v1.InstanceReference\"\276\002\n\033Ins" - + "tanceGroupsListInstances\022\020\n\002id\030\233\032 \001(\tH\000\210" - + "\001\001\022A\n\005items\030\300\317\367/ \003(\0132/.google.cloud.comp" - + "ute.v1.InstanceWithNamedPorts\022\024\n\004kind\030\224\367" - + "\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH" - + "\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warn" - + "ing\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.W" - + "arningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_pag" - + "e_tokenB\014\n\n_self_linkB\n\n\010_warning\"\241\001\n\"In" - + "stanceGroupsListInstancesRequest\022\036\n\016inst" - + "ance_state\030\347\360\374+ \001(\tH\000\210\001\001\"H\n\rInstanceStat" - + "e\022\034\n\030UNDEFINED_INSTANCE_STATE\020\000\022\t\n\003ALL\020\201" - + "\373\003\022\016\n\007RUNNING\020\237\303\3529B\021\n\017_instance_state\"h\n" - + "$InstanceGroupsRemoveInstancesRequest\022@\n" - + "\tinstances\030\376\374\357\r \003(\0132*.google.cloud.compu" - + "te.v1.InstanceReference\"\246\001\n\030InstanceGrou" - + "psScopedList\022C\n\017instance_groups\030\276\301\337\256\001 \003(" - + "\0132&.google.cloud.compute.v1.InstanceGrou" - + "p\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.com" - + "pute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\216\001\n\"Ins" - + "tanceGroupsSetNamedPortsRequest\022\033\n\013finge" - + "rprint\030\344\321\363o \001(\tH\000\210\001\001\022;\n\013named_ports\030\214\307\362\313" - + "\001 \003(\0132\".google.cloud.compute.v1.NamedPor" - + "tB\016\n\014_fingerprint\"\241\002\n\014InstanceList\022\020\n\002id" - + "\030\233\032 \001(\tH\000\210\001\001\0223\n\005items\030\300\317\367/ \003(\0132!.google." - + "cloud.compute.v1.Instance\022\024\n\004kind\030\224\367\310\001 \001" - + "(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001" - + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030" - + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" - + "ngH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_to" - + "kenB\014\n\n_self_linkB\n\n\010_warning\"\253\002\n\025Instan" - + "ceListReferrers\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0224\n\005ite" - + "ms\030\300\317\367/ \003(\0132\".google.cloud.compute.v1.Re" - + "ference\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_pa" - + "ge_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331" - + "\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google." - + "cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005" - + "_kindB\022\n\020_next_page_tokenB\014\n\n_self_linkB" - + "\n\n\010_warning\"\274\002\n\031InstanceManagedByIgmErro" - + "r\022]\n\005error\030\210\244\223. \001(\0132F.google.cloud.compu" - + "te.v1.InstanceManagedByIgmErrorManagedIn" - + "stanceErrorH\000\210\001\001\022q\n\027instance_action_deta" - + "ils\030\243\374\253\213\001 \001(\0132G.google.cloud.compute.v1." - + "InstanceManagedByIgmErrorInstanceActionD" - + "etailsH\001\210\001\001\022\031\n\ttimestamp\030\226\322\244\032 \001(\tH\002\210\001\001B\010" - + "\n\006_errorB\032\n\030_instance_action_detailsB\014\n\n" - + "_timestamp\"\360\003\n.InstanceManagedByIgmError" - + "InstanceActionDetails\022\026\n\006action\030\266\374\275Y \001(\t" - + "H\000\210\001\001\022\030\n\010instance\030\225\251\332\010 \001(\tH\001\210\001\001\022I\n\007versi" - + "on\030\330\271\324\247\001 \001(\0132/.google.cloud.compute.v1.M" - + "anagedInstanceVersionH\002\210\001\001\"\234\002\n\006Action\022\024\n" - + "\020UNDEFINED_ACTION\020\000\022\022\n\nABANDONING\020\315\312\220\271\001\022" - + "\020\n\010CREATING\020\271\275\235\331\001\022 \n\030CREATING_WITHOUT_RE" - + "TRIES\020\211\306\276\314\001\022\020\n\010DELETING\020\250\247\207\374\001\022\013\n\004NONE\020\270\316" - + "\222\001\022\022\n\nRECREATING\020\354\213\376\210\001\022\021\n\nREFRESHING\020\247\376\354" - + "M\022\022\n\nRESTARTING\020\363\356\353\230\001\022\020\n\010RESUMING\020\252\373\211\325\001\022" - + "\020\n\010STARTING\020\300\240\213\351\001\022\020\n\010STOPPING\020\364\320\242\247\001\022\022\n\nS" - + "USPENDING\020\246\324\230\365\001\022\020\n\tVERIFYING\020\251\301\214\010B\t\n\007_ac" - + "tionB\013\n\t_instanceB\n\n\010_version\"t\n-Instanc" - + "eManagedByIgmErrorManagedInstanceError\022\024" - + "\n\004code\030\355\333\272\001 \001(\tH\000\210\001\001\022\030\n\007message\030\207\200\254\307\001 \001(" - + "\tH\001\210\001\001B\007\n\005_codeB\n\n\010_message\"\202\001\n\023Instance" - + "MoveRequest\022 \n\020destination_zone\030\275\342\357> \001(\t" - + "H\000\210\001\001\022 \n\017target_instance\030\203\217\226\212\001 \001(\tH\001\210\001\001B" - + "\023\n\021_destination_zoneB\022\n\020_target_instance" - + "\"\261\001\n\016InstanceParams\022c\n\025resource_manager_" - + "tags\030\374\233\213\264\001 \003(\0132@.google.cloud.compute.v1" - + ".InstanceParams.ResourceManagerTagsEntry" - + "\032:\n\030ResourceManagerTagsEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\330\020\n\022InstancePropert" - + "ies\022\\\n\031advanced_machine_features\030\262\347\252\303\001 \001" - + "(\01320.google.cloud.compute.v1.AdvancedMac" - + "hineFeaturesH\000\210\001\001\022\037\n\016can_ip_forward\030\374\206\204\337" - + "\001 \001(\010H\001\210\001\001\022b\n\034confidential_instance_conf" - + "ig\030\365\222\372\351\001 \001(\01323.google.cloud.compute.v1.C" - + "onfidentialInstanceConfigH\002\210\001\001\022\034\n\013descri" - + "ption\030\374\207\326\311\001 \001(\tH\003\210\001\001\0227\n\005disks\030\366\314\312- \003(\0132%" - + ".google.cloud.compute.v1.AttachedDisk\022J\n" - + "\022guest_accelerators\030\357\314\207\335\001 \003(\0132*.google.c" - + "loud.compute.v1.AcceleratorConfig\022*\n\032key" - + "_revocation_action_type\030\342\334\300p \001(\tH\004\210\001\001\022K\n" - + "\006labels\030\377\277\301\356\001 \003(\01327.google.cloud.compute" - + ".v1.InstanceProperties.LabelsEntry\022\034\n\014ma" - + "chine_type\030\262\260\312l \001(\tH\005\210\001\001\022;\n\010metadata\030\257\366\265" - + ") \001(\0132!.google.cloud.compute.v1.Metadata" - + "H\006\210\001\001\022 \n\020min_cpu_platform\030\367\233\352s \001(\tH\007\210\001\001\022" - + "H\n\022network_interfaces\030\213\332\222\031 \003(\0132).google." - + "cloud.compute.v1.NetworkInterface\022^\n\032net" - + "work_performance_config\030\342\227\370\275\001 \001(\01321.goog" - + "le.cloud.compute.v1.NetworkPerformanceCo" - + "nfigH\010\210\001\001\022*\n\032private_ipv6_google_access\030" - + "\216\314\202\027 \001(\tH\t\210\001\001\022R\n\024reservation_affinity\030\273\270" - + "\242K \001(\0132,.google.cloud.compute.v1.Reserva" - + "tionAffinityH\n\210\001\001\022g\n\025resource_manager_ta" - + "gs\030\374\233\213\264\001 \003(\0132D.google.cloud.compute.v1.I" - + "nstanceProperties.ResourceManagerTagsEnt" - + "ry\022\034\n\021resource_policies\030\341\234\314\n \003(\t\022@\n\nsche" - + "duling\030\224\313\261\270\001 \001(\0132#.google.cloud.compute." - + "v1.SchedulingH\013\210\001\001\022E\n\020service_accounts\030\260" - + "\304\253\204\001 \003(\0132\'.google.cloud.compute.v1.Servi" - + "ceAccount\022Y\n\030shielded_instance_config\030\265\213" - + "\221\006 \001(\0132/.google.cloud.compute.v1.Shielde" - + "dInstanceConfigH\014\210\001\001\0223\n\004tags\030\231\350\330\001 \001(\0132\035." - + "google.cloud.compute.v1.TagsH\r\210\001\001\032-\n\013Lab" - + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + "\032:\n\030ResourceManagerTagsEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\215\001\n\027KeyRevocationAc" - + "tionType\022(\n$UNDEFINED_KEY_REVOCATION_ACT" - + "ION_TYPE\020\000\022.\n&KEY_REVOCATION_ACTION_TYPE" - + "_UNSPECIFIED\020\332\221\336\336\001\022\013\n\004NONE\020\270\316\222\001\022\013\n\004STOP\020" - + "\202\200\234\001\"\300\001\n\027PrivateIpv6GoogleAccess\022(\n$UNDE" - + "FINED_PRIVATE_IPV6_GOOGLE_ACCESS\020\000\022-\n%EN" - + "ABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\020\272\312\211\314" - + "\001\022+\n#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - + "\020\327\372\266\211\001\022\037\n\027INHERIT_FROM_SUBNETWORK\020\277\250\354\374\001B" - + "\034\n\032_advanced_machine_featuresB\021\n\017_can_ip" - + "_forwardB\037\n\035_confidential_instance_confi" - + "gB\016\n\014_descriptionB\035\n\033_key_revocation_act" - + "ion_typeB\017\n\r_machine_typeB\013\n\t_metadataB\023" - + "\n\021_min_cpu_platformB\035\n\033_network_performa" - + "nce_configB\035\n\033_private_ipv6_google_acces" - + "sB\027\n\025_reservation_affinityB\r\n\013_schedulin" - + "gB\033\n\031_shielded_instance_configB\007\n\005_tags\"" - + ":\n\021InstanceReference\022\030\n\010instance\030\225\251\332\010 \001(" - + "\tH\000\210\001\001B\013\n\t_instance\"\237\004\n\020InstanceTemplate" - + "\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013" - + "description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\020\n\002id\030\233\032 \001(\004H" - + "\002\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\003\210\001\001\022\024\n\004name\030\213\365\315\001 " - + "\001(\tH\004\210\001\001\022G\n\nproperties\030\263\232\266F \001(\0132+.google" - + ".cloud.compute.v1.InstancePropertiesH\005\210\001" - + "\001\022\026\n\006region\030\364\315\240B \001(\tH\006\210\001\001\022\032\n\tself_link\030\215" - + "\222\305\331\001 \001(\tH\007\210\001\001\022 \n\017source_instance\030\271\230\375\274\001 \001" - + "(\tH\010\210\001\001\022U\n\026source_instance_params\030\314\320\304@ \001" - + "(\0132-.google.cloud.compute.v1.SourceInsta" - + "nceParamsH\t\210\001\001B\025\n\023_creation_timestampB\016\n" - + "\014_descriptionB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\r" - + "\n\013_propertiesB\t\n\007_regionB\014\n\n_self_linkB\022" - + "\n\020_source_instanceB\031\n\027_source_instance_p" - + "arams\"\270\003\n\036InstanceTemplateAggregatedList" - + "\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022T\n\005items\030\300\317\367/ \003(\0132B.g" - + "oogle.cloud.compute.v1.InstanceTemplateA" - + "ggregatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(" - + "\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022" - + "\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234" - + "\337\226\030 \001(\0132 .google.cloud.compute.v1.Warnin" - + "gH\004\210\001\001\032b\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022C\n\005val" - + "ue\030\002 \001(\01324.google.cloud.compute.v1.Insta" - + "nceTemplatesScopedList:\0028\001B\005\n\003_idB\007\n\005_ki" - + "ndB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010" - + "_warning\"\261\002\n\024InstanceTemplateList\022\020\n\002id\030" - + "\233\032 \001(\tH\000\210\001\001\022;\n\005items\030\300\317\367/ \003(\0132).google.c" - + "loud.compute.v1.InstanceTemplate\022\024\n\004kind" - + "\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001" - + "(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007w" - + "arning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v" - + "1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_" - + "page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\257\001\n" - + "\033InstanceTemplatesScopedList\022I\n\022instance" - + "_templates\030\217\270\245\333\001 \003(\0132).google.cloud.comp" - + "ute.v1.InstanceTemplate\0229\n\007warning\030\234\337\226\030 " - + "\001(\0132 .google.cloud.compute.v1.WarningH\000\210" - + "\001\001B\n\n\010_warning\"\376\002\n\026InstanceWithNamedPort" - + "s\022\030\n\010instance\030\225\251\332\010 \001(\tH\000\210\001\001\022;\n\013named_por" - + "ts\030\214\307\362\313\001 \003(\0132\".google.cloud.compute.v1.N" - + "amedPort\022\026\n\006status\030\362\237\267V \001(\tH\001\210\001\001\"\334\001\n\006Sta" - + "tus\022\024\n\020UNDEFINED_STATUS\020\000\022\026\n\016DEPROVISION" - + "ING\020\356\223\304\314\001\022\024\n\014PROVISIONING\020\355\365\332\212\001\022\021\n\tREPAI", - "RING\020\225\202\225\305\001\022\016\n\007RUNNING\020\237\303\3529\022\017\n\007STAGING\020\233\310" - + "\306\315\001\022\017\n\007STOPPED\020\255\273\354\323\001\022\020\n\010STOPPING\020\364\320\242\247\001\022\020" - + "\n\tSUSPENDED\020\273\273\266\030\022\022\n\nSUSPENDING\020\246\324\230\365\001\022\021\n\n" - + "TERMINATED\020\243\364\233wB\013\n\t_instanceB\t\n\007_status\"" - + "C\n#InstancesAddResourcePoliciesRequest\022\034" - + "\n\021resource_policies\030\341\234\314\n \003(\t\"\330\001\n&Instanc" - + "esGetEffectiveFirewallsResponse\022t\n\020firew" - + "all_policys\030\302\312\374\303\001 \003(\0132V.google.cloud.com" - + "pute.v1.InstancesGetEffectiveFirewallsRe" - + "sponseEffectiveFirewallPolicy\0228\n\tfirewal" - + "ls\030\363\306\350\201\001 \003(\0132!.google.cloud.compute.v1.F" - + "irewall\"\204\003\n=InstancesGetEffectiveFirewal" - + "lsResponseEffectiveFirewallPolicy\022\034\n\014dis" - + "play_name\030\350\207\221\002 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\t" - + "H\001\210\001\001\022=\n\005rules\030\367\221\3653 \003(\0132+.google.cloud.c" - + "ompute.v1.FirewallPolicyRule\022\033\n\nshort_na" - + "me\030\356\270\320\352\001 \001(\tH\002\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\tH\003\210\001\001\"" - + "k\n\004Type\022\022\n\016UNDEFINED_TYPE\020\000\022\020\n\tHIERARCHY" - + "\020\225\304\252!\022\017\n\007NETWORK\020\216\314\263\305\001\022\027\n\020NETWORK_REGION" - + "AL\020\260\342\375Z\022\023\n\013UNSPECIFIED\020\227\276\230\373\001B\017\n\r_display" - + "_nameB\007\n\005_nameB\r\n\013_short_nameB\007\n\005_type\"F" - + "\n&InstancesRemoveResourcePoliciesRequest" - + "\022\034\n\021resource_policies\030\341\234\314\n \003(\t\"\225\001\n\023Insta" - + "ncesScopedList\0227\n\tinstances\030\376\374\357\r \003(\0132!.g" - + "oogle.cloud.compute.v1.Instance\0229\n\007warni" - + "ng\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Wa" - + "rningH\000\210\001\001B\n\n\010_warning\"\327\001\n\031InstancesSetL" - + "abelsRequest\022!\n\021label_fingerprint\030\231\360\367T \001" - + "(\tH\000\210\001\001\022R\n\006labels\030\377\277\301\356\001 \003(\0132>.google.clo" - + "ud.compute.v1.InstancesSetLabelsRequest." - + "LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001B\024\n\022_label_fingerprint" - + "\"q\n#InstancesSetMachineResourcesRequest\022" - + "J\n\022guest_accelerators\030\357\314\207\335\001 \003(\0132*.google" - + ".cloud.compute.v1.AcceleratorConfig\"O\n\036I" - + "nstancesSetMachineTypeRequest\022\034\n\014machine" - + "_type\030\262\260\312l \001(\tH\000\210\001\001B\017\n\r_machine_type\"Z\n!" - + "InstancesSetMinCpuPlatformRequest\022 \n\020min" - + "_cpu_platform\030\367\233\352s \001(\tH\000\210\001\001B\023\n\021_min_cpu_" - + "platform\"h\n\027InstancesSetNameRequest\022\035\n\014c" - + "urrent_name\030\221\363\253\274\001 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 " - + "\001(\tH\001\210\001\001B\017\n\r_current_nameB\007\n\005_name\"W\n!In" - + "stancesSetServiceAccountRequest\022\025\n\005email" - + "\030\234\227\211. \001(\tH\000\210\001\001\022\021\n\006scopes\030\237\231\222O \003(\tB\010\n\006_em" - + "ail\"w\n&InstancesStartWithEncryptionKeyRe" - + "quest\022M\n\005disks\030\366\314\312- \003(\0132;.google.cloud.c" - + "ompute.v1.CustomerEncryptionKeyProtected" - + "Disk\"h\n\017Int64RangeMatch\022\032\n\trange_end\030\331\225\340" - + "\231\001 \001(\003H\000\210\001\001\022\033\n\013range_start\030\340\375\2421 \001(\003H\001\210\001\001" - + "B\014\n\n_range_endB\016\n\014_range_start\"\244\014\n\014Inter" - + "connect\022\036\n\radmin_enabled\030\321\354\301\324\001 \001(\010H\000\210\001\001\022" - + "J\n\rcircuit_infos\030\257\203\315N \003(\01320.google.cloud" - + ".compute.v1.InterconnectCircuitInfo\022\"\n\022c" - + "reation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\035\n\rcusto" - + "mer_name\030\314\334\337\001 \001(\tH\002\210\001\001\022\034\n\013description\030\374\207" - + "\326\311\001 \001(\tH\003\210\001\001\022T\n\020expected_outages\030\233\352\216~ \003(" - + "\01327.google.cloud.compute.v1.Interconnect" - + "OutageNotification\022\"\n\021google_ip_address\030" - + "\242\205\245\323\001 \001(\tH\004\210\001\001\022$\n\023google_reference_id\030\325\265" - + "\212\377\001 \001(\tH\005\210\001\001\022\020\n\002id\030\233\032 \001(\004H\006\210\001\001\022$\n\030interc" - + "onnect_attachments\030\377\322\353\312\001 \003(\t\022\"\n\021intercon" - + "nect_type\030\313\230\323\365\001 \001(\tH\007\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(" - + "\tH\010\210\001\001\022\032\n\tlink_type\030\337\210\276\371\001 \001(\tH\t\210\001\001\022\031\n\010lo" - + "cation\030\265\277\276\212\001 \001(\tH\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\013" - + "\210\001\001\022!\n\021noc_contact_email\030\200\370\332\006 \001(\tH\014\210\001\001\022\"" - + "\n\022operational_status\030\377\261\360_ \001(\tH\r\210\001\001\022\037\n\017pe" - + "er_ip_address\030\331\227\207c \001(\tH\016\210\001\001\022\'\n\026provision" - + "ed_link_count\030\365\322\366\303\001 \001(\005H\017\210\001\001\022$\n\024requeste" - + "d_link_count\030\373\333\275\025 \001(\005H\020\210\001\001\022\036\n\rsatisfies_" - + "pzs\030\253\335\253\345\001 \001(\010H\021\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(" - + "\tH\022\210\001\001\022\025\n\005state\030\221\211\2534 \001(\tH\023\210\001\001\"j\n\020Interco" - + "nnectType\022\037\n\033UNDEFINED_INTERCONNECT_TYPE" - + "\020\000\022\020\n\tDEDICATED\020\317\233\234{\022\022\n\nIT_PRIVATE\020\317\214\210\240\001" - + "\022\017\n\007PARTNER\020\250\321\241\334\001\"i\n\010LinkType\022\027\n\023UNDEFIN" - + "ED_LINK_TYPE\020\000\022\"\n\032LINK_TYPE_ETHERNET_100" - + "G_LR\020\347\362\201\241\001\022 \n\031LINK_TYPE_ETHERNET_10G_LR\020" - + "\245\271\361p\"`\n\021OperationalStatus\022 \n\034UNDEFINED_O" - + "PERATIONAL_STATUS\020\000\022\020\n\tOS_ACTIVE\020\301\373\310\032\022\027\n" - + "\020OS_UNPROVISIONED\020\300\301\252r\"C\n\005State\022\023\n\017UNDEF" - + "INED_STATE\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\025\n\rUNPROVIS" - + "IONED\020\333\307\327\366\001B\020\n\016_admin_enabledB\025\n\023_creati" - + "on_timestampB\020\n\016_customer_nameB\016\n\014_descr" - + "iptionB\024\n\022_google_ip_addressB\026\n\024_google_" - + "reference_idB\005\n\003_idB\024\n\022_interconnect_typ" - + "eB\007\n\005_kindB\014\n\n_link_typeB\013\n\t_locationB\007\n" - + "\005_nameB\024\n\022_noc_contact_emailB\025\n\023_operati" - + "onal_statusB\022\n\020_peer_ip_addressB\031\n\027_prov" - + "isioned_link_countB\027\n\025_requested_link_co" - + "untB\020\n\016_satisfies_pzsB\014\n\n_self_linkB\010\n\006_" - + "state\"\232\026\n\026InterconnectAttachment\022\036\n\radmi" - + "n_enabled\030\321\354\301\324\001 \001(\010H\000\210\001\001\022\031\n\tbandwidth\030\261\201" - + "\323V \001(\tH\001\210\001\001\022!\n\026candidate_ipv6_subnets\030\232\217" - + "\332! \003(\t\022\034\n\021candidate_subnets\030\372\343\264q \003(\t\022(\n\027" - + "cloud_router_ip_address\030\210\210\205\211\001 \001(\tH\002\210\001\001\022*" - + "\n\031cloud_router_ipv6_address\030\310\223\277\327\001 \001(\tH\003\210" - + "\001\001\022/\n\036cloud_router_ipv6_interface_id\030\215\311\310" - + "\370\001 \001(\tH\004\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001" - + "(\tH\005\210\001\001\022+\n\032customer_router_ip_address\030\361\332" - + "\304\236\001 \001(\tH\006\210\001\001\022-\n\034customer_router_ipv6_add" - + "ress\030\361\371\253\212\001 \001(\tH\007\210\001\001\0222\n!customer_router_i" - + "pv6_interface_id\030\204\206\326\265\001 \001(\tH\010\210\001\001\022!\n\021datap" - + "lane_version\030\213\255\323\020 \001(\005H\t\210\001\001\022\034\n\013descriptio" - + "n\030\374\207\326\311\001 \001(\tH\n\210\001\001\022(\n\030edge_availability_do" - + "main\030\246\225\377! \001(\tH\013\210\001\001\022\032\n\nencryption\030\203\237\334. \001(" - + "\tH\014\210\001\001\022$\n\023google_reference_id\030\325\265\212\377\001 \001(\tH" - + "\r\210\001\001\022\020\n\002id\030\233\032 \001(\004H\016\210\001\001\022\034\n\014interconnect\030\216" - + "\311\214k \001(\tH\017\210\001\001\022$\n\030ipsec_internal_addresses" - + "\030\265\362\260\302\001 \003(\t\022\024\n\004kind\030\224\367\310\001 \001(\tH\020\210\001\001\022\022\n\003mtu\030" - + "\256\317\006 \001(\005H\021\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\022\210\001\001\022\"\n\022op" - + "erational_status\030\377\261\360_ \001(\tH\023\210\001\001\022\034\n\013pairin" - + "g_key\030\350\360\324\321\001 \001(\tH\024\210\001\001\022\034\n\013partner_asn\030\205\305\367\320" - + "\001 \001(\003H\025\210\001\001\022`\n\020partner_metadata\030\306\341\266\037 \001(\0132" - + ">.google.cloud.compute.v1.InterconnectAt" - + "tachmentPartnerMetadataH\026\210\001\001\022e\n\031private_" - + "interconnect_info\030\203\354\221q \001(\0132:.google.clou" - + "d.compute.v1.InterconnectAttachmentPriva" - + "teInfoH\027\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\030\210\001\001\022\026\n\006r" - + "outer\030\311\256\356F \001(\tH\031\210\001\001\022\036\n\rsatisfies_pzs\030\253\335\253" - + "\345\001 \001(\010H\032\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\033\210\001\001\022" - + "\033\n\nstack_type\030\221\265\213\313\001 \001(\tH\034\210\001\001\022\025\n\005state\030\221\211" - + "\2534 \001(\tH\035\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\tH\036\210\001\001\022\035\n\rvla" - + "n_tag8021q\030\234\350\2279 \001(\005H\037\210\001\001\"\355\001\n\tBandwidth\022\027" - + "\n\023UNDEFINED_BANDWIDTH\020\000\022\017\n\010BPS_100M\020\266\225\320\027" - + "\022\017\n\007BPS_10G\020\216\211\362\204\001\022\016\n\006BPS_1G\020\360\255\271\251\001\022\017\n\010BPS" - + "_200M\020\225\376\321\027\022\017\n\007BPS_20G\020\317\220\362\204\001\022\016\n\006BPS_2G\020\217\256" - + "\271\251\001\022\017\n\010BPS_300M\020\364\346\323\027\022\017\n\010BPS_400M\020\323\317\325\027\022\017\n" - + "\010BPS_500M\020\262\270\327\027\022\017\n\007BPS_50G\020\222\247\362\204\001\022\017\n\007BPS_5" - + "0M\020\230\247\362\204\001\022\016\n\006BPS_5G\020\354\256\271\251\001\"\237\001\n\026EdgeAvailab" - + "ilityDomain\022&\n\"UNDEFINED_EDGE_AVAILABILI" - + "TY_DOMAIN\020\000\022\035\n\025AVAILABILITY_DOMAIN_1\020\332\373\326" - + "\246\001\022\035\n\025AVAILABILITY_DOMAIN_2\020\333\373\326\246\001\022\037\n\027AVA" - + "ILABILITY_DOMAIN_ANY\020\265\352\367\262\001\"A\n\nEncryption" - + "\022\030\n\024UNDEFINED_ENCRYPTION\020\000\022\014\n\005IPSEC\020\252\243\251!" - + "\022\013\n\004NONE\020\270\316\222\001\"`\n\021OperationalStatus\022 \n\034UN" - + "DEFINED_OPERATIONAL_STATUS\020\000\022\020\n\tOS_ACTIV" - + "E\020\301\373\310\032\022\027\n\020OS_UNPROVISIONED\020\300\301\252r\"I\n\tStack" - + "Type\022\030\n\024UNDEFINED_STACK_TYPE\020\000\022\020\n\tIPV4_I" - + "PV6\020\201\350\312\n\022\020\n\tIPV4_ONLY\020\246\313\325\n\"\302\001\n\005State\022\023\n\017" - + "UNDEFINED_STATE\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\016\n\007DEF" - + "UNCT\020\257\274\2417\022 \n\030PARTNER_REQUEST_RECEIVED\020\350\360" - + "\362\364\001\022\027\n\020PENDING_CUSTOMER\020\246\203\357O\022\027\n\017PENDING_" - + "PARTNER\020\340\373\372\270\001\022\031\n\021STATE_UNSPECIFIED\020\311\320\274\340\001" - + "\022\025\n\rUNPROVISIONED\020\333\307\327\366\001\"W\n\004Type\022\022\n\016UNDEF" - + "INED_TYPE\020\000\022\020\n\tDEDICATED\020\317\233\234{\022\017\n\007PARTNER" - + "\020\250\321\241\334\001\022\030\n\020PARTNER_PROVIDER\020\250\367\267\346\001B\020\n\016_adm" - + "in_enabledB\014\n\n_bandwidthB\032\n\030_cloud_route" - + "r_ip_addressB\034\n\032_cloud_router_ipv6_addre" - + "ssB!\n\037_cloud_router_ipv6_interface_idB\025\n" - + "\023_creation_timestampB\035\n\033_customer_router" - + "_ip_addressB\037\n\035_customer_router_ipv6_add" - + "ressB$\n\"_customer_router_ipv6_interface_" - + "idB\024\n\022_dataplane_versionB\016\n\014_description" - + "B\033\n\031_edge_availability_domainB\r\n\013_encryp" - + "tionB\026\n\024_google_reference_idB\005\n\003_idB\017\n\r_" - + "interconnectB\007\n\005_kindB\006\n\004_mtuB\007\n\005_nameB\025" - + "\n\023_operational_statusB\016\n\014_pairing_keyB\016\n" - + "\014_partner_asnB\023\n\021_partner_metadataB\034\n\032_p" - + "rivate_interconnect_infoB\t\n\007_regionB\t\n\007_" - + "routerB\020\n\016_satisfies_pzsB\014\n\n_self_linkB\r" - + "\n\013_stack_typeB\010\n\006_stateB\007\n\005_typeB\020\n\016_vla" - + "n_tag8021q\"\343\003\n$InterconnectAttachmentAgg" - + "regatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022Z\n\005items\030\300" - + "\317\367/ \003(\0132H.google.cloud.compute.v1.Interc" - + "onnectAttachmentAggregatedList.ItemsEntr" - + "y\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_tok" + + "H\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unr" + + "eachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 " + + ".google.cloud.compute.v1.WarningH\004\210\001\001\032h\n" + + "\nItemsEntry\022\013\n\003key\030\001 \001(\t\022I\n\005value\030\002 \001(\0132" + + ":.google.cloud.compute.v1.InterconnectAt" + + "tachmentsScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB" + + "\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_wa" + + "rning\"\275\002\n\032InterconnectAttachmentList\022\020\n\002" + + "id\030\233\032 \001(\tH\000\210\001\001\022A\n\005items\030\300\317\367/ \003(\0132/.googl" + + "e.cloud.compute.v1.InterconnectAttachmen" + + "t\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_tok" + "en\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH" - + "\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning" - + "\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warn" - + "ingH\004\210\001\001\032h\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022I\n\005v" - + "alue\030\002 \001(\0132:.google.cloud.compute.v1.Int" - + "erconnectAttachmentsScopedList:\0028\001B\005\n\003_i" - + "dB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_" - + "linkB\n\n\010_warning\"\275\002\n\032InterconnectAttachm" - + "entList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022A\n\005items\030\300\317\367/ " - + "\003(\0132/.google.cloud.compute.v1.Interconne" - + "ctAttachment\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" - + "xt_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link" - + "\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .go" - + "ogle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_i" - + "dB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_" - + "linkB\n\n\010_warning\"\274\001\n%InterconnectAttachm" - + "entPartnerMetadata\022\"\n\021interconnect_name\030" - + "\234\357\306\365\001 \001(\tH\000\210\001\001\022\034\n\014partner_name\030\242\247\220M \001(\tH" - + "\001\210\001\001\022\033\n\nportal_url\030\234\316\255\200\001 \001(\tH\002\210\001\001B\024\n\022_in" - + "terconnect_nameB\017\n\r_partner_nameB\r\n\013_por" - + "tal_url\"K\n!InterconnectAttachmentPrivate" - + "Info\022\031\n\010tag8021q\030\300\321\316\201\001 \001(\rH\000\210\001\001B\013\n\t_tag8" - + "021q\"\301\001\n!InterconnectAttachmentsScopedLi" - + "st\022U\n\030interconnect_attachments\030\377\322\353\312\001 \003(\013" - + "2/.google.cloud.compute.v1.InterconnectA" - + "ttachment\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.c" - + "loud.compute.v1.WarningH\000\210\001\001B\n\n\010_warning" - + "\"\305\001\n\027InterconnectCircuitInfo\022\"\n\022customer" - + "_demarc_id\030\223\214\334\r \001(\tH\000\210\001\001\022!\n\021google_circu" - + "it_id\030\367\215\370| \001(\tH\001\210\001\001\022!\n\020google_demarc_id\030" - + "\256\335\333\325\001 \001(\tH\002\210\001\001B\025\n\023_customer_demarc_idB\024\n" - + "\022_google_circuit_idB\023\n\021_google_demarc_id" - + "\"\225\005\n\027InterconnectDiagnostics\022P\n\narp_cach" - + "es\030\221\326\330\305\001 \003(\01328.google.cloud.compute.v1.I" - + "nterconnectDiagnosticsARPEntry\022(\n\027bundle" - + "_aggregation_type\030\224\311\262\317\001 \001(\tH\000\210\001\001\022)\n\031bund" - + "le_operational_status\030\334\227\3402 \001(\tH\001\210\001\001\022L\n\005l" - + "inks\030\271\237\2151 \003(\0132:.google.cloud.compute.v1." - + "InterconnectDiagnosticsLinkStatus\022\034\n\013mac" - + "_address\030\204\322\310\236\001 \001(\tH\002\210\001\001\"\212\001\n\025BundleAggreg" - + "ationType\022%\n!UNDEFINED_BUNDLE_AGGREGATIO" - + "N_TYPE\020\000\022#\n\034BUNDLE_AGGREGATION_TYPE_LACP" - + "\020\315\242\236\r\022%\n\036BUNDLE_AGGREGATION_TYPE_STATIC\020" - + "\331\230\225\030\"\217\001\n\027BundleOperationalStatus\022\'\n#UNDE" - + "FINED_BUNDLE_OPERATIONAL_STATUS\020\000\022&\n\036BUN" - + "DLE_OPERATIONAL_STATUS_DOWN\020\205\256\264\330\001\022#\n\034BUN" - + "DLE_OPERATIONAL_STATUS_UP\020\276\203\371LB\032\n\030_bundl" - + "e_aggregation_typeB\034\n\032_bundle_operationa" - + "l_statusB\016\n\014_mac_address\"{\n\037Interconnect" - + "DiagnosticsARPEntry\022\033\n\nip_address\030\334\361\334\301\001 " - + "\001(\tH\000\210\001\001\022\034\n\013mac_address\030\204\322\310\236\001 \001(\tH\001\210\001\001B\r" - + "\n\013_ip_addressB\016\n\014_mac_address\"\372\001\n%Interc" - + "onnectDiagnosticsLinkLACPStatus\022 \n\020googl" - + "e_system_id\030\245\205\277+ \001(\tH\000\210\001\001\022#\n\022neighbor_sy" - + "stem_id\030\236\230\371\243\001 \001(\tH\001\210\001\001\022\025\n\005state\030\221\211\2534 \001(\t" - + "H\002\210\001\001\"=\n\005State\022\023\n\017UNDEFINED_STATE\020\000\022\016\n\006A" - + "CTIVE\020\206\346\211\226\001\022\017\n\010DETACHED\020\362\366\241gB\023\n\021_google_" - + "system_idB\025\n\023_neighbor_system_idB\010\n\006_sta" - + "te\"\343\001\n\'InterconnectDiagnosticsLinkOptica" - + "lPower\022\025\n\005state\030\221\211\2534 \001(\tH\000\210\001\001\022\025\n\005value\030\361" - + "\242\2625 \001(\002H\001\210\001\001\"v\n\005State\022\023\n\017UNDEFINED_STATE" - + "\020\000\022\022\n\nHIGH_ALARM\020\324\362\315\221\001\022\023\n\014HIGH_WARNING\020\337" - + "\353\257i\022\021\n\tLOW_ALARM\020\346\252\377\226\001\022\023\n\013LOW_WARNING\020\361\252" - + "\306\241\001\022\007\n\002OK\020\334\023B\010\n\006_stateB\010\n\006_value\"\217\006\n!Int" - + "erconnectDiagnosticsLinkStatus\022P\n\narp_ca" - + "ches\030\221\326\330\305\001 \003(\01328.google.cloud.compute.v1" - + ".InterconnectDiagnosticsARPEntry\022\032\n\ncirc" - + "uit_id\030\261\372\257k \001(\tH\000\210\001\001\022\034\n\rgoogle_demarc\030\214\217" - + "\003 \001(\tH\001\210\001\001\022\\\n\013lacp_status\030\257\304\236\254\001 \001(\0132>.go" - + "ogle.cloud.compute.v1.InterconnectDiagno" - + "sticsLinkLACPStatusH\002\210\001\001\022\"\n\022operational_" - + "status\030\377\261\360_ \001(\tH\003\210\001\001\022i\n\027receiving_optica" - + "l_power\030\337\255\330t \001(\0132@.google.cloud.compute." - + "v1.InterconnectDiagnosticsLinkOpticalPow" - + "erH\004\210\001\001\022m\n\032transmitting_optical_power\030\235\272" - + "\211\333\001 \001(\0132@.google.cloud.compute.v1.Interc" - + "onnectDiagnosticsLinkOpticalPowerH\005\210\001\001\"\177" - + "\n\021OperationalStatus\022 \n\034UNDEFINED_OPERATI" - + "ONAL_STATUS\020\000\022$\n\034LINK_OPERATIONAL_STATUS" - + "_DOWN\020\375\344\246\206\001\022\"\n\032LINK_OPERATIONAL_STATUS_U" - + "P\020\266\266\355\221\001B\r\n\013_circuit_idB\020\n\016_google_demarc" - + "B\016\n\014_lacp_statusB\025\n\023_operational_statusB" - + "\032\n\030_receiving_optical_powerB\035\n\033_transmit" - + "ting_optical_power\"\251\002\n\020InterconnectList\022" - + "\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0227\n\005items\030\300\317\367/ \003(\0132%.go" - + "ogle.cloud.compute.v1.Interconnect\022\024\n\004ki" - + "nd\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206&" - + " \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n" - + "\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compute" - + ".v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_nex" - + "t_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\311" - + "\010\n\024InterconnectLocation\022\030\n\007address\030\364\267\336\334\001" - + " \001(\tH\000\210\001\001\022!\n\021availability_zone\030\220\320\307K \001(\tH" - + "\001\210\001\001\022\024\n\004city\030\353\262\272\001 \001(\tH\002\210\001\001\022\031\n\tcontinent\030" - + "\264\333\320? \001(\tH\003\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016" - + " \001(\tH\004\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\005\210\001\001\022" - + "\"\n\021facility_provider\030\215\240\246\376\001 \001(\tH\006\210\001\001\022-\n\035f" - + "acility_provider_facility_id\030\205\276\316) \001(\tH\007\210" - + "\001\001\022\020\n\002id\030\233\032 \001(\004H\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\t\210" - + "\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\n\210\001\001\022&\n\025peeringdb_fa" - + "cility_id\030\266\272\355\377\001 \001(\tH\013\210\001\001\022Q\n\014region_infos" - + "\030\372\350\356\224\001 \003(\01327.google.cloud.compute.v1.Int" - + "erconnectLocationRegionInfo\022\032\n\tself_link" - + "\030\215\222\305\331\001 \001(\tH\014\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\r\210\001\001\022" - + "\034\n\014supports_pzs\030\356\366\205( \001(\010H\016\210\001\001\"\352\001\n\tContin" - + "ent\022\027\n\023UNDEFINED_CONTINENT\020\000\022\016\n\006AFRICA\020\372" - + "\234\257\227\001\022\017\n\010ASIA_PAC\020\375\366\2169\022\017\n\010C_AFRICA\020\366\223\252\"\022\022" - + "\n\nC_ASIA_PAC\020\371\217\206\336\001\022\017\n\010C_EUROPE\020\236\312\305_\022\027\n\017C" - + "_NORTH_AMERICA\020\230\233\273\203\001\022\027\n\017C_SOUTH_AMERICA\020" - + "\340\214\260\275\001\022\016\n\006EUROPE\020\242\323\312\324\001\022\025\n\rNORTH_AMERICA\020\224" - + "\331\320\325\001\022\024\n\rSOUTH_AMERICA\020\334\312\305\017\"A\n\006Status\022\024\n\020" - + "UNDEFINED_STATUS\020\000\022\021\n\tAVAILABLE\020\251\265\346\322\001\022\016\n" - + "\006CLOSED\020\354\252\243\265\001B\n\n\010_addressB\024\n\022_availabili" - + "ty_zoneB\007\n\005_cityB\014\n\n_continentB\025\n\023_creat" - + "ion_timestampB\016\n\014_descriptionB\024\n\022_facili" - + "ty_providerB \n\036_facility_provider_facili" - + "ty_idB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\030\n\026_peeri" - + "ngdb_facility_idB\014\n\n_self_linkB\t\n\007_statu" - + "sB\017\n\r_supports_pzs\"\271\002\n\030InterconnectLocat" - + "ionList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022?\n\005items\030\300\317\367/ " - + "\003(\0132-.google.cloud.compute.v1.Interconne" - + "ctLocation\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next" - + "_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215" - + "\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .goog" - + "le.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB" - + "\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_li" - + "nkB\n\n\010_warning\"\272\002\n\036InterconnectLocationR" - + "egionInfo\022 \n\017expected_rtt_ms\030\372\203\276\311\001 \001(\003H\000" - + "\210\001\001\022!\n\021location_presence\030\305\224\2640 \001(\tH\001\210\001\001\022\026" - + "\n\006region\030\364\315\240B \001(\tH\002\210\001\001\"\205\001\n\020LocationPrese" - + "nce\022\037\n\033UNDEFINED_LOCATION_PRESENCE\020\000\022\016\n\006" - + "GLOBAL\020\243\357\357\353\001\022\024\n\014LOCAL_REGION\020\350\354\265\300\001\022\021\n\tLP" - + "_GLOBAL\020\276\335\353\314\001\022\027\n\017LP_LOCAL_REGION\020\303\332\375\350\001B\022" - + "\n\020_expected_rtt_msB\024\n\022_location_presence" - + "B\t\n\007_region\"\205\005\n\036InterconnectOutageNotifi" - + "cation\022\034\n\021affected_circuits\030\225\376\336T \003(\t\022\034\n\013" - + "description\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\030\n\010end_time\030\261" - + "\247\3476 \001(\003H\001\210\001\001\022\033\n\nissue_type\030\340\375\240\260\001 \001(\tH\002\210\001" - + "\001\022\024\n\004name\030\213\365\315\001 \001(\tH\003\210\001\001\022\026\n\006source\030\233\320\301T \001" - + "(\tH\004\210\001\001\022\032\n\nstart_time\030\212\351\356\021 \001(\003H\005\210\001\001\022\025\n\005s" - + "tate\030\221\211\2534 \001(\tH\006\210\001\001\"w\n\tIssueType\022\030\n\024UNDEF" - + "INED_ISSUE_TYPE\020\000\022\020\n\tIT_OUTAGE\020\205\341\350S\022\030\n\021I" - + "T_PARTIAL_OUTAGE\020\243\312\365+\022\r\n\006OUTAGE\020\361\245\217]\022\025\n\016" - + "PARTIAL_OUTAGE\020\217\267\217F\"C\n\006Source\022\024\n\020UNDEFIN" - + "ED_SOURCE\020\000\022\016\n\006GOOGLE\020\271\244\231\355\001\022\023\n\013NSRC_GOOG" - + "LE\020\342\377\272\363\001\"x\n\005State\022\023\n\017UNDEFINED_STATE\020\000\022\016" - + "\n\006ACTIVE\020\206\346\211\226\001\022\020\n\tCANCELLED\020\261\362\200\024\022\021\n\tCOMP" - + "LETED\020\253\214\344\223\001\022\020\n\tNS_ACTIVE\020\300\235\267x\022\023\n\013NS_CANC" - + "ELED\020\323\223\307\361\001B\016\n\014_descriptionB\013\n\t_end_timeB" - + "\r\n\013_issue_typeB\007\n\005_nameB\t\n\007_sourceB\r\n\013_s" - + "tart_timeB\010\n\006_state\"z\n#InterconnectsGetD" - + "iagnosticsResponse\022H\n\006result\030\235\220\267B \001(\01320." - + "google.cloud.compute.v1.InterconnectDiag" - + "nosticsH\000\210\001\001B\t\n\007_result\"\351\001\n\034InvalidateCa" - + "cheUrlMapRequest\022a\n cache_invalidation_r" - + "ule_resource\030\255\303\223\225\001 \001(\0132..google.cloud.co" - + "mpute.v1.CacheInvalidationRuleB\003\340A\002\022!\n\007p" - + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreques" - + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB" - + "\003\340A\002B\r\n\013_request_id\"D\n\005Items\022\022\n\003key\030\337\274\006 " - + "\001(\tH\000\210\001\001\022\025\n\005value\030\361\242\2625 \001(\tH\001\210\001\001B\006\n\004_keyB" - + "\010\n\006_value\"\375\003\n\007License\022 \n\017charges_use_fee" - + "\030\316\241\312\261\001 \001(\010H\000\210\001\001\022\"\n\022creation_timestamp\030\266\217" - + "\307\016 \001(\tH\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001" - + "\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001" - + "\001\022\033\n\014license_code\030\253\306Y \001(\004H\005\210\001\001\022\024\n\004name\030\213" - + "\365\315\001 \001(\tH\006\210\001\001\022[\n\025resource_requirements\030\241\262" - + "\227f \001(\01324.google.cloud.compute.v1.License" - + "ResourceRequirementsH\007\210\001\001\022\032\n\tself_link\030\215" - + "\222\305\331\001 \001(\tH\010\210\001\001\022\034\n\014transferable\030\305\277\211\002 \001(\010H\t" - + "\210\001\001B\022\n\020_charges_use_feeB\025\n\023_creation_tim" - + "estampB\016\n\014_descriptionB\005\n\003_idB\007\n\005_kindB\017" - + "\n\r_license_codeB\007\n\005_nameB\030\n\026_resource_re" - + "quirementsB\014\n\n_self_linkB\017\n\r_transferabl" - + "e\"\224\004\n\013LicenseCode\022\"\n\022creation_timestamp\030" - + "\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001" - + "\210\001\001\022\020\n\002id\030\233\032 \001(\004H\002\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\003" - + "\210\001\001\022J\n\rlicense_alias\030\322\221\342\024 \003(\01320.google.c" - + "loud.compute.v1.LicenseCodeLicenseAlias\022" - + "\024\n\004name\030\213\365\315\001 \001(\tH\004\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" - + " \001(\tH\005\210\001\001\022\025\n\005state\030\221\211\2534 \001(\tH\006\210\001\001\022\034\n\014tran" - + "sferable\030\305\277\211\002 \001(\010H\007\210\001\001\"\177\n\005State\022\023\n\017UNDEF" - + "INED_STATE\020\000\022\020\n\010DISABLED\020\374\324\260\366\001\022\016\n\007ENABLE" - + "D\020\241\256\354V\022\021\n\nRESTRICTED\020\333\350\333|\022\031\n\021STATE_UNSPE" - + "CIFIED\020\311\320\274\340\001\022\021\n\nTERMINATED\020\243\364\233wB\025\n\023_crea" - + "tion_timestampB\016\n\014_descriptionB\005\n\003_idB\007\n" - + "\005_kindB\007\n\005_nameB\014\n\n_self_linkB\010\n\006_stateB" - + "\017\n\r_transferable\"q\n\027LicenseCodeLicenseAl" - + "ias\022\034\n\013description\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\032\n\tsel" - + "f_link\030\215\222\305\331\001 \001(\tH\001\210\001\001B\016\n\014_descriptionB\014\n" - + "\n_self_link\"\234\001\n\031LicenseResourceCommitmen" - + "t\022\026\n\006amount\030\330\240\351] \001(\003H\000\210\001\001\022!\n\021cores_per_l" - + "icense\030\224\310\276\017 \001(\tH\001\210\001\001\022\027\n\007license\030\301\210\302O \001(\t" - + "H\002\210\001\001B\t\n\007_amountB\024\n\022_cores_per_licenseB\n" - + "\n\010_license\"\215\001\n\033LicenseResourceRequiremen" - + "ts\022$\n\023min_guest_cpu_count\030\244\324\364\343\001 \001(\005H\000\210\001\001" - + "\022\036\n\rmin_memory_mb\030\346\327\331\360\001 \001(\005H\001\210\001\001B\026\n\024_min" - + "_guest_cpu_countB\020\n\016_min_memory_mb\"\211\002\n\024L" - + "icensesListResponse\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0222\n" - + "\005items\030\300\317\367/ \003(\0132 .google.cloud.compute.v" - + "1.License\022\037\n\017next_page_token\030\225\272\206& \001(\tH\001\210" - + "\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\002\210\001\001\0229\n\007warnin" - + "g\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.War" - + "ningH\003\210\001\001B\005\n\003_idB\022\n\020_next_page_tokenB\014\n\n" - + "_self_linkB\n\n\010_warning\"\263\002\n\033ListAccelerat" - + "orTypesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + + "\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud." + + "compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB" + + "\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_wa" + + "rning\"\274\001\n%InterconnectAttachmentPartnerM" + + "etadata\022\"\n\021interconnect_name\030\234\357\306\365\001 \001(\tH\000" + + "\210\001\001\022\034\n\014partner_name\030\242\247\220M \001(\tH\001\210\001\001\022\033\n\npor" + + "tal_url\030\234\316\255\200\001 \001(\tH\002\210\001\001B\024\n\022_interconnect_" + + "nameB\017\n\r_partner_nameB\r\n\013_portal_url\"K\n!" + + "InterconnectAttachmentPrivateInfo\022\031\n\010tag" + + "8021q\030\300\321\316\201\001 \001(\rH\000\210\001\001B\013\n\t_tag8021q\"\301\001\n!In" + + "terconnectAttachmentsScopedList\022U\n\030inter" + + "connect_attachments\030\377\322\353\312\001 \003(\0132/.google.c" + + "loud.compute.v1.InterconnectAttachment\0229" + + "\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comput" + + "e.v1.WarningH\000\210\001\001B\n\n\010_warning\"\305\001\n\027Interc" + + "onnectCircuitInfo\022\"\n\022customer_demarc_id\030" + + "\223\214\334\r \001(\tH\000\210\001\001\022!\n\021google_circuit_id\030\367\215\370| " + + "\001(\tH\001\210\001\001\022!\n\020google_demarc_id\030\256\335\333\325\001 \001(\tH\002" + + "\210\001\001B\025\n\023_customer_demarc_idB\024\n\022_google_ci" + + "rcuit_idB\023\n\021_google_demarc_id\"\225\005\n\027Interc" + + "onnectDiagnostics\022P\n\narp_caches\030\221\326\330\305\001 \003(" + + "\01328.google.cloud.compute.v1.Interconnect" + + "DiagnosticsARPEntry\022(\n\027bundle_aggregatio" + + "n_type\030\224\311\262\317\001 \001(\tH\000\210\001\001\022)\n\031bundle_operatio" + + "nal_status\030\334\227\3402 \001(\tH\001\210\001\001\022L\n\005links\030\271\237\2151 \003" + + "(\0132:.google.cloud.compute.v1.Interconnec" + + "tDiagnosticsLinkStatus\022\034\n\013mac_address\030\204\322" + + "\310\236\001 \001(\tH\002\210\001\001\"\212\001\n\025BundleAggregationType\022%" + + "\n!UNDEFINED_BUNDLE_AGGREGATION_TYPE\020\000\022#\n" + + "\034BUNDLE_AGGREGATION_TYPE_LACP\020\315\242\236\r\022%\n\036BU" + + "NDLE_AGGREGATION_TYPE_STATIC\020\331\230\225\030\"\217\001\n\027Bu" + + "ndleOperationalStatus\022\'\n#UNDEFINED_BUNDL" + + "E_OPERATIONAL_STATUS\020\000\022&\n\036BUNDLE_OPERATI" + + "ONAL_STATUS_DOWN\020\205\256\264\330\001\022#\n\034BUNDLE_OPERATI" + + "ONAL_STATUS_UP\020\276\203\371LB\032\n\030_bundle_aggregati" + + "on_typeB\034\n\032_bundle_operational_statusB\016\n" + + "\014_mac_address\"{\n\037InterconnectDiagnostics" + + "ARPEntry\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH\000\210\001\001\022\034\n" + + "\013mac_address\030\204\322\310\236\001 \001(\tH\001\210\001\001B\r\n\013_ip_addre" + + "ssB\016\n\014_mac_address\"\372\001\n%InterconnectDiagn" + + "osticsLinkLACPStatus\022 \n\020google_system_id" + + "\030\245\205\277+ \001(\tH\000\210\001\001\022#\n\022neighbor_system_id\030\236\230\371" + + "\243\001 \001(\tH\001\210\001\001\022\025\n\005state\030\221\211\2534 \001(\tH\002\210\001\001\"=\n\005St" + + "ate\022\023\n\017UNDEFINED_STATE\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001" + + "\022\017\n\010DETACHED\020\362\366\241gB\023\n\021_google_system_idB\025" + + "\n\023_neighbor_system_idB\010\n\006_state\"\343\001\n\'Inte" + + "rconnectDiagnosticsLinkOpticalPower\022\025\n\005s" + + "tate\030\221\211\2534 \001(\tH\000\210\001\001\022\025\n\005value\030\361\242\2625 \001(\002H\001\210\001" + + "\001\"v\n\005State\022\023\n\017UNDEFINED_STATE\020\000\022\022\n\nHIGH_" + + "ALARM\020\324\362\315\221\001\022\023\n\014HIGH_WARNING\020\337\353\257i\022\021\n\tLOW_" + + "ALARM\020\346\252\377\226\001\022\023\n\013LOW_WARNING\020\361\252\306\241\001\022\007\n\002OK\020\334" + + "\023B\010\n\006_stateB\010\n\006_value\"\217\006\n!InterconnectDi" + + "agnosticsLinkStatus\022P\n\narp_caches\030\221\326\330\305\001 " + + "\003(\01328.google.cloud.compute.v1.Interconne" + + "ctDiagnosticsARPEntry\022\032\n\ncircuit_id\030\261\372\257k" + + " \001(\tH\000\210\001\001\022\034\n\rgoogle_demarc\030\214\217\003 \001(\tH\001\210\001\001\022" + + "\\\n\013lacp_status\030\257\304\236\254\001 \001(\0132>.google.cloud." + + "compute.v1.InterconnectDiagnosticsLinkLA" + + "CPStatusH\002\210\001\001\022\"\n\022operational_status\030\377\261\360_" + + " \001(\tH\003\210\001\001\022i\n\027receiving_optical_power\030\337\255\330" + + "t \001(\0132@.google.cloud.compute.v1.Intercon" + + "nectDiagnosticsLinkOpticalPowerH\004\210\001\001\022m\n\032" + + "transmitting_optical_power\030\235\272\211\333\001 \001(\0132@.g" + + "oogle.cloud.compute.v1.InterconnectDiagn" + + "osticsLinkOpticalPowerH\005\210\001\001\"\177\n\021Operation" + + "alStatus\022 \n\034UNDEFINED_OPERATIONAL_STATUS" + + "\020\000\022$\n\034LINK_OPERATIONAL_STATUS_DOWN\020\375\344\246\206\001" + + "\022\"\n\032LINK_OPERATIONAL_STATUS_UP\020\266\266\355\221\001B\r\n\013" + + "_circuit_idB\020\n\016_google_demarcB\016\n\014_lacp_s" + + "tatusB\025\n\023_operational_statusB\032\n\030_receivi" + + "ng_optical_powerB\035\n\033_transmitting_optica" + + "l_power\"\251\002\n\020InterconnectList\022\020\n\002id\030\233\032 \001(" + + "\tH\000\210\001\001\0227\n\005items\030\300\317\367/ \003(\0132%.google.cloud." + + "compute.v1.Interconnect\022\024\n\004kind\030\224\367\310\001 \001(\t" + + "H\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032" + + "\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337" + + "\226\030 \001(\0132 .google.cloud.compute.v1.Warning" + + "H\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_toke" + + "nB\014\n\n_self_linkB\n\n\010_warning\"\311\010\n\024Intercon" + + "nectLocation\022\030\n\007address\030\364\267\336\334\001 \001(\tH\000\210\001\001\022!" + + "\n\021availability_zone\030\220\320\307K \001(\tH\001\210\001\001\022\024\n\004cit" + + "y\030\353\262\272\001 \001(\tH\002\210\001\001\022\031\n\tcontinent\030\264\333\320? \001(\tH\003\210" + + "\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\004\210\001\001\022\034" + + "\n\013description\030\374\207\326\311\001 \001(\tH\005\210\001\001\022\"\n\021facility" + + "_provider\030\215\240\246\376\001 \001(\tH\006\210\001\001\022-\n\035facility_pro" + + "vider_facility_id\030\205\276\316) \001(\tH\007\210\001\001\022\020\n\002id\030\233\032" + + " \001(\004H\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\t\210\001\001\022\024\n\004name\030" + + "\213\365\315\001 \001(\tH\n\210\001\001\022&\n\025peeringdb_facility_id\030\266" + + "\272\355\377\001 \001(\tH\013\210\001\001\022Q\n\014region_infos\030\372\350\356\224\001 \003(\0132" + + "7.google.cloud.compute.v1.InterconnectLo" + + "cationRegionInfo\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH" + + "\014\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\r\210\001\001\022\034\n\014supports" + + "_pzs\030\356\366\205( \001(\010H\016\210\001\001\"\352\001\n\tContinent\022\027\n\023UNDE" + + "FINED_CONTINENT\020\000\022\016\n\006AFRICA\020\372\234\257\227\001\022\017\n\010ASI" + + "A_PAC\020\375\366\2169\022\017\n\010C_AFRICA\020\366\223\252\"\022\022\n\nC_ASIA_PA" + + "C\020\371\217\206\336\001\022\017\n\010C_EUROPE\020\236\312\305_\022\027\n\017C_NORTH_AMER" + + "ICA\020\230\233\273\203\001\022\027\n\017C_SOUTH_AMERICA\020\340\214\260\275\001\022\016\n\006EU" + + "ROPE\020\242\323\312\324\001\022\025\n\rNORTH_AMERICA\020\224\331\320\325\001\022\024\n\rSOU" + + "TH_AMERICA\020\334\312\305\017\"A\n\006Status\022\024\n\020UNDEFINED_S" + + "TATUS\020\000\022\021\n\tAVAILABLE\020\251\265\346\322\001\022\016\n\006CLOSED\020\354\252\243" + + "\265\001B\n\n\010_addressB\024\n\022_availability_zoneB\007\n\005" + + "_cityB\014\n\n_continentB\025\n\023_creation_timesta" + + "mpB\016\n\014_descriptionB\024\n\022_facility_provider" + + "B \n\036_facility_provider_facility_idB\005\n\003_i" + + "dB\007\n\005_kindB\007\n\005_nameB\030\n\026_peeringdb_facili" + + "ty_idB\014\n\n_self_linkB\t\n\007_statusB\017\n\r_suppo" + + "rts_pzs\"\271\002\n\030InterconnectLocationList\022\020\n\002" + + "id\030\233\032 \001(\tH\000\210\001\001\022?\n\005items\030\300\317\367/ \003(\0132-.googl" + + "e.cloud.compute.v1.InterconnectLocation\022" + + "\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token" + + "\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210" + + "\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.co" + + "mpute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n" + + "\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_warn" + + "ing\"\272\002\n\036InterconnectLocationRegionInfo\022 " + + "\n\017expected_rtt_ms\030\372\203\276\311\001 \001(\003H\000\210\001\001\022!\n\021loca" + + "tion_presence\030\305\224\2640 \001(\tH\001\210\001\001\022\026\n\006region\030\364\315" + + "\240B \001(\tH\002\210\001\001\"\205\001\n\020LocationPresence\022\037\n\033UNDE" + + "FINED_LOCATION_PRESENCE\020\000\022\016\n\006GLOBAL\020\243\357\357\353" + + "\001\022\024\n\014LOCAL_REGION\020\350\354\265\300\001\022\021\n\tLP_GLOBAL\020\276\335\353" + + "\314\001\022\027\n\017LP_LOCAL_REGION\020\303\332\375\350\001B\022\n\020_expected" + + "_rtt_msB\024\n\022_location_presenceB\t\n\007_region" + + "\"\205\005\n\036InterconnectOutageNotification\022\034\n\021a" + + "ffected_circuits\030\225\376\336T \003(\t\022\034\n\013description" + + "\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\030\n\010end_time\030\261\247\3476 \001(\003H\001\210\001" + + "\001\022\033\n\nissue_type\030\340\375\240\260\001 \001(\tH\002\210\001\001\022\024\n\004name\030\213" + + "\365\315\001 \001(\tH\003\210\001\001\022\026\n\006source\030\233\320\301T \001(\tH\004\210\001\001\022\032\n\n" + + "start_time\030\212\351\356\021 \001(\003H\005\210\001\001\022\025\n\005state\030\221\211\2534 \001" + + "(\tH\006\210\001\001\"w\n\tIssueType\022\030\n\024UNDEFINED_ISSUE_" + + "TYPE\020\000\022\020\n\tIT_OUTAGE\020\205\341\350S\022\030\n\021IT_PARTIAL_O" + + "UTAGE\020\243\312\365+\022\r\n\006OUTAGE\020\361\245\217]\022\025\n\016PARTIAL_OUT" + + "AGE\020\217\267\217F\"C\n\006Source\022\024\n\020UNDEFINED_SOURCE\020\000" + + "\022\016\n\006GOOGLE\020\271\244\231\355\001\022\023\n\013NSRC_GOOGLE\020\342\377\272\363\001\"x\n" + + "\005State\022\023\n\017UNDEFINED_STATE\020\000\022\016\n\006ACTIVE\020\206\346" + + "\211\226\001\022\020\n\tCANCELLED\020\261\362\200\024\022\021\n\tCOMPLETED\020\253\214\344\223\001" + + "\022\020\n\tNS_ACTIVE\020\300\235\267x\022\023\n\013NS_CANCELED\020\323\223\307\361\001B" + + "\016\n\014_descriptionB\013\n\t_end_timeB\r\n\013_issue_t" + + "ypeB\007\n\005_nameB\t\n\007_sourceB\r\n\013_start_timeB\010" + + "\n\006_state\"z\n#InterconnectsGetDiagnosticsR" + + "esponse\022H\n\006result\030\235\220\267B \001(\01320.google.clou" + + "d.compute.v1.InterconnectDiagnosticsH\000\210\001" + + "\001B\t\n\007_result\"\351\001\n\034InvalidateCacheUrlMapRe" + + "quest\022a\n cache_invalidation_rule_resourc" + + "e\030\255\303\223\225\001 \001(\0132..google.cloud.compute.v1.Ca" + + "cheInvalidationRuleB\003\340A\002\022!\n\007project\030\231\226\301l" + + " \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001" + + "(\tH\000\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB\003\340A\002B\r\n\013_re" + + "quest_id\"D\n\005Items\022\022\n\003key\030\337\274\006 \001(\tH\000\210\001\001\022\025\n" + + "\005value\030\361\242\2625 \001(\tH\001\210\001\001B\006\n\004_keyB\010\n\006_value\"\375" + + "\003\n\007License\022 \n\017charges_use_fee\030\316\241\312\261\001 \001(\010H" + + "\000\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001" + + "\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 " + + "\001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\033\n\014licens" + + "e_code\030\253\306Y \001(\004H\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001" + + "\001\022[\n\025resource_requirements\030\241\262\227f \001(\01324.go" + + "ogle.cloud.compute.v1.LicenseResourceReq" + + "uirementsH\007\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\010\210" + + "\001\001\022\034\n\014transferable\030\305\277\211\002 \001(\010H\t\210\001\001B\022\n\020_cha" + + "rges_use_feeB\025\n\023_creation_timestampB\016\n\014_" + + "descriptionB\005\n\003_idB\007\n\005_kindB\017\n\r_license_" + + "codeB\007\n\005_nameB\030\n\026_resource_requirementsB" + + "\014\n\n_self_linkB\017\n\r_transferable\"\224\004\n\013Licen" + + "seCode\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\000\210" + + "\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\020\n\002id\030\233" + + "\032 \001(\004H\002\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\003\210\001\001\022J\n\rlice" + + "nse_alias\030\322\221\342\024 \003(\01320.google.cloud.comput" + + "e.v1.LicenseCodeLicenseAlias\022\024\n\004name\030\213\365\315" + + "\001 \001(\tH\004\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\005\210\001\001\022\025" + + "\n\005state\030\221\211\2534 \001(\tH\006\210\001\001\022\034\n\014transferable\030\305\277" + + "\211\002 \001(\010H\007\210\001\001\"\177\n\005State\022\023\n\017UNDEFINED_STATE\020" + + "\000\022\020\n\010DISABLED\020\374\324\260\366\001\022\016\n\007ENABLED\020\241\256\354V\022\021\n\nR" + + "ESTRICTED\020\333\350\333|\022\031\n\021STATE_UNSPECIFIED\020\311\320\274\340" + + "\001\022\021\n\nTERMINATED\020\243\364\233wB\025\n\023_creation_timest" + + "ampB\016\n\014_descriptionB\005\n\003_idB\007\n\005_kindB\007\n\005_" + + "nameB\014\n\n_self_linkB\010\n\006_stateB\017\n\r_transfe" + + "rable\"q\n\027LicenseCodeLicenseAlias\022\034\n\013desc" + + "ription\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\032\n\tself_link\030\215\222\305\331" + + "\001 \001(\tH\001\210\001\001B\016\n\014_descriptionB\014\n\n_self_link" + + "\"\234\001\n\031LicenseResourceCommitment\022\026\n\006amount" + + "\030\330\240\351] \001(\003H\000\210\001\001\022!\n\021cores_per_license\030\224\310\276\017" + + " \001(\tH\001\210\001\001\022\027\n\007license\030\301\210\302O \001(\tH\002\210\001\001B\t\n\007_a" + + "mountB\024\n\022_cores_per_licenseB\n\n\010_license\"" + + "\215\001\n\033LicenseResourceRequirements\022$\n\023min_g" + + "uest_cpu_count\030\244\324\364\343\001 \001(\005H\000\210\001\001\022\036\n\rmin_mem" + + "ory_mb\030\346\327\331\360\001 \001(\005H\001\210\001\001B\026\n\024_min_guest_cpu_" + + "countB\020\n\016_min_memory_mb\"\211\002\n\024LicensesList" + + "Response\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0222\n\005items\030\300\317\367/" + + " \003(\0132 .google.cloud.compute.v1.License\022\037" + + "\n\017next_page_token\030\225\272\206& \001(\tH\001\210\001\001\022\032\n\tself_" + + "link\030\215\222\305\331\001 \001(\tH\002\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132" + + " .google.cloud.compute.v1.WarningH\003\210\001\001B\005" + + "\n\003_idB\022\n\020_next_page_tokenB\014\n\n_self_linkB" + + "\n\n\010_warning\"\263\002\n\033ListAcceleratorTypesRequ" + + "est\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resu" + + "lts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002" + + "\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proje" + + "ct\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succe" + + "ss\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B" + + "\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB" + + "\r\n\013_page_tokenB\031\n\027_return_partial_succes" + + "s\"\256\002\n\024ListAddressesRequest\022\027\n\006filter\030\370\226\243" + + "\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001" + + "\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token" + + "\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022" + + "\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partia" + + "l_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_" + + "max_resultsB\013\n\t_order_byB\r\n\013_page_tokenB" + + "\031\n\027_return_partial_success\"]\n%ListAssoci" + + "ationsFirewallPolicyRequest\022 \n\017target_re" + + "source\030\374\355\352\336\001 \001(\tH\000\210\001\001B\022\n\020_target_resourc" + + "e\"\256\002\n\026ListAutoscalersRequest\022\027\n\006filter\030\370" + + "\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210" + + "\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_tok" + + "en\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A" + + "\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210" + + "\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_" + + "max_resultsB\013\n\t_order_byB\r\n\013_page_tokenB" + + "\031\n\027_return_partial_success\"\307\002\n-ListAvail" + + "ableFeaturesRegionSslPoliciesRequest\022\027\n\006" + + "filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213" + + "\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\n" + + "page_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l", + " \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026ret" + + "urn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_f" + + "ilterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_p" + + "age_tokenB\031\n\027_return_partial_success\"\251\002\n" + + "\'ListAvailableFeaturesSslPoliciesRequest" + + "\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results" + + "\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001" + + "\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030" + + "\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_success\030" + + "\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_result" + + "sB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return" + + "_partial_success\"\233\002\n\031ListBackendBucketsR" + + "equest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_r" + + "esults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(" + + "\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007pr" + + "oject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_su" + + "ccess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_" + + "resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_" + + "return_partial_success\"\234\002\n\032ListBackendSe" + + "rvicesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033" + + "\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030" + + "\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001" + + "\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_par" + + "tial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016" + + "\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_tok" + + "enB\031\n\027_return_partial_success\"\254\002\n\024ListDi" + + "skTypesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + "\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by" + "\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210" + "\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_pa" + "rtial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344" + "\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n" + "\t_order_byB\r\n\013_page_tokenB\031\n\027_return_par" - + "tial_success\"\256\002\n\024ListAddressesRequest\022\027\n" - + "\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310" - + "\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n" - + "\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301" - + "l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026re" - + "turn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_" - + "filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_" - + "page_tokenB\031\n\027_return_partial_success\"]\n" - + "%ListAssociationsFirewallPolicyRequest\022 " - + "\n\017target_resource\030\374\355\352\336\001 \001(\tH\000\210\001\001B\022\n\020_tar" - + "get_resource\"\256\002\n\026ListAutoscalersRequest\022" - + "\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030" - + "\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022" - + "\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231" - + "\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266" - + "\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_" - + "filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_" - + "page_tokenB\031\n\027_return_partial_success\"\307\002" - + "\n-ListAvailableFeaturesRegionSslPolicies" - + "Request\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_" - + "results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001" - + "(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007p" - + "roject\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB", - "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" - + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" - + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" - + "success\"\251\002\n\'ListAvailableFeaturesSslPoli" - + "ciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013" - + "max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375" - + "\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022" - + "\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_parti" - + "al_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014" - + "_max_resultsB\013\n\t_order_byB\r\n\013_page_token" - + "B\031\n\027_return_partial_success\"\233\002\n\031ListBack" - + "endBucketsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210" - + "\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order" - + "_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\t" - + "H\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return" - + "_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filt" - + "erB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page" - + "_tokenB\031\n\027_return_partial_success\"\234\002\n\032Li" - + "stBackendServicesRequest\022\027\n\006filter\030\370\226\243\240\001" - + " \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030" - + "\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311" - + "\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n" - + "\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t" - + "\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r" - + "\n\013_page_tokenB\031\n\027_return_partial_success" - + "\"\254\002\n\024ListDiskTypesRequest\022\027\n\006filter\030\370\226\243\240" - + "\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022" - + "\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030" - + "\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'" - + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022" - + "\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max" - + "_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027" - + "_return_partial_success\"\250\002\n\020ListDisksReq" - + "uest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_res" - + "ults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH" - + "\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proj" - + "ect\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succ" - + "ess\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002" - + "B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_by" - + "B\r\n\013_page_tokenB\031\n\027_return_partial_succe" - + "ss\"\346\002\n&ListErrorsInstanceGroupManagersRe" - + "quest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n\026instan" - + "ce_group_manager\030\303\367\363v \001(\tB\003\340A\002\022\033\n\013max_re" - + "sults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\t" - + "H\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007pro" - + "ject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_suc" - + "cess\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A" - + "\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_b" - + "yB\r\n\013_page_tokenB\031\n\027_return_partial_succ" - + "ess\"\356\002\n,ListErrorsRegionInstanceGroupMan" - + "agersRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n" - + "\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022\033\n" - + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" - + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" - + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B" + + "tial_success\"\250\002\n\020ListDisksRequest\022\027\n\006fil" + + "ter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001" + + "(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npag" + + "e_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(" + + "\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001" + + "(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filter" + + "B\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_t" + + "okenB\031\n\027_return_partial_success\"\346\002\n&List" + + "ErrorsInstanceGroupManagersRequest\022\027\n\006fi" + + "lter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n\026instance_group_ma" + + "nager\030\303\367\363v \001(\tB\003\340A\002\022\033\n\013max_results\030\233\310\213\032 " + + "\001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npa" + + "ge_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001" + + "(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 " + + "\001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filte" + + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" + + "tokenB\031\n\027_return_partial_success\"\356\002\n,Lis" + + "tErrorsRegionInstanceGroupManagersReques" + + "t\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n\026instance_g" + + "roup_manager\030\303\367\363v \001(\tB\003\340A\002\022\033\n\013max_result" + + "s\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001" + + "\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project" + + "\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'" + + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B" + + "\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB" + + "\r\n\013_page_tokenB\031\n\027_return_partial_succes" + + "s\"\240\002\n\036ListExternalVpnGatewaysRequest\022\027\n\006" + + "filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213" + + "\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\n" + + "page_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l" + " \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366" + "\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n" + "\t_order_byB\r\n\013_page_tokenB\031\n\027_return_par" - + "tial_success\"\240\002\n\036ListExternalVpnGateways" - + "Request\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_" - + "results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001" - + "(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007p" - + "roject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_s" - + "uccess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max" - + "_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027" - + "_return_partial_success\"\256\002\n\033ListFirewall" - + "PoliciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001" - + "\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_b" - + "y\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003" - + "\210\001\001\022\032\n\tparent_id\030\320\341\232\333\001 \001(\tH\004\210\001\001\022\'\n\026retur" - + "n_partial_success\030\266\244\317\366\001 \001(\010H\005\210\001\001B\t\n\007_fil" - + "terB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_pag" - + "e_tokenB\014\n\n_parent_idB\031\n\027_return_partial" - + "_success\"\226\002\n\024ListFirewallsRequest\022\027\n\006fil" + + "tial_success\"\256\002\n\033ListFirewallPoliciesReq" + + "uest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_res" + + "ults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH" + + "\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\032\n\tpare" + + "nt_id\030\320\341\232\333\001 \001(\tH\004\210\001\001\022\'\n\026return_partial_s" + + "uccess\030\266\244\317\366\001 \001(\010H\005\210\001\001B\t\n\007_filterB\016\n\014_max" + + "_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\014\n\n" + + "_parent_idB\031\n\027_return_partial_success\"\226\002" + + "\n\024ListFirewallsRequest\022\027\n\006filter\030\370\226\243\240\001 \001" + + "(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010" + + "order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304" + + "\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026r" + + "eturn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007" + + "_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013" + + "_page_tokenB\031\n\027_return_partial_success\"\264" + + "\002\n\032ListForwardingRulesRequest\022\027\n\006filter\030" + + "\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001" + + "\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_to" + + "ken\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340" + + "A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_par" + + "tial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016" + + "\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_tok" + + "enB\031\n\027_return_partial_success\"\234\002\n\032ListGl" + + "obalAddressesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" + + "H\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010or" + + "der_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t " + + "\001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026ret" + + "urn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_f" + + "ilterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_p" + + "age_tokenB\031\n\027_return_partial_success\"\242\002\n" + + " ListGlobalForwardingRulesRequest\022\027\n\006fil" + "ter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001" + "(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npag" + "e_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(" + "\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001" + "(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_o" + "rder_byB\r\n\013_page_tokenB\031\n\027_return_partia" - + "l_success\"\264\002\n\032ListForwardingRulesRequest" + + "l_success\"\250\002\n&ListGlobalNetworkEndpointG" + + "roupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n" + + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" + + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" + + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_part" + + "ial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n" + + "\014_max_resultsB\013\n\t_order_byB\r\n\013_page_toke" + + "nB\031\n\027_return_partial_success\"\235\002\n\033ListGlo" + + "balOperationsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" + + "H\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010or" + + "der_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t " + + "\001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026ret" + + "urn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_f" + + "ilterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_p" + + "age_tokenB\031\n\027_return_partial_success\"\272\002\n" + + "\'ListGlobalOrganizationOperationsRequest" + + "\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results" + + "\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001" + + "\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\032\n\tparent_i" + + "d\030\320\341\232\333\001 \001(\tH\004\210\001\001\022\'\n\026return_partial_succe" + + "ss\030\266\244\317\366\001 \001(\010H\005\210\001\001B\t\n\007_filterB\016\n\014_max_res" + + "ultsB\013\n\t_order_byB\r\n\013_page_tokenB\014\n\n_par" + + "ent_idB\031\n\027_return_partial_success\"\252\002\n(Li" + + "stGlobalPublicDelegatedPrefixesRequest\022\027" + + "\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233" + + "\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032" + + "\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226" + + "\301l \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244" + + "\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB" + + "\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_p" + + "artial_success\"\231\002\n\027ListHealthChecksReque" + + "st\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resul" + + "ts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210" + + "\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007projec" + + "t\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succes" + + "s\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resu" + + "ltsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_retu" + + "rn_partial_success\"\223\002\n\021ListImagesRequest" + "\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results" + "\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001" + "\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030" - + "\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n" - + "\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t" - + "\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r" - + "\n\013_page_tokenB\031\n\027_return_partial_success" - + "\"\234\002\n\032ListGlobalAddressesRequest\022\027\n\006filte" - + "r\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\r" - + "H\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_" - + "token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB" - + "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" - + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" - + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" - + "success\"\242\002\n ListGlobalForwardingRulesReq" - + "uest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_res" - + "ults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH" - + "\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proj" - + "ect\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succ" - + "ess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_re" - + "sultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_re" - + "turn_partial_success\"\250\002\n&ListGlobalNetwo" - + "rkEndpointGroupsRequest\022\027\n\006filter\030\370\226\243\240\001 " - + "\001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n" - + "\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260" - + "\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026" - + "return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n" - + "\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n" - + "\013_page_tokenB\031\n\027_return_partial_success\"" - + "\235\002\n\033ListGlobalOperationsRequest\022\027\n\006filte" - + "r\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\r" - + "H\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_" - + "token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB" - + "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" - + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" - + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" - + "success\"\272\002\n\'ListGlobalOrganizationOperat" - + "ionsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013" - + "max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375" - + "\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022" - + "\032\n\tparent_id\030\320\341\232\333\001 \001(\tH\004\210\001\001\022\'\n\026return_pa" - + "rtial_success\030\266\244\317\366\001 \001(\010H\005\210\001\001B\t\n\007_filterB" - + "\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_to" - + "kenB\014\n\n_parent_idB\031\n\027_return_partial_suc" - + "cess\"\252\002\n(ListGlobalPublicDelegatedPrefix" - + "esRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013ma" - + "x_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L" - + " \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n" - + "\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial" - + "_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_m" - + "ax_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031" - + "\n\027_return_partial_success\"\231\002\n\027ListHealth" - + "ChecksRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033" + + "\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_success\030" + + "\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_result" + + "sB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return" + + "_partial_success\"\270\002\n ListInstanceGroupMa" + + "nagersRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033" + "\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030" + "\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001" + "\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_par" - + "tial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016" - + "\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_tok" - + "enB\031\n\027_return_partial_success\"\223\002\n\021ListIm" - + "agesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013" - + "max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375" - + "\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022" - + "\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_parti" - + "al_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014" - + "_max_resultsB\013\n\t_order_byB\r\n\013_page_token" - + "B\031\n\027_return_partial_success\"\270\002\n ListInst" - + "anceGroupManagersRequest\022\027\n\006filter\030\370\226\243\240\001" - + " \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030" - + "\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311" - + "\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n" - + "\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024" - + "\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_" - + "resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_" - + "return_partial_success\"\261\002\n\031ListInstanceG" - + "roupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n" - + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" - + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" - + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_part" - + "ial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 " - + "\001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_" - + "order_byB\r\n\013_page_tokenB\031\n\027_return_parti" - + "al_success\"\236\002\n\034ListInstanceTemplatesRequ" + + "tial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001" + + " \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t" + + "_order_byB\r\n\013_page_tokenB\031\n\027_return_part" + + "ial_success\"\261\002\n\031ListInstanceGroupsReques" + + "t\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_result" + + "s\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001" + + "\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project" + + "\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_success" + + "\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n" + + "\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n" + + "\013_page_tokenB\031\n\027_return_partial_success\"" + + "\236\002\n\034ListInstanceTemplatesRequest\022\027\n\006filt" + + "er\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(" + + "\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage" + + "_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\t" + + "B\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(" + + "\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_or" + + "der_byB\r\n\013_page_tokenB\031\n\027_return_partial" + + "_success\"\331\003\n\"ListInstancesInstanceGroups" + + "Request\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\036\n\016inst" + + "ance_group\030\325\324\325& \001(\tB\003\340A\002\022}\n/instance_gro" + + "ups_list_instances_request_resource\030\237\250\214\343" + + "\001 \001(\0132;.google.cloud.compute.v1.Instance" + + "GroupsListInstancesRequestB\003\340A\002\022\033\n\013max_r" + + "esults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(" + + "\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007pr" + + "oject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_su" + + "ccess\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340" + + "A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_" + + "byB\r\n\013_page_tokenB\031\n\027_return_partial_suc" + + "cess\"\356\003\n(ListInstancesRegionInstanceGrou" + + "psRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\036\n\016in" + + "stance_group\030\325\324\325& \001(\tB\003\340A\002\022\033\n\013max_result" + + "s\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001" + + "\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project" + + "\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\211" + + "\001\n6region_instance_groups_list_instances" + + "_request_resource\030\324\251\200\027 \001(\0132A.google.clou" + + "d.compute.v1.RegionInstanceGroupsListIns" + + "tancesRequestB\003\340A\002\022\'\n\026return_partial_suc" + + "cess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_r" + + "esultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_r" + + "eturn_partial_success\"\254\002\n\024ListInstancesR" + + "equest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_r" + + "esults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(" + + "\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007pr" + + "oject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_su" + + "ccess\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340" + + "A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_" + + "byB\r\n\013_page_tokenB\031\n\027_return_partial_suc" + + "cess\"\274\002\n\"ListInterconnectAttachmentsRequ" + "est\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resu" + "lts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002" + "\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proje" - + "ct\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succe" - + "ss\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_res" - + "ultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_ret" - + "urn_partial_success\"\331\003\n\"ListInstancesIns" - + "tanceGroupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000" - + "\210\001\001\022\036\n\016instance_group\030\325\324\325& \001(\tB\003\340A\002\022}\n/i" - + "nstance_groups_list_instances_request_re" - + "source\030\237\250\214\343\001 \001(\0132;.google.cloud.compute." - + "v1.InstanceGroupsListInstancesRequestB\003\340" - + "A\002\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order" - + "_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\t" - + "H\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return" - + "_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030" - + "\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_results" - + "B\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_" - + "partial_success\"\356\003\n(ListInstancesRegionI" - + "nstanceGroupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" - + "H\000\210\001\001\022\036\n\016instance_group\030\325\324\325& \001(\tB\003\340A\002\022\033\n" - + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" - + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" - + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B" - + " \001(\tB\003\340A\002\022\211\001\n6region_instance_groups_lis" - + "t_instances_request_resource\030\324\251\200\027 \001(\0132A." - + "google.cloud.compute.v1.RegionInstanceGr" - + "oupsListInstancesRequestB\003\340A\002\022\'\n\026return_" - + "partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filte" - + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" - + "tokenB\031\n\027_return_partial_success\"\254\002\n\024Lis" - + "tInstancesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210" - + "\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order" - + "_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\t" - + "H\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return" - + "_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030" - + "\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_results" - + "B\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_" - + "partial_success\"\274\002\n\"ListInterconnectAtta" - + "chmentsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + + "ct\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002" + + "\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001" + + "\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_b" + + "yB\r\n\013_page_tokenB\031\n\027_return_partial_succ" + + "ess\"\242\002\n ListInterconnectLocationsRequest" + + "\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results" + + "\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001" + + "\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030" + + "\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_success\030" + + "\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_result" + + "sB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return" + + "_partial_success\"\232\002\n\030ListInterconnectsRe" + + "quest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_re" + + "sults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\t" + + "H\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007pro" + + "ject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_suc" + + "cess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_r" + + "esultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_r" + + "eturn_partial_success\"\225\002\n\023ListLicensesRe" + + "quest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_re" + + "sults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\t" + + "H\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007pro" + + "ject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_suc" + + "cess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_r" + + "esultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_r" + + "eturn_partial_success\"\232\002\n\030ListMachineIma" + + "gesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013m" + + "ax_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307" + + "L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027" + + "\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partia" + + "l_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_" + + "max_resultsB\013\n\t_order_byB\r\n\013_page_tokenB" + + "\031\n\027_return_partial_success\"\257\002\n\027ListMachi" + + "neTypesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + "\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by" + "\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210" - + "\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315" - + "\240B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244" - + "\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB" - + "\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_p" - + "artial_success\"\242\002\n ListInterconnectLocat" - + "ionsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013" - + "max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375" - + "\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022" - + "\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_parti" - + "al_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014" - + "_max_resultsB\013\n\t_order_byB\r\n\013_page_token" - + "B\031\n\027_return_partial_success\"\232\002\n\030ListInte" - + "rconnectsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001" - + "\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_" - + "by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH" - + "\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_" - + "partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filte" - + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" - + "tokenB\031\n\027_return_partial_success\"\225\002\n\023Lis" - + "tLicensesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001" - + "\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_" - + "by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH" - + "\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_" - + "partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filte" - + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" - + "tokenB\031\n\027_return_partial_success\"\232\002\n\030Lis" - + "tMachineImagesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(" - + "\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010o" - + "rder_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t" - + " \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026re" - + "turn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_" - + "filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_" - + "page_tokenB\031\n\027_return_partial_success\"\257\002" - + "\n\027ListMachineTypesRequest\022\027\n\006filter\030\370\226\243\240" - + "\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022" + + "\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_pa" + + "rtial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344" + + "\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n" + + "\t_order_byB\r\n\013_page_tokenB\031\n\027_return_par" + + "tial_success\"\360\002\n0ListManagedInstancesIns" + + "tanceGroupManagersRequest\022\027\n\006filter\030\370\226\243\240" + + "\001 \001(\tH\000\210\001\001\022&\n\026instance_group_manager\030\303\367\363" + + "v \001(\tB\003\340A\002\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022" + "\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030" + "\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'" + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022" + "\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max" + "_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027" - + "_return_partial_success\"\360\002\n0ListManagedI" - + "nstancesInstanceGroupManagersRequest\022\027\n\006" - + "filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n\026instance_group_" - + "manager\030\303\367\363v \001(\tB\003\340A\002\022\033\n\013max_results\030\233\310\213" - + "\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\n" - + "page_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l" - + " \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366" - + "\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_fil" - + "terB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_pag" - + "e_tokenB\031\n\027_return_partial_success\"\370\002\n6L" - + "istManagedInstancesRegionInstanceGroupMa" - + "nagersRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&" - + "\n\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022\033" - + "\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030" - + "\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001" - + "\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240" - + "B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317" - + "\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013" - + "\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_pa" - + "rtial_success\"\267\002\n\035ListNetworkAttachments" - + "Request\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_" - + "results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001" - + "(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007p" - + "roject\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB" - + "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" - + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" - + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" - + "success\"\270\002\n ListNetworkEndpointGroupsReq" - + "uest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_res" - + "ults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH" - + "\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proj" - + "ect\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succ" - + "ess\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002" + + "_return_partial_success\"\370\002\n6ListManagedI" + + "nstancesRegionInstanceGroupManagersReque" + + "st\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n\026instance_" + + "group_manager\030\303\367\363v \001(\tB\003\340A\002\022\033\n\013max_resul" + + "ts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210" + + "\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007projec" + + "t\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022" + + "\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001" + "B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_by" + "B\r\n\013_page_tokenB\031\n\027_return_partial_succe" - + "ss\"\341\002\n6ListNetworkEndpointsGlobalNetwork" - + "EndpointGroupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(" - + "\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\'\n\026n" - + "etwork_endpoint_group\030\206\313\363\316\001 \001(\tB\003\340A\002\022\030\n\010" - + "order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304" - + "\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026r" - + "eturn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007" - + "_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013" - + "_page_tokenB\031\n\027_return_partial_success\"\377" - + "\003\n0ListNetworkEndpointsNetworkEndpointGr" - + "oupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013" - + "max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\'\n\026network_end" - + "point_group\030\206\313\363\316\001 \001(\tB\003\340A\002\022\213\001\n7network_e" - + "ndpoint_groups_list_endpoints_request_re" - + "source\030\216\230\257\034 \001(\0132B.google.cloud.compute.v" - + "1.NetworkEndpointGroupsListEndpointsRequ" - + "estB\003\340A\002\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npa" - + "ge_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001" - + "(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 " - + "\001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filte" - + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" - + "tokenB\031\n\027_return_partial_success\"\244\002\n\"Lis" - + "tNetworkFirewallPoliciesRequest\022\027\n\006filte" - + "r\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\r" - + "H\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_" - + "token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB" - + "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" - + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" - + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" - + "success\"\225\002\n\023ListNetworksRequest\022\027\n\006filte" - + "r\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\r" - + "H\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_" - + "token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB" - + "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" - + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" - + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" - + "success\"\255\002\n\025ListNodeGroupsRequest\022\027\n\006fil" + + "ss\"\267\002\n\035ListNetworkAttachmentsRequest\022\027\n\006" + + "filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213" + + "\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\n" + + "page_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l" + + " \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026ret" + + "urn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_f" + + "ilterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_p" + + "age_tokenB\031\n\027_return_partial_success\"\270\002\n" + + " ListNetworkEndpointGroupsRequest\022\027\n\006fil" + "ter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001" + "(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npag" + "e_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(" - + "\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001" - + "(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filter" - + "B\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_t" - + "okenB\031\n\027_return_partial_success\"\262\002\n\030List" - + "NodeTemplatesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" - + "H\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010or" - + "der_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t " - + "\001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006reg" - + "ion\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_succ" - + "ess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_re" - + "sultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_re" - + "turn_partial_success\"\254\002\n\024ListNodeTypesRe" - + "quest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_re" - + "sults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\t" - + "H\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007pro" - + "ject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_suc" - + "cess\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A" - + "\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_b" - + "yB\r\n\013_page_tokenB\031\n\027_return_partial_succ" - + "ess\"\317\002\n\032ListNodesNodeGroupsRequest\022\027\n\006fi" - + "lter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 " - + "\001(\rH\001\210\001\001\022\033\n\nnode_group\030\202\374\213\340\001 \001(\tB\003\340A\002\022\030\n" - + "\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260" - + "\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026" - + "return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n" - + "\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_r" - + "esultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_r" - + "eturn_partial_success\"\265\002\n\033ListPacketMirr" - + "oringsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033" - + "\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030" - + "\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001" - + "\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240" - + "B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317" - + "\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013" - + "\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_pa" - + "rtial_success\"\200\004\n ListPeeringRoutesNetwo" - + "rksRequest\022\031\n\tdirection\030\377\216\2005 \001(\tH\000\210\001\001\022\027\n" - + "\006filter\030\370\226\243\240\001 \001(\tH\001\210\001\001\022\033\n\013max_results\030\233\310" - + "\213\032 \001(\rH\002\210\001\001\022\027\n\007network\030\256\264\205o \001(\tB\003\340A\002\022\030\n\010" - + "order_by\030\350\375\307L \001(\tH\003\210\001\001\022\032\n\npage_token\030\311\260\304" - + "\t \001(\tH\004\210\001\001\022\034\n\014peering_name\030\252\320\200w \001(\tH\005\210\001\001" - + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B" - + " \001(\tH\006\210\001\001\022\'\n\026return_partial_success\030\266\244\317\366" - + "\001 \001(\010H\007\210\001\001\"H\n\tDirection\022\027\n\023UNDEFINED_DIR" - + "ECTION\020\000\022\020\n\010INCOMING\020\246\320\267\241\001\022\020\n\010OUTGOING\020\354" - + "\306\314\222\001B\014\n\n_directionB\t\n\007_filterB\016\n\014_max_re" - + "sultsB\013\n\t_order_byB\r\n\013_page_tokenB\017\n\r_pe" - + "ering_nameB\t\n\007_regionB\031\n\027_return_partial" - + "_success\"\362\002\n2ListPerInstanceConfigsInsta" - + "nceGroupManagersRequest\022\027\n\006filter\030\370\226\243\240\001 " - + "\001(\tH\000\210\001\001\022&\n\026instance_group_manager\030\303\367\363v " - + "\001(\tB\003\340A\002\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n" + + "\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001" + + "(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filter" + + "B\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_t" + + "okenB\031\n\027_return_partial_success\"\341\002\n6List" + + "NetworkEndpointsGlobalNetworkEndpointGro" + + "upsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013m" + + "ax_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\'\n\026network_endp" + + "oint_group\030\206\313\363\316\001 \001(\tB\003\340A\002\022\030\n\010order_by\030\350\375" + + "\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022" + + "\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_parti" + + "al_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014" + + "_max_resultsB\013\n\t_order_byB\r\n\013_page_token" + + "B\031\n\027_return_partial_success\"\377\003\n0ListNetw" + + "orkEndpointsNetworkEndpointGroupsRequest" + + "\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results" + + "\030\233\310\213\032 \001(\rH\001\210\001\001\022\'\n\026network_endpoint_group" + + "\030\206\313\363\316\001 \001(\tB\003\340A\002\022\213\001\n7network_endpoint_gro" + + "ups_list_endpoints_request_resource\030\216\230\257\034" + + " \001(\0132B.google.cloud.compute.v1.NetworkEn" + + "dpointGroupsListEndpointsRequestB\003\340A\002\022\030\n" + "\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260" + "\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026" + "return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n" + "\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_r" + "esultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_r" - + "eturn_partial_success\"\372\002\n8ListPerInstanc" - + "eConfigsRegionInstanceGroupManagersReque" - + "st\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n\026instance_" - + "group_manager\030\303\367\363v \001(\tB\003\340A\002\022\033\n\013max_resul" + + "eturn_partial_success\"\244\002\n\"ListNetworkFir" + + "ewallPoliciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" + + "H\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010or" + + "der_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t " + + "\001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026ret" + + "urn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_f" + + "ilterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_p" + + "age_tokenB\031\n\027_return_partial_success\"\225\002\n" + + "\023ListNetworksRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" + + "H\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010or" + + "der_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t " + + "\001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026ret" + + "urn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_f" + + "ilterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_p" + + "age_tokenB\031\n\027_return_partial_success\"\255\002\n" + + "\025ListNodeGroupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001" + + "(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010" + + "order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304" + + "\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026r" + + "eturn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004" + + "zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_re" + + "sultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_re" + + "turn_partial_success\"\262\002\n\030ListNodeTemplat" + + "esRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013ma" + + "x_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L" + + " \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n" + + "\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(" + + "\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001" + + "(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_o" + + "rder_byB\r\n\013_page_tokenB\031\n\027_return_partia" + + "l_success\"\254\002\n\024ListNodeTypesRequest\022\027\n\006fi" + + "lter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 " + + "\001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npa" + + "ge_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001" + + "(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 " + + "\001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filte" + + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" + + "tokenB\031\n\027_return_partial_success\"\317\002\n\032Lis" + + "tNodesNodeGroupsRequest\022\027\n\006filter\030\370\226\243\240\001 " + + "\001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\033\n" + + "\nnode_group\030\202\374\213\340\001 \001(\tB\003\340A\002\022\030\n\010order_by\030\350" + + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" + + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_part" + + "ial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 " + + "\001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_" + + "order_byB\r\n\013_page_tokenB\031\n\027_return_parti" + + "al_success\"\265\002\n\033ListPacketMirroringsReque" + + "st\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resul" + "ts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210" + "\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007projec" + "t\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022" + "\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001" + "B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_by" + "B\r\n\013_page_tokenB\031\n\027_return_partial_succe" - + "ss\"\270\002\n6ListPreconfiguredExpressionSetsSe" - + "curityPoliciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(" - + "\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010o" + + "ss\"\200\004\n ListPeeringRoutesNetworksRequest\022" + + "\031\n\tdirection\030\377\216\2005 \001(\tH\000\210\001\001\022\027\n\006filter\030\370\226\243" + + "\240\001 \001(\tH\001\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\002\210\001\001" + + "\022\027\n\007network\030\256\264\205o \001(\tB\003\340A\002\022\030\n\010order_by\030\350\375" + + "\307L \001(\tH\003\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\004\210\001\001\022" + + "\034\n\014peering_name\030\252\320\200w \001(\tH\005\210\001\001\022\027\n\007project" + + "\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tH\006\210\001\001\022\'" + + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\007\210\001\001\"" + + "H\n\tDirection\022\027\n\023UNDEFINED_DIRECTION\020\000\022\020\n" + + "\010INCOMING\020\246\320\267\241\001\022\020\n\010OUTGOING\020\354\306\314\222\001B\014\n\n_di" + + "rectionB\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_o" + + "rder_byB\r\n\013_page_tokenB\017\n\r_peering_nameB" + + "\t\n\007_regionB\031\n\027_return_partial_success\"\362\002" + + "\n2ListPerInstanceConfigsInstanceGroupMan" + + "agersRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n" + + "\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022\033\n" + + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" + + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" + + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_part" + + "ial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 " + + "\001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_" + + "order_byB\r\n\013_page_tokenB\031\n\027_return_parti" + + "al_success\"\372\002\n8ListPerInstanceConfigsReg" + + "ionInstanceGroupManagersRequest\022\027\n\006filte" + + "r\030\370\226\243\240\001 \001(\tH\000\210\001\001\022&\n\026instance_group_manag" + + "er\030\303\367\363v \001(\tB\003\340A\002\022\033\n\013max_results\030\233\310\213\032 \001(\r" + + "H\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_" + + "token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB" + + "\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_p" + + "artial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filter" + + "B\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_t" + + "okenB\031\n\027_return_partial_success\"\270\002\n6List" + + "PreconfiguredExpressionSetsSecurityPolic" + + "iesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013m" + + "ax_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307" + + "L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027" + + "\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partia" + + "l_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_" + + "max_resultsB\013\n\t_order_byB\r\n\013_page_tokenB" + + "\031\n\027_return_partial_success\"\245\002\n#ListPubli" + + "cAdvertisedPrefixesRequest\022\027\n\006filter\030\370\226\243" + + "\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001" + + "\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token" + + "\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022", + "\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001" + + "B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_by" + + "B\r\n\013_page_tokenB\031\n\027_return_partial_succe" + + "ss\"\274\002\n\"ListPublicDelegatedPrefixesReques" + + "t\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_result" + + "s\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001" + + "\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project" + + "\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'" + + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B" + + "\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB" + + "\r\n\013_page_tokenB\031\n\027_return_partial_succes" + + "s\"\317\002\n\035ListReferrersInstancesRequest\022\027\n\006f" + + "ilter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\030\n\010instance\030\225\251\332\010 \001(" + + "\tB\003\340A\002\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010o" + "rder_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t" + " \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026re" - + "turn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_" - + "filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_" - + "page_tokenB\031\n\027_return_partial_success\"\245\002" - + "\n#ListPublicAdvertisedPrefixesRequest\022\027\n" - + "\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310" - + "\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n" - + "\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301" - + "l \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317", - "\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013" - + "\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_pa" - + "rtial_success\"\274\002\n\"ListPublicDelegatedPre" - + "fixesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n" + + "turn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004z" + + "one\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_res" + + "ultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_ret" + + "urn_partial_success\"\266\002\n\034ListRegionAutosc" + + "alersRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n" + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B" + " \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366" + "\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n" + "\t_order_byB\r\n\013_page_tokenB\031\n\027_return_par" - + "tial_success\"\317\002\n\035ListReferrersInstancesR" - + "equest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\030\n\010insta" - + "nce\030\225\251\332\010 \001(\tB\003\340A\002\022\033\n\013max_results\030\233\310\213\032 \001(" - + "\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage" - + "_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\t" - + "B\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(" - + "\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB" - + "\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_to" - + "kenB\031\n\027_return_partial_success\"\266\002\n\034ListR" - + "egionAutoscalersRequest\022\027\n\006filter\030\370\226\243\240\001 " - + "\001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n" - + "\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260" - + "\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006" - + "region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_s" - + "uccess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max" - + "_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027" - + "_return_partial_success\"\272\002\n ListRegionBa" - + "ckendServicesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" + + "tial_success\"\272\002\n ListRegionBackendServic" + + "esRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013ma" + + "x_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L" + + " \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n" + + "\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(" + + "\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001" + + "(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_o" + + "rder_byB\r\n\013_page_tokenB\031\n\027_return_partia" + + "l_success\"\266\002\n\034ListRegionCommitmentsReque" + + "st\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resul" + + "ts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210" + + "\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007projec" + + "t\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022" + + "\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001" + + "B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_by" + + "B\r\n\013_page_tokenB\031\n\027_return_partial_succe" + + "ss\"\264\002\n\032ListRegionDiskTypesRequest\022\027\n\006fil" + + "ter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001" + + "(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npag" + + "e_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(" + + "\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return" + + "_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filt" + + "erB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page" + + "_tokenB\031\n\027_return_partial_success\"\260\002\n\026Li" + + "stRegionDisksRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" + "H\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010or" + "der_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t " + "\001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006reg" + "ion\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_succ" + "ess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_re" + "sultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_re" - + "turn_partial_success\"\266\002\n\034ListRegionCommi" - + "tmentsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033" - + "\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030" - + "\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001" - + "\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240" - + "B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317" - + "\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013" - + "\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_pa" - + "rtial_success\"\264\002\n\032ListRegionDiskTypesReq" - + "uest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_res" - + "ults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH" - + "\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proj" - + "ect\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A" - + "\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210" - + "\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_" - + "byB\r\n\013_page_tokenB\031\n\027_return_partial_suc" - + "cess\"\260\002\n\026ListRegionDisksRequest\022\027\n\006filte" - + "r\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\r" - + "H\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_" - + "token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB" - + "\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_p" - + "artial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filter" - + "B\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_t" - + "okenB\031\n\027_return_partial_success\"\276\002\n$List" - + "RegionHealthCheckServicesRequest\022\027\n\006filt" - + "er\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(" - + "\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage" - + "_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\t" - + "B\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_" - + "partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filte" - + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" - + "tokenB\031\n\027_return_partial_success\"\267\002\n\035Lis" - + "tRegionHealthChecksRequest\022\027\n\006filter\030\370\226\243" - + "\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001" - + "\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token" - + "\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022" - + "\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partia" - + "l_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_" - + "max_resultsB\013\n\t_order_byB\r\n\013_page_tokenB" - + "\031\n\027_return_partial_success\"\300\002\n&ListRegio" - + "nInstanceGroupManagersRequest\022\027\n\006filter\030" - + "\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001" - + "\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_to" - + "ken\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340" - + "A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_par" - + "tial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016" - + "\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_tok" - + "enB\031\n\027_return_partial_success\"\271\002\n\037ListRe" - + "gionInstanceGroupsRequest\022\027\n\006filter\030\370\226\243\240" - + "\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022" - + "\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030" - + "\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026" - + "\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial" - + "_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_m" - + "ax_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031" - + "\n\027_return_partial_success\"\274\002\n\"ListRegion" - + "InstanceTemplatesRequest\022\027\n\006filter\030\370\226\243\240\001" - + " \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030" - + "\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311" - + "\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n" - + "\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_" - + "success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_ma" - + "x_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n" - + "\027_return_partial_success\"\300\002\n&ListRegionN" - + "etworkEndpointGroupsRequest\022\027\n\006filter\030\370\226" - + "\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001" - + "\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_toke" - + "n\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002" - + "\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_parti" - + "al_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014" - + "_max_resultsB\013\n\t_order_byB\r\n\013_page_token" - + "B\031\n\027_return_partial_success\"\302\002\n(ListRegi" - + "onNetworkFirewallPoliciesRequest\022\027\n\006filt" - + "er\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(" - + "\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage" - + "_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\t" - + "B\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_" - + "partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filte" - + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" - + "tokenB\031\n\027_return_partial_success\"\300\002\n&Lis" - + "tRegionNotificationEndpointsRequest\022\027\n\006f" - + "ilter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032" - + " \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\np" - + "age_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l " - + "\001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026retu" - + "rn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_fi" - + "lterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_pa" - + "ge_tokenB\031\n\027_return_partial_success\"\265\002\n\033" - + "ListRegionOperationsRequest\022\027\n\006filter\030\370\226" - + "\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001" - + "\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_toke" - + "n\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002" - + "\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_parti" - + "al_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014" - + "_max_resultsB\013\n\t_order_byB\r\n\013_page_token" - + "B\031\n\027_return_partial_success\"\273\002\n!ListRegi" - + "onSecurityPoliciesRequest\022\027\n\006filter\030\370\226\243\240" - + "\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022" - + "\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030" - + "\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026" - + "\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial" - + "_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_m" - + "ax_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031" - + "\n\027_return_partial_success\"\272\002\n ListRegion" - + "SslCertificatesRequest\022\027\n\006filter\030\370\226\243\240\001 \001" - + "(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010" - + "order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304" - + "\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006r" - + "egion\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_su" - + "ccess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_" - + "resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_" - + "return_partial_success\"\266\002\n\034ListRegionSsl" - + "PoliciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001" + + "turn_partial_success\"\276\002\n$ListRegionHealt" + + "hCheckServicesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(" + + "\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010o" + + "rder_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t" + + " \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006re" + + "gion\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_suc" + + "cess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_r" + + "esultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_r" + + "eturn_partial_success\"\267\002\n\035ListRegionHeal" + + "thChecksRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001" + "\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_b" + "y\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003" + "\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364" + "\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266" + "\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_results" + "B\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_" - + "partial_success\"\274\002\n\"ListRegionTargetHttp" - + "ProxiesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + + "partial_success\"\300\002\n&ListRegionInstanceGr" + + "oupManagersRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000" + + "\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010orde" + + "r_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(" + + "\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006regio" + + "n\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_succes" + + "s\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resu" + + "ltsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_retu" + + "rn_partial_success\"\271\002\n\037ListRegionInstanc" + + "eGroupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + "\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by" + "\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210" + "\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315" + "\240B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244" + "\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB" + "\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_p" - + "artial_success\"\275\002\n#ListRegionTargetHttps" - + "ProxiesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + + "artial_success\"\274\002\n\"ListRegionInstanceTem" + + "platesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033" + + "\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030" + + "\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001" + + "\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240" + + "B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317" + + "\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013" + + "\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_pa" + + "rtial_success\"\300\002\n&ListRegionNetworkEndpo" + + "intGroupsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001" + + "\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_" + + "by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH" + + "\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030" + + "\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030" + + "\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_result" + + "sB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return" + + "_partial_success\"\302\002\n(ListRegionNetworkFi" + + "rewallPoliciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(" + + "\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010o" + + "rder_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t" + + " \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006re" + + "gion\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_suc" + + "cess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_r" + + "esultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_r" + + "eturn_partial_success\"\300\002\n&ListRegionNoti" + + "ficationEndpointsRequest\022\027\n\006filter\030\370\226\243\240\001" + + " \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030" + + "\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311" + + "\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n" + + "\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_" + + "success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_ma" + + "x_resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n" + + "\027_return_partial_success\"\265\002\n\033ListRegionO" + + "perationsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001" + + "\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_" + + "by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH" + + "\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030" + + "\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030" + + "\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_result" + + "sB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return" + + "_partial_success\"\273\002\n!ListRegionSecurityP" + + "oliciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + "\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by" + "\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210" + "\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315" + "\240B \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244" + "\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB" + "\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_p" - + "artial_success\"\273\002\n!ListRegionTargetTcpPr" - + "oxiesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n" - + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" - + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" - + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B" - + " \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366" - + "\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n" - + "\t_order_byB\r\n\013_page_tokenB\031\n\027_return_par" - + "tial_success\"\262\002\n\030ListRegionUrlMapsReques" + + "artial_success\"\272\002\n ListRegionSslCertific" + + "atesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013" + + "max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375" + + "\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022" + + "\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B " + + "\001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001" + + " \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t" + + "_order_byB\r\n\013_page_tokenB\031\n\027_return_part" + + "ial_success\"\266\002\n\034ListRegionSslPoliciesReq" + + "uest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_res" + + "ults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH" + + "\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proj" + + "ect\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A" + + "\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210" + + "\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_" + + "byB\r\n\013_page_tokenB\031\n\027_return_partial_suc" + + "cess\"\274\002\n\"ListRegionTargetHttpProxiesRequ" + + "est\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resu" + + "lts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002" + + "\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proje" + + "ct\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002" + + "\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001" + + "\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_b" + + "yB\r\n\013_page_tokenB\031\n\027_return_partial_succ" + + "ess\"\275\002\n#ListRegionTargetHttpsProxiesRequ" + + "est\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resu" + + "lts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002" + + "\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proje" + + "ct\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002" + + "\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001" + + "\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_b" + + "yB\r\n\013_page_tokenB\031\n\027_return_partial_succ" + + "ess\"\273\002\n!ListRegionTargetTcpProxiesReques" + "t\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_result" + "s\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001" + "\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project" @@ -10641,51 +10642,147 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B" + "\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB" + "\r\n\013_page_tokenB\031\n\027_return_partial_succes" - + "s\"\224\002\n\022ListRegionsRequest\022\027\n\006filter\030\370\226\243\240\001" + + "s\"\262\002\n\030ListRegionUrlMapsRequest\022\027\n\006filter" + + "\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH" + + "\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_t" + + "oken\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003" + + "\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_pa" + + "rtial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB" + + "\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_to" + + "kenB\031\n\027_return_partial_success\"\224\002\n\022ListR" + + "egionsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033" + + "\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030" + + "\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001" + + "\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_par" + + "tial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016" + + "\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_tok" + + "enB\031\n\027_return_partial_success\"\257\002\n\027ListRe" + + "servationsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210" + + "\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order" + + "_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\t" + + "H\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return" + + "_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030" + + "\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_results" + + "B\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return_" + + "partial_success\"\265\002\n\033ListResourcePolicies" + + "Request\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_" + + "results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001" + + "(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007p" + + "roject\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB" + + "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" + + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" + + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" + + "success\"\254\002\n\022ListRoutersRequest\022\027\n\006filter" + + "\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH" + + "\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_t" + + "oken\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003" + + "\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_pa" + + "rtial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB" + + "\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_to" + + "kenB\031\n\027_return_partial_success\"\223\002\n\021ListR" + + "outesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n" + + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" + + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" + + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_part" + + "ial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n" + + "\014_max_resultsB\013\n\t_order_byB\r\n\013_page_toke" + + "nB\031\n\027_return_partial_success\"\235\002\n\033ListSec" + + "urityPoliciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\t" + + "H\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010or" + + "der_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t " + + "\001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026ret" + + "urn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_f" + + "ilterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_p" + + "age_tokenB\031\n\027_return_partial_success\"\267\002\n" + + "\035ListServiceAttachmentsRequest\022\027\n\006filter" + + "\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH" + + "\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_t" + + "oken\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003" + + "\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_pa" + + "rtial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB" + + "\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_to" + + "kenB\031\n\027_return_partial_success\"\226\002\n\024ListS" + + "napshotsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001" + + "\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_b" + + "y\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003" + + "\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_p" + + "artial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filter" + + "B\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_t" + + "okenB\031\n\027_return_partial_success\"\234\002\n\032List" + + "SslCertificatesRequest\022\027\n\006filter\030\370\226\243\240\001 \001" + + "(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010" + + "order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304" + + "\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026r" + + "eturn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007" + + "_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013" + + "_page_tokenB\031\n\027_return_partial_success\"\230" + + "\002\n\026ListSslPoliciesRequest\022\027\n\006filter\030\370\226\243\240" + + "\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022" + + "\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030" + + "\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'" + + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B" + + "\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB" + + "\r\n\013_page_tokenB\031\n\027_return_partial_succes" + + "s\"\260\002\n\026ListSubnetworksRequest\022\027\n\006filter\030\370" + + "\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210" + + "\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_tok" + + "en\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A" + + "\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_part" + + "ial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n" + + "\014_max_resultsB\013\n\t_order_byB\r\n\013_page_toke" + + "nB\031\n\027_return_partial_success\"\236\002\n\034ListTar" + + "getGrpcProxiesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(" + + "\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010o" + + "rder_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t" + + " \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026re" + + "turn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_" + + "filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_" + + "page_tokenB\031\n\027_return_partial_success\"\236\002" + + "\n\034ListTargetHttpProxiesRequest\022\027\n\006filter" + + "\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH" + + "\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_t" + + "oken\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003" + + "\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H" + + "\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_orde" + + "r_byB\r\n\013_page_tokenB\031\n\027_return_partial_s" + + "uccess\"\237\002\n\035ListTargetHttpsProxiesRequest" + + "\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results" + + "\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001" + + "\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030" + + "\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_success\030" + + "\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_result" + + "sB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return" + + "_partial_success\"\262\002\n\032ListTargetInstances" + + "Request\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_" + + "results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001" + + "(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007p" + + "roject\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_s" + + "uccess\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003" + + "\340A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order" + + "_byB\r\n\013_page_tokenB\031\n\027_return_partial_su" + + "ccess\"\260\002\n\026ListTargetPoolsRequest\022\027\n\006filt" + + "er\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(" + + "\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage" + + "_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\t" + + "B\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_" + + "partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filte" + + "rB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page_" + + "tokenB\031\n\027_return_partial_success\"\235\002\n\033Lis" + + "tTargetSslProxiesRequest\022\027\n\006filter\030\370\226\243\240\001" + " \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030" + "\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311" + "\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n" + "\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t" + "\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r" + "\n\013_page_tokenB\031\n\027_return_partial_success" - + "\"\257\002\n\027ListReservationsRequest\022\027\n\006filter\030\370" - + "\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210" - + "\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_tok" - + "en\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A" - + "\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210" - + "\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_" - + "max_resultsB\013\n\t_order_byB\r\n\013_page_tokenB" - + "\031\n\027_return_partial_success\"\265\002\n\033ListResou" - + "rcePoliciesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000" - + "\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010orde" - + "r_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(" - + "\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006regio" - + "n\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_succes" - + "s\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resu" - + "ltsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_retu" - + "rn_partial_success\"\254\002\n\022ListRoutersReques" - + "t\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_result" - + "s\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001" - + "\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project" - + "\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'" - + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B" - + "\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB" - + "\r\n\013_page_tokenB\031\n\027_return_partial_succes" - + "s\"\223\002\n\021ListRoutesRequest\022\027\n\006filter\030\370\226\243\240\001 " - + "\001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n" - + "\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260" - + "\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026" - + "return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n" - + "\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n" - + "\013_page_tokenB\031\n\027_return_partial_success\"" - + "\235\002\n\033ListSecurityPoliciesRequest\022\027\n\006filte" - + "r\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\r" - + "H\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_" - + "token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB" - + "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" - + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" - + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" - + "success\"\267\002\n\035ListServiceAttachmentsReques" + + "\"\235\002\n\033ListTargetTcpProxiesRequest\022\027\n\006filt" + + "er\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(" + + "\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage" + + "_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\t" + + "B\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(" + + "\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_or" + + "der_byB\r\n\013_page_tokenB\031\n\027_return_partial" + + "_success\"\266\002\n\034ListTargetVpnGatewaysReques" + "t\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_result" + "s\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001" + "\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project" @@ -10693,9418 +10790,9349 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B" + "\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB" + "\r\n\013_page_tokenB\031\n\027_return_partial_succes" - + "s\"\226\002\n\024ListSnapshotsRequest\022\027\n\006filter\030\370\226\243" - + "\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001" - + "\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token" - + "\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022" - + "\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001" - + "B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_by" - + "B\r\n\013_page_tokenB\031\n\027_return_partial_succe" - + "ss\"\234\002\n\032ListSslCertificatesRequest\022\027\n\006fil" + + "s\"\224\002\n\022ListUrlMapsRequest\022\027\n\006filter\030\370\226\243\240\001" + + " \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030" + + "\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311" + + "\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n" + + "\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t" + + "\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r" + + "\n\013_page_tokenB\031\n\027_return_partial_success" + + "\"\236\002\n\034ListUsableSubnetworksRequest\022\027\n\006fil" + "ter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001" + "(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npag" + "e_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(" + "\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001" + "(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_o" + "rder_byB\r\n\013_page_tokenB\031\n\027_return_partia" - + "l_success\"\230\002\n\026ListSslPoliciesRequest\022\027\n\006" + + "l_success\"\260\002\n\026ListVpnGatewaysRequest\022\027\n\006" + "filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213" + "\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\n" + "page_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l" - + " \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366" - + "\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n" - + "\t_order_byB\r\n\013_page_tokenB\031\n\027_return_par" - + "tial_success\"\260\002\n\026ListSubnetworksRequest\022" - + "\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030" - + "\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022" - + "\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231" - + "\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026" - + "return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n" - + "\007_filterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n" - + "\013_page_tokenB\031\n\027_return_partial_success\"" - + "\236\002\n\034ListTargetGrpcProxiesRequest\022\027\n\006filt" - + "er\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(" - + "\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage" - + "_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\t" - + "B\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(" - + "\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_or" - + "der_byB\r\n\013_page_tokenB\031\n\027_return_partial" - + "_success\"\236\002\n\034ListTargetHttpProxiesReques" - + "t\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_result" - + "s\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001" - + "\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project" - + "\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_success" - + "\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resul" - + "tsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_retur" - + "n_partial_success\"\237\002\n\035ListTargetHttpsPro" - + "xiesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013" - + "max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375" - + "\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022" - + "\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_parti" - + "al_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014" - + "_max_resultsB\013\n\t_order_byB\r\n\013_page_token" - + "B\031\n\027_return_partial_success\"\262\002\n\032ListTarg" - + "etInstancesRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000" - + "\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010orde" - + "r_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(" - + "\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026retur" - + "n_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone" - + "\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_result" - + "sB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_return" - + "_partial_success\"\260\002\n\026ListTargetPoolsRequ" - + "est\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resu" - + "lts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002" - + "\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proje" - + "ct\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002" - + "\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001" - + "\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_order_b" - + "yB\r\n\013_page_tokenB\031\n\027_return_partial_succ" - + "ess\"\235\002\n\033ListTargetSslProxiesRequest\022\027\n\006f" - + "ilter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032" - + " \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\np" - + "age_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l " - + "\001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001" - + " \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t" - + "_order_byB\r\n\013_page_tokenB\031\n\027_return_part" - + "ial_success\"\235\002\n\033ListTargetTcpProxiesRequ" - + "est\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resu" - + "lts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002" - + "\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proje" - + "ct\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succe" - + "ss\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_res" - + "ultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_ret" - + "urn_partial_success\"\266\002\n\034ListTargetVpnGat" - + "ewaysRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n" + + " \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026ret" + + "urn_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_f" + + "ilterB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_p" + + "age_tokenB\031\n\027_return_partial_success\"\257\002\n" + + "\025ListVpnTunnelsRequest\022\027\n\006filter\030\370\226\243\240\001 \001" + + "(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010" + + "order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304" + + "\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006r" + + "egion\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return_partial_su" + + "ccess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_" + + "resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_" + + "return_partial_success\"\215\003\n\033ListXpnHostsP" + + "rojectsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022" + + "\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by" + + "\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210" + + "\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022n\n(projects_" + + "list_xpn_hosts_request_resource\030\227\320\316q \001(\013" + + "24.google.cloud.compute.v1.ProjectsListX" + + "pnHostsRequestB\003\340A\002\022\'\n\026return_partial_su" + + "ccess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_" + + "resultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_" + + "return_partial_success\"\261\002\n\031ListZoneOpera" + + "tionsRequest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n" + "\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350" + "\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001" - + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B" - + " \001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366" - + "\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n" - + "\t_order_byB\r\n\013_page_tokenB\031\n\027_return_par" - + "tial_success\"\224\002\n\022ListUrlMapsRequest\022\027\n\006f" - + "ilter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032" - + " \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\np" - + "age_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l " - + "\001(\tB\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001" - + " \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t" - + "_order_byB\r\n\013_page_tokenB\031\n\027_return_part" - + "ial_success\"\236\002\n\034ListUsableSubnetworksReq" - + "uest\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_res" - + "ults\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH" - + "\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007proj" - + "ect\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succ" - + "ess\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_re" - + "sultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_re" - + "turn_partial_success\"\260\002\n\026ListVpnGateways" - + "Request\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_" - + "results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001" - + "(\tH\002\210\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007p" - + "roject\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB" + + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_part" + + "ial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n\004zone\030\254\307\344\001 " + + "\001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_" + + "order_byB\r\n\013_page_tokenB\031\n\027_return_parti" + + "al_success\"\222\002\n\020ListZonesRequest\022\027\n\006filte" + + "r\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\r" + + "H\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_" + + "token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB" + "\003\340A\002\022\'\n\026return_partial_success\030\266\244\317\366\001 \001(\010" + "H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resultsB\013\n\t_ord" + "er_byB\r\n\013_page_tokenB\031\n\027_return_partial_" - + "success\"\257\002\n\025ListVpnTunnelsRequest\022\027\n\006fil" - + "ter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001" - + "(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npag" - + "e_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(" - + "\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\'\n\026return" - + "_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filt" - + "erB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page" - + "_tokenB\031\n\027_return_partial_success\"\215\003\n\033Li" - + "stXpnHostsProjectsRequest\022\027\n\006filter\030\370\226\243\240" - + "\001 \001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022" - + "\030\n\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030" - + "\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022n" - + "\n(projects_list_xpn_hosts_request_resour" - + "ce\030\227\320\316q \001(\01324.google.cloud.compute.v1.Pr" - + "ojectsListXpnHostsRequestB\003\340A\002\022\'\n\026return" - + "_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filt" - + "erB\016\n\014_max_resultsB\013\n\t_order_byB\r\n\013_page" - + "_tokenB\031\n\027_return_partial_success\"\261\002\n\031Li" - + "stZoneOperationsRequest\022\027\n\006filter\030\370\226\243\240\001 " - + "\001(\tH\000\210\001\001\022\033\n\013max_results\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n" - + "\010order_by\030\350\375\307L \001(\tH\002\210\001\001\022\032\n\npage_token\030\311\260" - + "\304\t \001(\tH\003\210\001\001\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026" - + "return_partial_success\030\266\244\317\366\001 \001(\010H\004\210\001\001\022\024\n" - + "\004zone\030\254\307\344\001 \001(\tB\003\340A\002B\t\n\007_filterB\016\n\014_max_r" - + "esultsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_r" - + "eturn_partial_success\"\222\002\n\020ListZonesReque" - + "st\022\027\n\006filter\030\370\226\243\240\001 \001(\tH\000\210\001\001\022\033\n\013max_resul" - + "ts\030\233\310\213\032 \001(\rH\001\210\001\001\022\030\n\010order_by\030\350\375\307L \001(\tH\002\210" - + "\001\001\022\032\n\npage_token\030\311\260\304\t \001(\tH\003\210\001\001\022\027\n\007projec" - + "t\030\231\226\301l \001(\tB\003\340A\002\022\'\n\026return_partial_succes" - + "s\030\266\244\317\366\001 \001(\010H\004\210\001\001B\t\n\007_filterB\016\n\014_max_resu" - + "ltsB\013\n\t_order_byB\r\n\013_page_tokenB\031\n\027_retu" - + "rn_partial_success\"\217\001\n\tLocalDisk\022\032\n\ndisk" - + "_count\030\355\257\235W \001(\005H\000\210\001\001\022\035\n\014disk_size_gb\030\267\232\347" - + "\226\001 \001(\005H\001\210\001\001\022\031\n\tdisk_type\030\234\351\254, \001(\tH\002\210\001\001B\r" - + "\n\013_disk_countB\017\n\r_disk_size_gbB\014\n\n_disk_" - + "type\"\\\n\020LocalizedMessage\022\027\n\006locale\030\332\234\330\364\001" - + " \001(\tH\000\210\001\001\022\030\n\007message\030\207\200\254\307\001 \001(\tH\001\210\001\001B\t\n\007_" - + "localeB\n\n\010_message\"\322\002\n\016LocationPolicy\022M\n" - + "\tlocations\030\336\256\221\305\001 \003(\01326.google.cloud.comp" - + "ute.v1.LocationPolicy.LocationsEntry\022\035\n\014" - + "target_shape\030\363\346\273\241\001 \001(\tH\000\210\001\001\032a\n\016Locations" - + "Entry\022\013\n\003key\030\001 \001(\t\022>\n\005value\030\002 \001(\0132/.goog" - + "le.cloud.compute.v1.LocationPolicyLocati" - + "on:\0028\001\"^\n\013TargetShape\022\032\n\026UNDEFINED_TARGE" - + "T_SHAPE\020\000\022\t\n\003ANY\020\314\373\003\022\026\n\017ANY_SINGLE_ZONE\020" - + "\320\246\221\035\022\020\n\010BALANCED\020\210\272\255\337\001B\017\n\r_target_shape\"" - + "\216\002\n\026LocationPolicyLocation\022W\n\013constraint" - + "s\030\266\314\356\001 \001(\0132:.google.cloud.compute.v1.Loc" - + "ationPolicyLocationConstraintsH\000\210\001\001\022\032\n\np" - + "reference\030\333\371\362G \001(\tH\001\210\001\001\"`\n\nPreference\022\030\n" - + "\024UNDEFINED_PREFERENCE\020\000\022\014\n\005ALLOW\020\251\326\336\035\022\n\n" - + "\004DENY\020\214\354\177\022\036\n\026PREFERENCE_UNSPECIFIED\020\263\353\316\354", - "\001B\016\n\014_constraintsB\r\n\013_preference\"M\n!Loca" - + "tionPolicyLocationConstraints\022\032\n\tmax_cou" - + "nt\030\364\374\222\211\001 \001(\005H\000\210\001\001B\014\n\n_max_count\"\251\002\n\tLogC" - + "onfig\022Q\n\013cloud_audit\030\321\302\356\304\001 \001(\01323.google." - + "cloud.compute.v1.LogConfigCloudAuditOpti" - + "onsH\000\210\001\001\022J\n\007counter\030\374\253\335\310\001 \001(\01320.google.c" - + "loud.compute.v1.LogConfigCounterOptionsH" - + "\001\210\001\001\022Q\n\013data_access\030\231\337\326\210\001 \001(\01323.google.c" - + "loud.compute.v1.LogConfigDataAccessOptio" - + "nsH\002\210\001\001B\016\n\014_cloud_auditB\n\n\010_counterB\016\n\014_" - + "data_access\"\270\002\n\032LogConfigCloudAuditOptio" - + "ns\022c\n\035authorization_logging_options\030\370\233\361g" - + " \001(\01324.google.cloud.compute.v1.Authoriza" - + "tionLoggingOptionsH\000\210\001\001\022\031\n\010log_name\030\246\365\217\300" - + "\001 \001(\tH\001\210\001\001\"k\n\007LogName\022\026\n\022UNDEFINED_LOG_N" - + "AME\020\000\022\026\n\016ADMIN_ACTIVITY\020\237\334\354\313\001\022\022\n\013DATA_AC" - + "CESS\020\231\327\302q\022\034\n\024UNSPECIFIED_LOG_NAME\020\356\355\337\303\001B" - + " \n\036_authorization_logging_optionsB\013\n\t_lo" - + "g_name\"\265\001\n\027LogConfigCounterOptions\022U\n\rcu" - + "stom_fields\030\307\276\205w \003(\0132;.google.cloud.comp" - + "ute.v1.LogConfigCounterOptionsCustomFiel" - + "d\022\025\n\005field\030\372\301\272. \001(\tH\000\210\001\001\022\027\n\006metric\030\260\353\227\376\001" - + " \001(\tH\001\210\001\001B\010\n\006_fieldB\t\n\007_metric\"d\n\"LogCon" - + "figCounterOptionsCustomField\022\024\n\004name\030\213\365\315" - + "\001 \001(\tH\000\210\001\001\022\025\n\005value\030\361\242\2625 \001(\tH\001\210\001\001B\007\n\005_na" - + "meB\010\n\006_value\"\235\001\n\032LogConfigDataAccessOpti" - + "ons\022\031\n\010log_mode\030\276\363\216\300\001 \001(\tH\000\210\001\001\"W\n\007LogMod" - + "e\022\026\n\022UNDEFINED_LOG_MODE\020\000\022\027\n\017LOG_FAIL_CL" - + "OSED\020\222\252\361\253\001\022\033\n\024LOG_MODE_UNSPECIFIED\020\266\364\204*B" - + "\013\n\t_log_mode\"\203\t\n\014MachineImage\022\"\n\022creatio" - + "n_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description" - + "\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\034\n\013guest_flush\030\335\223\354\267\001 \001(\010" - + "H\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022P\n\023instance_prop" - + "erties\030\235\236\330f \001(\0132+.google.cloud.compute.v" - + "1.InstancePropertiesH\004\210\001\001\022\024\n\004kind\030\224\367\310\001 \001" - + "(\tH\005\210\001\001\022]\n\034machine_image_encryption_key\030" - + "\377\377\347\373\001 \001(\0132..google.cloud.compute.v1.Cust" - + "omerEncryptionKeyH\006\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH" - + "\007\210\001\001\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001(\010H\010\210\001\001\022;\n\013" - + "saved_disks\030\276\355\300\275\001 \003(\0132\".google.cloud.com" - + "pute.v1.SavedDisk\022\032\n\tself_link\030\215\222\305\331\001 \001(\t" - + "H\t\210\001\001\022Y\n\033source_disk_encryption_keys\030\262\370\317" - + "\260\001 \003(\01320.google.cloud.compute.v1.SourceD" - + "iskEncryptionKey\022 \n\017source_instance\030\271\230\375\274" - + "\001 \001(\tH\n\210\001\001\022^\n\032source_instance_properties" - + "\030\371\321\313\342\001 \001(\01321.google.cloud.compute.v1.Sou" - + "rceInstancePropertiesH\013\210\001\001\022\026\n\006status\030\362\237\267" - + "V \001(\tH\014\210\001\001\022\035\n\021storage_locations\030\232\355\263\234\001 \003(" - + "\t\022#\n\023total_storage_bytes\030\354\207\204\' \001(\003H\r\210\001\001\"s" - + "\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\020\n\010CREATI" - + "NG\020\271\275\235\331\001\022\020\n\010DELETING\020\250\247\207\374\001\022\017\n\007INVALID\020\327\373" - + "\355\374\001\022\014\n\005READY\020\203\303\217%\022\020\n\tUPLOADING\020\241\234\315\177B\025\n\023_" - + "creation_timestampB\016\n\014_descriptionB\016\n\014_g" - + "uest_flushB\005\n\003_idB\026\n\024_instance_propertie" - + "sB\007\n\005_kindB\037\n\035_machine_image_encryption_" - + "keyB\007\n\005_nameB\020\n\016_satisfies_pzsB\014\n\n_self_" - + "linkB\022\n\020_source_instanceB\035\n\033_source_inst" - + "ance_propertiesB\t\n\007_statusB\026\n\024_total_sto" - + "rage_bytes\"\251\002\n\020MachineImageList\022\020\n\002id\030\233\032" - + " \001(\tH\000\210\001\001\0227\n\005items\030\300\317\367/ \003(\0132%.google.clo" - + "ud.compute.v1.MachineImage\022\024\n\004kind\030\224\367\310\001 " + + "success\"\217\001\n\tLocalDisk\022\032\n\ndisk_count\030\355\257\235W" + + " \001(\005H\000\210\001\001\022\035\n\014disk_size_gb\030\267\232\347\226\001 \001(\005H\001\210\001\001" + + "\022\031\n\tdisk_type\030\234\351\254, \001(\tH\002\210\001\001B\r\n\013_disk_cou" + + "ntB\017\n\r_disk_size_gbB\014\n\n_disk_type\"\\\n\020Loc" + + "alizedMessage\022\027\n\006locale\030\332\234\330\364\001 \001(\tH\000\210\001\001\022\030" + + "\n\007message\030\207\200\254\307\001 \001(\tH\001\210\001\001B\t\n\007_localeB\n\n\010_" + + "message\"\322\002\n\016LocationPolicy\022M\n\tlocations\030" + + "\336\256\221\305\001 \003(\01326.google.cloud.compute.v1.Loca" + + "tionPolicy.LocationsEntry\022\035\n\014target_shap" + + "e\030\363\346\273\241\001 \001(\tH\000\210\001\001\032a\n\016LocationsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022>\n\005value\030\002 \001(\0132/.google.cloud.co" + + "mpute.v1.LocationPolicyLocation:\0028\001\"^\n\013T" + + "argetShape\022\032\n\026UNDEFINED_TARGET_SHAPE\020\000\022\t" + + "\n\003ANY\020\314\373\003\022\026\n\017ANY_SINGLE_ZONE\020\320\246\221\035\022\020\n\010BAL" + + "ANCED\020\210\272\255\337\001B\017\n\r_target_shape\"\216\002\n\026Locatio" + + "nPolicyLocation\022W\n\013constraints\030\266\314\356\001 \001(\0132" + + ":.google.cloud.compute.v1.LocationPolicy" + + "LocationConstraintsH\000\210\001\001\022\032\n\npreference\030\333" + + "\371\362G \001(\tH\001\210\001\001\"`\n\nPreference\022\030\n\024UNDEFINED_" + + "PREFERENCE\020\000\022\014\n\005ALLOW\020\251\326\336\035\022\n\n\004DENY\020\214\354\177\022\036", + "\n\026PREFERENCE_UNSPECIFIED\020\263\353\316\354\001B\016\n\014_const" + + "raintsB\r\n\013_preference\"M\n!LocationPolicyL" + + "ocationConstraints\022\032\n\tmax_count\030\364\374\222\211\001 \001(" + + "\005H\000\210\001\001B\014\n\n_max_count\"\251\002\n\tLogConfig\022Q\n\013cl" + + "oud_audit\030\321\302\356\304\001 \001(\01323.google.cloud.compu" + + "te.v1.LogConfigCloudAuditOptionsH\000\210\001\001\022J\n" + + "\007counter\030\374\253\335\310\001 \001(\01320.google.cloud.comput" + + "e.v1.LogConfigCounterOptionsH\001\210\001\001\022Q\n\013dat" + + "a_access\030\231\337\326\210\001 \001(\01323.google.cloud.comput" + + "e.v1.LogConfigDataAccessOptionsH\002\210\001\001B\016\n\014" + + "_cloud_auditB\n\n\010_counterB\016\n\014_data_access" + + "\"\270\002\n\032LogConfigCloudAuditOptions\022c\n\035autho" + + "rization_logging_options\030\370\233\361g \001(\01324.goog" + + "le.cloud.compute.v1.AuthorizationLogging" + + "OptionsH\000\210\001\001\022\031\n\010log_name\030\246\365\217\300\001 \001(\tH\001\210\001\001\"" + + "k\n\007LogName\022\026\n\022UNDEFINED_LOG_NAME\020\000\022\026\n\016AD" + + "MIN_ACTIVITY\020\237\334\354\313\001\022\022\n\013DATA_ACCESS\020\231\327\302q\022\034" + + "\n\024UNSPECIFIED_LOG_NAME\020\356\355\337\303\001B \n\036_authori" + + "zation_logging_optionsB\013\n\t_log_name\"\265\001\n\027" + + "LogConfigCounterOptions\022U\n\rcustom_fields" + + "\030\307\276\205w \003(\0132;.google.cloud.compute.v1.LogC" + + "onfigCounterOptionsCustomField\022\025\n\005field\030" + + "\372\301\272. \001(\tH\000\210\001\001\022\027\n\006metric\030\260\353\227\376\001 \001(\tH\001\210\001\001B\010" + + "\n\006_fieldB\t\n\007_metric\"d\n\"LogConfigCounterO" + + "ptionsCustomField\022\024\n\004name\030\213\365\315\001 \001(\tH\000\210\001\001\022" + + "\025\n\005value\030\361\242\2625 \001(\tH\001\210\001\001B\007\n\005_nameB\010\n\006_valu" + + "e\"\235\001\n\032LogConfigDataAccessOptions\022\031\n\010log_" + + "mode\030\276\363\216\300\001 \001(\tH\000\210\001\001\"W\n\007LogMode\022\026\n\022UNDEFI" + + "NED_LOG_MODE\020\000\022\027\n\017LOG_FAIL_CLOSED\020\222\252\361\253\001\022" + + "\033\n\024LOG_MODE_UNSPECIFIED\020\266\364\204*B\013\n\t_log_mod" + + "e\"\203\t\n\014MachineImage\022\"\n\022creation_timestamp" + + "\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH" + + "\001\210\001\001\022\034\n\013guest_flush\030\335\223\354\267\001 \001(\010H\002\210\001\001\022\020\n\002id" + + "\030\233\032 \001(\004H\003\210\001\001\022P\n\023instance_properties\030\235\236\330f" + + " \001(\0132+.google.cloud.compute.v1.InstanceP" + + "ropertiesH\004\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022]\n\034" + + "machine_image_encryption_key\030\377\377\347\373\001 \001(\0132." + + ".google.cloud.compute.v1.CustomerEncrypt" + + "ionKeyH\006\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022\036\n\rsat" + + "isfies_pzs\030\253\335\253\345\001 \001(\010H\010\210\001\001\022;\n\013saved_disks" + + "\030\276\355\300\275\001 \003(\0132\".google.cloud.compute.v1.Sav" + + "edDisk\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\t\210\001\001\022Y\n\033so" + + "urce_disk_encryption_keys\030\262\370\317\260\001 \003(\01320.go" + + "ogle.cloud.compute.v1.SourceDiskEncrypti" + + "onKey\022 \n\017source_instance\030\271\230\375\274\001 \001(\tH\n\210\001\001\022" + + "^\n\032source_instance_properties\030\371\321\313\342\001 \001(\0132" + + "1.google.cloud.compute.v1.SourceInstance" + + "PropertiesH\013\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\014\210\001\001\022" + + "\035\n\021storage_locations\030\232\355\263\234\001 \003(\t\022#\n\023total_" + + "storage_bytes\030\354\207\204\' \001(\003H\r\210\001\001\"s\n\006Status\022\024\n" + + "\020UNDEFINED_STATUS\020\000\022\020\n\010CREATING\020\271\275\235\331\001\022\020\n" + + "\010DELETING\020\250\247\207\374\001\022\017\n\007INVALID\020\327\373\355\374\001\022\014\n\005READ" + + "Y\020\203\303\217%\022\020\n\tUPLOADING\020\241\234\315\177B\025\n\023_creation_ti" + + "mestampB\016\n\014_descriptionB\016\n\014_guest_flushB" + + "\005\n\003_idB\026\n\024_instance_propertiesB\007\n\005_kindB" + + "\037\n\035_machine_image_encryption_keyB\007\n\005_nam" + + "eB\020\n\016_satisfies_pzsB\014\n\n_self_linkB\022\n\020_so" + + "urce_instanceB\035\n\033_source_instance_proper" + + "tiesB\t\n\007_statusB\026\n\024_total_storage_bytes\"" + + "\251\002\n\020MachineImageList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0227" + + "\n\005items\030\300\317\367/ \003(\0132%.google.cloud.compute." + + "v1.MachineImage\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n" + + "\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_l" + + "ink\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 " + + ".google.cloud.compute.v1.WarningH\004\210\001\001B\005\n" + + "\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_se" + + "lf_linkB\n\n\010_warning\"\312\006\n\013MachineType\022?\n\014a" + + "ccelerators\030\350\326\305\200\001 \003(\0132%.google.cloud.com" + + "pute.v1.Accelerators\022\"\n\022creation_timesta" + + "mp\030\266\217\307\016 \001(\tH\000\210\001\001\022G\n\ndeprecated\030\263\313\321\365\001 \001(\013" + + "2*.google.cloud.compute.v1.DeprecationSt" + + "atusH\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022" + + "\033\n\nguest_cpus\030\322\313\310\273\001 \001(\005H\003\210\001\001\022\020\n\002id\030\233\032 \001(" + + "\004H\004\210\001\001\022\036\n\016image_space_gb\030\230\362\365# \001(\005H\005\210\001\001\022\036" + + "\n\ris_shared_cpu\030\203\332\317\370\001 \001(\010H\006\210\001\001\022\024\n\004kind\030\224" + + "\367\310\001 \001(\tH\007\210\001\001\022)\n\030maximum_persistent_disks" + + "\030\215\366\316\354\001 \001(\005H\010\210\001\001\0220\n maximum_persistent_di" + + "sks_size_gb\030\247\225\310I \001(\003H\t\210\001\001\022\031\n\tmemory_mb\030\223" + + "\223\2507 \001(\005H\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\013\210\001\001\022@\n\rsc" + + "ratch_disks\030\361\261\240\345\001 \003(\0132%.google.cloud.com" + + "pute.v1.ScratchDisks\022\032\n\tself_link\030\215\222\305\331\001 " + + "\001(\tH\014\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH\r\210\001\001B\025\n\023_creat" + + "ion_timestampB\r\n\013_deprecatedB\016\n\014_descrip" + + "tionB\r\n\013_guest_cpusB\005\n\003_idB\021\n\017_image_spa" + + "ce_gbB\020\n\016_is_shared_cpuB\007\n\005_kindB\033\n\031_max" + + "imum_persistent_disksB#\n!_maximum_persis" + + "tent_disks_size_gbB\014\n\n_memory_mbB\007\n\005_nam" + + "eB\014\n\n_self_linkB\007\n\005_zone\"\302\003\n\031MachineType" + + "AggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022O\n\005item" + + "s\030\300\317\367/ \003(\0132=.google.cloud.compute.v1.Mac" + + "hineTypeAggregatedList.ItemsEntry\022\024\n\004kin" + + "d\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& " + + "\001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014" + + "unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(" + + "\0132 .google.cloud.compute.v1.WarningH\004\210\001\001" + + "\032]\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022>\n\005value\030\002 \001" + + "(\0132/.google.cloud.compute.v1.MachineType" + + "sScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next" + + "_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\247\002" + + "\n\017MachineTypeList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0226\n\005i" + + "tems\030\300\317\367/ \003(\0132$.google.cloud.compute.v1." + + "MachineType\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017nex" + + "t_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030" + + "\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .goo" + + "gle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_id" + + "B\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_l" + + "inkB\n\n\010_warning\"\237\001\n\026MachineTypesScopedLi" + + "st\022>\n\rmachine_types\030\201\335\201& \003(\0132$.google.cl" + + "oud.compute.v1.MachineType\0229\n\007warning\030\234\337" + + "\226\030 \001(\0132 .google.cloud.compute.v1.Warning" + + "H\000\210\001\001B\n\n\010_warning\"\257\t\n\017ManagedInstance\022\036\n" + + "\016current_action\030\274\247\215U \001(\tH\000\210\001\001\022\020\n\002id\030\233\032 \001" + + "(\004H\001\210\001\001\022\030\n\010instance\030\225\251\332\010 \001(\tH\002\210\001\001\022S\n\017ins" + + "tance_health\030\306\222\274\266\001 \003(\01326.google.cloud.co" + + "mpute.v1.ManagedInstanceInstanceHealth\022\037" + + "\n\017instance_status\030\334\255\237S \001(\tH\003\210\001\001\022R\n\014last_" + + "attempt\030\244\254\250\317\001 \001(\01323.google.cloud.compute" + + ".v1.ManagedInstanceLastAttemptH\004\210\001\001\022T\n\033p" + + "reserved_state_from_config\030\342\353\205/ \001(\0132\'.go" + + "ogle.cloud.compute.v1.PreservedStateH\005\210\001" + + "\001\022U\n\033preserved_state_from_policy\030\322\257\276\340\001 \001" + + "(\0132\'.google.cloud.compute.v1.PreservedSt" + + "ateH\006\210\001\001\022I\n\007version\030\330\271\324\247\001 \001(\0132/.google.c" + + "loud.compute.v1.ManagedInstanceVersionH\007" + + "\210\001\001\"\205\002\n\rCurrentAction\022\034\n\030UNDEFINED_CURRE" + + "NT_ACTION\020\000\022\022\n\nABANDONING\020\315\312\220\271\001\022\020\n\010CREAT" + + "ING\020\271\275\235\331\001\022 \n\030CREATING_WITHOUT_RETRIES\020\211\306" + + "\276\314\001\022\020\n\010DELETING\020\250\247\207\374\001\022\013\n\004NONE\020\270\316\222\001\022\022\n\nRE" + + "CREATING\020\354\213\376\210\001\022\021\n\nREFRESHING\020\247\376\354M\022\022\n\nRES" + + "TARTING\020\363\356\353\230\001\022\020\n\010RESUMING\020\252\373\211\325\001\022\020\n\010START" + + "ING\020\300\240\213\351\001\022\020\n\tVERIFYING\020\251\301\214\010\"\355\001\n\016Instance" + + "Status\022\035\n\031UNDEFINED_INSTANCE_STATUS\020\000\022\026\n" + + "\016DEPROVISIONING\020\356\223\304\314\001\022\024\n\014PROVISIONING\020\355\365" + + "\332\212\001\022\021\n\tREPAIRING\020\225\202\225\305\001\022\016\n\007RUNNING\020\237\303\3529\022\017" + + "\n\007STAGING\020\233\310\306\315\001\022\017\n\007STOPPED\020\255\273\354\323\001\022\020\n\010STOP" + + "PING\020\364\320\242\247\001\022\020\n\tSUSPENDED\020\273\273\266\030\022\022\n\nSUSPENDI" + + "NG\020\246\324\230\365\001\022\021\n\nTERMINATED\020\243\364\233wB\021\n\017_current_" + + "actionB\005\n\003_idB\013\n\t_instanceB\022\n\020_instance_" + + "statusB\017\n\r_last_attemptB\036\n\034_preserved_st" + + "ate_from_configB\036\n\034_preserved_state_from" + + "_policyB\n\n\010_version\"\246\002\n\035ManagedInstanceI" + + "nstanceHealth\022&\n\025detailed_health_state\030\235" + + "\320\264\363\001 \001(\tH\000\210\001\001\022\035\n\014health_check\030\345\252\244\223\001 \001(\tH" + + "\001\210\001\001\"\222\001\n\023DetailedHealthState\022#\n\037UNDEFINE" + + "D_DETAILED_HEALTH_STATE\020\000\022\020\n\010DRAINING\020\352\325" + + "\214\345\001\022\017\n\007HEALTHY\020\375\252\333\321\001\022\017\n\007TIMEOUT\020\301\262\353\343\001\022\021\n" + + "\tUNHEALTHY\020\304\271\255\334\001\022\017\n\007UNKNOWN\020\252\360\304\316\001B\030\n\026_de" + + "tailed_health_stateB\017\n\r_health_check\"a\n\032" + + "ManagedInstanceLastAttempt\0228\n\006errors\030\353\336\325" + + "\226\001 \001(\0132\037.google.cloud.compute.v1.ErrorsH" + + "\000\210\001\001B\t\n\007_errors\"q\n\026ManagedInstanceVersio" + + "n\022\"\n\021instance_template\030\344\201\273\223\001 \001(\tH\000\210\001\001\022\024\n" + + "\004name\030\213\365\315\001 \001(\tH\001\210\001\001B\024\n\022_instance_templat" + + "eB\007\n\005_name\"\210\001\n\010Metadata\022\033\n\013fingerprint\030\344" + + "\321\363o \001(\tH\000\210\001\001\0220\n\005items\030\300\317\367/ \003(\0132\036.google." + + "cloud.compute.v1.Items\022\024\n\004kind\030\224\367\310\001 \001(\tH" + + "\001\210\001\001B\016\n\014_fingerprintB\007\n\005_kind\"\217\002\n\016Metada" + + "taFilter\022L\n\rfilter_labels\030\246\365\350\222\001 \003(\01321.go" + + "ogle.cloud.compute.v1.MetadataFilterLabe" + + "lMatch\022%\n\025filter_match_criteria\030\300\320\266r \001(\t" + + "H\000\210\001\001\"n\n\023FilterMatchCriteria\022#\n\037UNDEFINE" + + "D_FILTER_MATCH_CRITERIA\020\000\022\020\n\tMATCH_ALL\020\347" + + "\347\222V\022\020\n\tMATCH_ANY\020\262\350\222V\022\016\n\007NOT_SET\020\266\231\204NB\030\n" + + "\026_filter_match_criteria\"Z\n\030MetadataFilte" + + "rLabelMatch\022\024\n\004name\030\213\365\315\001 \001(\tH\000\210\001\001\022\025\n\005val" + + "ue\030\361\242\2625 \001(\tH\001\210\001\001B\007\n\005_nameB\010\n\006_value\"\275\001\n\026" + + "MoveDiskProjectRequest\022U\n\032disk_move_requ" + + "est_resource\030\312\302\240\225\001 \001(\0132(.google.cloud.co" + + "mpute.v1.DiskMoveRequestB\003\340A\002\022!\n\007project" + + "\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313" + + "\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\220\001\n\031MoveFire" + + "wallPolicyRequest\022 \n\017firewall_policy\030\321\212\306" + + "\355\001 \001(\tB\003\340A\002\022&\n\tparent_id\030\320\341\232\333\001 \001(\tB\017\340A\002\362" + + "G\tparent_id\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B" + + "\r\n\013_request_id\"\311\001\n\032MoveInstanceProjectRe" + + "quest\022]\n\036instance_move_request_resource\030" + + "\302\274\316\224\001 \001(\0132,.google.cloud.compute.v1.Inst" + + "anceMoveRequestB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" + + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001B\r\n\013_request_id\"I\n\tNamedPort\022\024\n\004name\030" + + "\213\365\315\001 \001(\tH\000\210\001\001\022\024\n\004port\030\201\261\322\001 \001(\005H\001\210\001\001B\007\n\005_" + + "nameB\007\n\005_port\"\355\010\n\007Network\022\033\n\013I_pv4_range" + + "\030\266\260\237\034 \001(\tH\000\210\001\001\022\'\n\027auto_create_subnetwork" + + "s\030\222\310\222z \001(\010H\001\210\001\001\022\"\n\022creation_timestamp\030\266\217" + + "\307\016 \001(\tH\002\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\003\210\001" + + "\001\022)\n\030enable_ula_internal_ipv6\030\230\217\210\312\001 \001(\010H" + + "\004\210\001\001\022 \n\017firewall_policy\030\321\212\306\355\001 \001(\tH\005\210\001\001\022\035" + + "\n\rgateway_i_pv4\030\335\330\231U \001(\tH\006\210\001\001\022\020\n\002id\030\233\032 \001" + + "(\004H\007\210\001\001\022$\n\023internal_ipv6_range\030\247\317\246\204\001 \001(\t" + + "H\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\t\210\001\001\022\022\n\003mtu\030\256\317\006 \001" + + "(\005H\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\013\210\001\001\0229\n)network" + + "_firewall_policy_enforcement_order\030\320\202\215\003 " + + "\001(\tH\014\210\001\001\022<\n\010peerings\030\263\252\251! \003(\0132\'.google.c" + + "loud.compute.v1.NetworkPeering\022N\n\016routin" + + "g_config\030\333\251\323\371\001 \001(\0132-.google.cloud.comput" + + "e.v1.NetworkRoutingConfigH\r\210\001\001\022\032\n\tself_l" + + "ink\030\215\222\305\331\001 \001(\tH\016\210\001\001\022!\n\021self_link_with_id\030" + + "\202\254\235\025 \001(\tH\017\210\001\001\022\027\n\013subnetworks\030\305\324\245\306\001 \003(\t\"\240" + + "\001\n%NetworkFirewallPolicyEnforcementOrder" + + "\0227\n3UNDEFINED_NETWORK_FIREWALL_POLICY_EN" + + "FORCEMENT_ORDER\020\000\022\035\n\026AFTER_CLASSIC_FIREW" + + "ALL\020\320\374\332I\022\037\n\027BEFORE_CLASSIC_FIREWALL\020\355\355\261\241" + + "\001B\016\n\014_I_pv4_rangeB\032\n\030_auto_create_subnet" + + "worksB\025\n\023_creation_timestampB\016\n\014_descrip" + + "tionB\033\n\031_enable_ula_internal_ipv6B\022\n\020_fi" + + "rewall_policyB\020\n\016_gateway_i_pv4B\005\n\003_idB\026" + + "\n\024_internal_ipv6_rangeB\007\n\005_kindB\006\n\004_mtuB" + + "\007\n\005_nameB,\n*_network_firewall_policy_enf" + + "orcement_orderB\021\n\017_routing_configB\014\n\n_se" + + "lf_linkB\024\n\022_self_link_with_id\"\247\006\n\021Networ" + + "kAttachment\022]\n\024connection_endpoints\030\335\242\276\233" + + "\001 \003(\0132;.google.cloud.compute.v1.NetworkA" + + "ttachmentConnectedEndpoint\022&\n\025connection" + + "_preference\030\334\371\244\210\001 \001(\tH\000\210\001\001\022\"\n\022creation_t" + + "imestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013description\030\374\207" + + "\326\311\001 \001(\tH\002\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\003\210\001" + + "\001\022\020\n\002id\030\233\032 \001(\004H\004\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\005\210\001" + + "\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001\022\027\n\007network\030\256\264\205o " + + "\001(\tH\007\210\001\001\022 \n\025producer_accept_lists\030\253\232\332` \003" + + "(\t\022 \n\025producer_reject_lists\030\202\375\372\001 \003(\t\022\026\n\006" + + "region\030\364\315\240B \001(\tH\010\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 " + + "\001(\tH\t\210\001\001\022!\n\021self_link_with_id\030\202\254\235\025 \001(\tH\n" + + "\210\001\001\022\027\n\013subnetworks\030\305\324\245\306\001 \003(\t\"|\n\024Connecti" + + "onPreference\022#\n\037UNDEFINED_CONNECTION_PRE" + + "FERENCE\020\000\022\027\n\020ACCEPT_AUTOMATIC\020\224\367\360#\022\025\n\rAC" + + "CEPT_MANUAL\020\335\355\361\261\001\022\017\n\007INVALID\020\327\373\355\374\001B\030\n\026_c" + + "onnection_preferenceB\025\n\023_creation_timest" + + "ampB\016\n\014_descriptionB\016\n\014_fingerprintB\005\n\003_" + + "idB\007\n\005_kindB\007\n\005_nameB\n\n\010_networkB\t\n\007_reg" + + "ionB\014\n\n_self_linkB\024\n\022_self_link_with_id\"" + + "\273\003\n\037NetworkAttachmentAggregatedList\022\020\n\002i" + + "d\030\233\032 \001(\tH\000\210\001\001\022U\n\005items\030\300\317\367/ \003(\0132C.google" + + ".cloud.compute.v1.NetworkAttachmentAggre" + + "gatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210" + + "\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\ts" + + "elf_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 " + + "\001(\0132 .google.cloud.compute.v1.WarningH\004\210" + + "\001\001\032c\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002" + + " \001(\01325.google.cloud.compute.v1.NetworkAt" + + "tachmentsScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB" + + "\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_wa" + + "rning\"\225\003\n\"NetworkAttachmentConnectedEndp" + + "oint\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH\000\210\001\001\022\"\n\021pro" + + "ject_id_or_num\030\250\212\345\246\001 \001(\tH\001\210\001\001\022#\n\030seconda" + + "ry_ip_cidr_ranges\030\224\262\3607 \003(\t\022\026\n\006status\030\362\237\267" + + "V \001(\tH\002\210\001\001\022\033\n\nsubnetwork\030\356\247\344\222\001 \001(\tH\003\210\001\001\"" + + "\224\001\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\017\n\010ACCE" + + "PTED\020\247\237\322u\022\016\n\006CLOSED\020\354\252\243\265\001\022\027\n\017NEEDS_ATTEN" + + "TION\020\274\213\242\244\001\022\016\n\007PENDING\020\367\252\360\020\022\017\n\010REJECTED\020\376" + + "\210\204S\022\031\n\022STATUS_UNSPECIFIED\020\312\314\213\024B\r\n\013_ip_ad" + + "dressB\024\n\022_project_id_or_numB\t\n\007_statusB\r" + + "\n\013_subnetwork\"\263\002\n\025NetworkAttachmentList\022" + + "\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022<\n\005items\030\300\317\367/ \003(\0132*.go" + + "ogle.cloud.compute.v1.NetworkAttachment\022" + + "\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token" + + "\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210" + + "\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.co" + + "mpute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n" + + "\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_warn" + + "ing\"\262\001\n\034NetworkAttachmentsScopedList\022K\n\023" + + "network_attachments\030\237\336\326\370\001 \003(\0132*.google.c" + + "loud.compute.v1.NetworkAttachment\0229\n\007war" + + "ning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1." + + "WarningH\000\210\001\001B\n\n\010_warning\"\304\003\n\032NetworkEdge" + + "SecurityService\022\"\n\022creation_timestamp\030\266\217" + + "\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001" + + "\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 " + + "\001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213" + + "\365\315\001 \001(\tH\005\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\006\210\001\001\022\037\n\017" + + "security_policy\030\221\206\312Q \001(\tH\007\210\001\001\022\032\n\tself_li" + + "nk\030\215\222\305\331\001 \001(\tH\010\210\001\001\022!\n\021self_link_with_id\030\202" + + "\254\235\025 \001(\tH\t\210\001\001B\025\n\023_creation_timestampB\016\n\014_" + + "descriptionB\016\n\014_fingerprintB\005\n\003_idB\007\n\005_k" + + "indB\007\n\005_nameB\t\n\007_regionB\022\n\020_security_pol" + + "icyB\014\n\n_self_linkB\024\n\022_self_link_with_id\"" + + "\216\004\n(NetworkEdgeSecurityServiceAggregated" + + "List\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\022\020\n\002id\030\233\032 \001(\tH" + + "\001\210\001\001\022^\n\005items\030\300\317\367/ \003(\0132L.google.cloud.co" + + "mpute.v1.NetworkEdgeSecurityServiceAggre" + + "gatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\002\210" + + "\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\003\210\001\001\022\032\n\ts" + + "elf_link\030\215\222\305\331\001 \001(\tH\004\210\001\001\022\027\n\014unreachables\030" + + "\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cl" + + "oud.compute.v1.WarningH\005\210\001\001\032l\n\nItemsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022M\n\005value\030\002 \001(\0132>.google.c" + + "loud.compute.v1.NetworkEdgeSecurityServi" + + "cesScopedList:\0028\001B\007\n\005_etagB\005\n\003_idB\007\n\005_ki" + + "ndB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010" + + "_warning\"\316\001\n%NetworkEdgeSecurityServices" + + "ScopedList\022^\n\036network_edge_security_serv" + + "ices\030\254\313\370\020 \003(\01323.google.cloud.compute.v1." + + "NetworkEdgeSecurityService\0229\n\007warning\030\234\337" + + "\226\030 \001(\0132 .google.cloud.compute.v1.Warning" + + "H\000\210\001\001B\n\n\010_warning\"\251\002\n\017NetworkEndpoint\022Q\n" + + "\013annotations\030\244\366\2655 \003(\01329.google.cloud.com" + + "pute.v1.NetworkEndpoint.AnnotationsEntry" + + "\022\024\n\004fqdn\030\225\245\300\001 \001(\tH\000\210\001\001\022\030\n\010instance\030\225\251\332\010 " + + "\001(\tH\001\210\001\001\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH\002\210\001\001\022\024\n" + + "\004port\030\201\261\322\001 \001(\005H\003\210\001\001\0322\n\020AnnotationsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\007\n\005_fqdn" + + "B\013\n\t_instanceB\r\n\013_ip_addressB\007\n\005_port\"\357\n" + + "\n\024NetworkEndpointGroup\022V\n\013annotations\030\244\366" + + "\2655 \003(\0132>.google.cloud.compute.v1.Network" + + "EndpointGroup.AnnotationsEntry\022S\n\napp_en" + + "gine\030\240\214\300\242\001 \001(\01326.google.cloud.compute.v1" + + ".NetworkEndpointGroupAppEngineH\000\210\001\001\022[\n\016c" + + "loud_function\030\242\345\363\367\001 \001(\0132:.google.cloud.c" + + "ompute.v1.NetworkEndpointGroupCloudFunct" + + "ionH\001\210\001\001\022P\n\tcloud_run\030\201\313\3724 \001(\01325.google." + + "cloud.compute.v1.NetworkEndpointGroupClo" + + "udRunH\002\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(" + + "\tH\003\210\001\001\022\035\n\014default_port\030\277\367\360\311\001 \001(\005H\004\210\001\001\022\034\n" + + "\013description\030\374\207\326\311\001 \001(\tH\005\210\001\001\022\020\n\002id\030\233\032 \001(\004" + + "H\006\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\007\210\001\001\022\024\n\004name\030\213\365\315\001" + + " \001(\tH\010\210\001\001\022\027\n\007network\030\256\264\205o \001(\tH\t\210\001\001\022%\n\025ne" + + "twork_endpoint_type\030\323\306\2648 \001(\tH\n\210\001\001\022N\n\010psc" + + "_data\030\311\333\246\" \001(\01324.google.cloud.compute.v1" + + ".NetworkEndpointGroupPscDataH\013\210\001\001\022#\n\022psc" + + "_target_service\030\346\302\252\200\001 \001(\tH\014\210\001\001\022\026\n\006region" + + "\030\364\315\240B \001(\tH\r\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\016\210" + + "\001\001\022\024\n\004size\030\201\300\327\001 \001(\005H\017\210\001\001\022\033\n\nsubnetwork\030\356" + + "\247\344\222\001 \001(\tH\020\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH\021\210\001\001\0322\n\020A" + + "nnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001\"\360\001\n\023NetworkEndpointType\022#\n\037UNDEF" + + "INED_NETWORK_ENDPOINT_TYPE\020\000\022\021\n\tGCE_VM_I" + + "P\020\331\355\320\277\001\022\026\n\016GCE_VM_IP_PORT\020\247\344\245\357\001\022\032\n\022INTER" + + "NET_FQDN_PORT\020\355\320\333\300\001\022\030\n\020INTERNET_IP_PORT\020" + + "\233\333\345\343\001\022\037\n\027NON_GCP_PRIVATE_IP_PORT\020\340\223\267\240\001\022\036" + + "\n\027PRIVATE_SERVICE_CONNECT\020\304\364\371\026\022\022\n\nSERVER" + + "LESS\020\334\306\375\200\001B\r\n\013_app_engineB\021\n\017_cloud_func" + + "tionB\014\n\n_cloud_runB\025\n\023_creation_timestam" + + "pB\017\n\r_default_portB\016\n\014_descriptionB\005\n\003_i" + + "dB\007\n\005_kindB\007\n\005_nameB\n\n\010_networkB\030\n\026_netw" + + "ork_endpoint_typeB\013\n\t_psc_dataB\025\n\023_psc_t" + + "arget_serviceB\t\n\007_regionB\014\n\n_self_linkB\007" + + "\n\005_sizeB\r\n\013_subnetworkB\007\n\005_zone\"\335\003\n\"Netw" + + "orkEndpointGroupAggregatedList\022\020\n\002id\030\233\032 " + + "\001(\tH\000\210\001\001\022X\n\005items\030\300\317\367/ \003(\0132F.google.clou" + + "d.compute.v1.NetworkEndpointGroupAggrega" + + "tedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001" + + "\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tsel" + + "f_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240" + + "\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clou" + + "d.compute.v1.WarningH\004\210\001\001\032f\n\nItemsEntry\022" + + "\013\n\003key\030\001 \001(\t\022G\n\005value\030\002 \001(\01328.google.clo" + + "ud.compute.v1.NetworkEndpointGroupsScope" + + "dList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_" + + "tokenB\014\n\n_self_linkB\n\n\010_warning\"\222\001\n\035Netw" + + "orkEndpointGroupAppEngine\022\030\n\007service\030\265\215\217" + + "\262\001 \001(\tH\000\210\001\001\022\030\n\010url_mask\030\274\217\2441 \001(\tH\001\210\001\001\022\030\n" + + "\007version\030\330\271\324\247\001 \001(\tH\002\210\001\001B\n\n\010_serviceB\013\n\t_" + + "url_maskB\n\n\010_version\"r\n!NetworkEndpointG" + + "roupCloudFunction\022\031\n\010function\030\330\347\275\222\001 \001(\tH" + + "\000\210\001\001\022\030\n\010url_mask\030\274\217\2441 \001(\tH\001\210\001\001B\013\n\t_funct" + + "ionB\013\n\t_url_mask\"\207\001\n\034NetworkEndpointGrou" + + "pCloudRun\022\030\n\007service\030\265\215\217\262\001 \001(\tH\000\210\001\001\022\022\n\003t" + + "ag\030\232\377\006 \001(\tH\001\210\001\001\022\030\n\010url_mask\030\274\217\2441 \001(\tH\002\210\001" + + "\001B\n\n\010_serviceB\006\n\004_tagB\013\n\t_url_mask\"\271\002\n\030N" + + "etworkEndpointGroupList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" + + "\001\022?\n\005items\030\300\317\367/ \003(\0132-.google.cloud.compu" + + "te.v1.NetworkEndpointGroup\022\024\n\004kind\030\224\367\310\001 " + "\001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001" + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning" + "\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warn" + "ingH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_t" - + "okenB\014\n\n_self_linkB\n\n\010_warning\"\312\006\n\013Machi" - + "neType\022?\n\014accelerators\030\350\326\305\200\001 \003(\0132%.googl" - + "e.cloud.compute.v1.Accelerators\022\"\n\022creat" - + "ion_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022G\n\ndeprecate" - + "d\030\263\313\321\365\001 \001(\0132*.google.cloud.compute.v1.De" - + "precationStatusH\001\210\001\001\022\034\n\013description\030\374\207\326\311" - + "\001 \001(\tH\002\210\001\001\022\033\n\nguest_cpus\030\322\313\310\273\001 \001(\005H\003\210\001\001\022" - + "\020\n\002id\030\233\032 \001(\004H\004\210\001\001\022\036\n\016image_space_gb\030\230\362\365#" - + " \001(\005H\005\210\001\001\022\036\n\ris_shared_cpu\030\203\332\317\370\001 \001(\010H\006\210\001" - + "\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\007\210\001\001\022)\n\030maximum_persi" - + "stent_disks\030\215\366\316\354\001 \001(\005H\010\210\001\001\0220\n maximum_pe" - + "rsistent_disks_size_gb\030\247\225\310I \001(\003H\t\210\001\001\022\031\n\t" - + "memory_mb\030\223\223\2507 \001(\005H\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\t" - + "H\013\210\001\001\022@\n\rscratch_disks\030\361\261\240\345\001 \003(\0132%.googl" - + "e.cloud.compute.v1.ScratchDisks\022\032\n\tself_" - + "link\030\215\222\305\331\001 \001(\tH\014\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH\r\210\001" - + "\001B\025\n\023_creation_timestampB\r\n\013_deprecatedB" - + "\016\n\014_descriptionB\r\n\013_guest_cpusB\005\n\003_idB\021\n" - + "\017_image_space_gbB\020\n\016_is_shared_cpuB\007\n\005_k" - + "indB\033\n\031_maximum_persistent_disksB#\n!_max" - + "imum_persistent_disks_size_gbB\014\n\n_memory" - + "_mbB\007\n\005_nameB\014\n\n_self_linkB\007\n\005_zone\"\302\003\n\031" - + "MachineTypeAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000" - + "\210\001\001\022O\n\005items\030\300\317\367/ \003(\0132=.google.cloud.com" - + "pute.v1.MachineTypeAggregatedList.ItemsE" - + "ntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_" - + "token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001" - + "(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warn" - + "ing\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.W" - + "arningH\004\210\001\001\032]\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022>" - + "\n\005value\030\002 \001(\0132/.google.cloud.compute.v1." - + "MachineTypesScopedList:\0028\001B\005\n\003_idB\007\n\005_ki" - + "ndB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010" - + "_warning\"\247\002\n\017MachineTypeList\022\020\n\002id\030\233\032 \001(" - + "\tH\000\210\001\001\0226\n\005items\030\300\317\367/ \003(\0132$.google.cloud." - + "compute.v1.MachineType\022\024\n\004kind\030\224\367\310\001 \001(\tH" + + "okenB\014\n\n_self_linkB\n\n\010_warning\"\213\003\n\033Netwo" + + "rkEndpointGroupPscData\022%\n\024consumer_psc_a" + + "ddress\030\254\255\353\327\001 \001(\tH\000\210\001\001\022\"\n\021psc_connection_" + + "id\030\335\245\243\213\001 \001(\004H\001\210\001\001\022%\n\025psc_connection_stat" + + "us\030\264\311\347W \001(\tH\002\210\001\001\"\260\001\n\023PscConnectionStatus" + + "\022#\n\037UNDEFINED_PSC_CONNECTION_STATUS\020\000\022\017\n" + + "\010ACCEPTED\020\247\237\322u\022\016\n\006CLOSED\020\354\252\243\265\001\022\027\n\017NEEDS_" + + "ATTENTION\020\274\213\242\244\001\022\016\n\007PENDING\020\367\252\360\020\022\017\n\010REJEC" + + "TED\020\376\210\204S\022\031\n\022STATUS_UNSPECIFIED\020\312\314\213\024B\027\n\025_" + + "consumer_psc_addressB\024\n\022_psc_connection_" + + "idB\030\n\026_psc_connection_status\"u\n+NetworkE" + + "ndpointGroupsAttachEndpointsRequest\022F\n\021n" + + "etwork_endpoints\030\255\221\272G \003(\0132(.google.cloud" + + ".compute.v1.NetworkEndpoint\"u\n+NetworkEn" + + "dpointGroupsDetachEndpointsRequest\022F\n\021ne" + + "twork_endpoints\030\255\221\272G \003(\0132(.google.cloud." + + "compute.v1.NetworkEndpoint\"\244\001\n)NetworkEn" + + "dpointGroupsListEndpointsRequest\022\036\n\rheal" + + "th_status\030\265\326\272\265\001 \001(\tH\000\210\001\001\"E\n\014HealthStatus" + + "\022\033\n\027UNDEFINED_HEALTH_STATUS\020\000\022\013\n\004SHOW\020\375\245" + + "\233\001\022\013\n\004SKIP\020\377\272\233\001B\020\n\016_health_status\"\253\002\n)Ne" + + "tworkEndpointGroupsListNetworkEndpoints\022" + + "\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022J\n\005items\030\300\317\367/ \003(\01328.go" + + "ogle.cloud.compute.v1.NetworkEndpointWit" + + "hHealthStatus\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017n" + + "ext_page_token\030\225\272\206& \001(\tH\002\210\001\001\0229\n\007warning\030" + + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" + + "ngH\003\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_to" + + "kenB\n\n\010_warning\"\273\001\n\037NetworkEndpointGroup" + + "sScopedList\022Q\n\027network_endpoint_groups\030\255" + + "\227\377\r \003(\0132-.google.cloud.compute.v1.Networ" + + "kEndpointGroup\0229\n\007warning\030\234\337\226\030 \001(\0132 .goo" + + "gle.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_wa" + + "rning\"\317\001\n\037NetworkEndpointWithHealthStatu" + + "s\022K\n\007healths\030\227\223\255{ \003(\01327.google.cloud.com", + "pute.v1.HealthStatusForNetworkEndpoint\022J" + + "\n\020network_endpoint\030\206\221\212\033 \001(\0132(.google.clo" + + "ud.compute.v1.NetworkEndpointH\000\210\001\001B\023\n\021_n" + + "etwork_endpoint\"\201\t\n\020NetworkInterface\022@\n\016" + + "access_configs\030\226\273\3724 \003(\0132%.google.cloud.c" + + "ompute.v1.AccessConfig\022A\n\017alias_ip_range" + + "s\030\277\203\334N \003(\0132%.google.cloud.compute.v1.Ali" + + "asIpRange\022\033\n\013fingerprint\030\344\321\363o \001(\tH\000\210\001\001\022+" + + "\n\033internal_ipv6_prefix_length\030\235\203\231a \001(\005H\001" + + "\210\001\001\022F\n\023ipv6_access_configs\030\356\345\304\346\001 \003(\0132%.g" + + "oogle.cloud.compute.v1.AccessConfig\022!\n\020i" + + "pv6_access_type\030\335\365\321\360\001 \001(\tH\002\210\001\001\022\035\n\014ipv6_a" + + "ddress\030\234\263\357\242\001 \001(\tH\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004" + + "\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\027\n\007network\030\256\264\205" + + "o \001(\tH\006\210\001\001\022\"\n\022network_attachment\030\324\227\217k \001(" + + "\tH\007\210\001\001\022\033\n\013network_i_p\030\211\261\345b \001(\tH\010\210\001\001\022\030\n\010n" + + "ic_type\030\221\306\302\034 \001(\tH\t\210\001\001\022\034\n\013queue_count\030\341\370\227" + + "\360\001 \001(\005H\n\210\001\001\022\033\n\nstack_type\030\221\265\213\313\001 \001(\tH\013\210\001\001" + + "\022\033\n\nsubnetwork\030\356\247\344\222\001 \001(\tH\014\210\001\001\"y\n\016Ipv6Acc" + + "essType\022\036\n\032UNDEFINED_IPV6_ACCESS_TYPE\020\000\022" + + "\017\n\010EXTERNAL\020\313\247\375\020\022\020\n\010INTERNAL\020\275\355\226\205\001\022$\n\034UN" + + "SPECIFIED_IPV6_ACCESS_TYPE\020\245\366\244\225\001\"`\n\007NicT" + + "ype\022\026\n\022UNDEFINED_NIC_TYPE\020\000\022\014\n\005GVNIC\020\231\225\303" + + " \022\033\n\024UNSPECIFIED_NIC_TYPE\020\331\276\222 \022\022\n\nVIRTIO" + + "_NET\020\331\266\313\327\001\"i\n\tStackType\022\030\n\024UNDEFINED_STA" + + "CK_TYPE\020\000\022\020\n\tIPV4_IPV6\020\201\350\312\n\022\020\n\tIPV4_ONLY" + + "\020\246\313\325\n\022\036\n\026UNSPECIFIED_STACK_TYPE\020\331\321\221\216\001B\016\n" + + "\014_fingerprintB\036\n\034_internal_ipv6_prefix_l" + + "engthB\023\n\021_ipv6_access_typeB\017\n\r_ipv6_addr" + + "essB\007\n\005_kindB\007\n\005_nameB\n\n\010_networkB\025\n\023_ne" + + "twork_attachmentB\016\n\014_network_i_pB\013\n\t_nic" + + "_typeB\016\n\014_queue_countB\r\n\013_stack_typeB\r\n\013" + + "_subnetwork\"\237\002\n\013NetworkList\022\020\n\002id\030\233\032 \001(\t" + + "H\000\210\001\001\0222\n\005items\030\300\317\367/ \003(\0132 .google.cloud.c" + + "ompute.v1.Network\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022" + + "\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself" + + "_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\013" + + "2 .google.cloud.compute.v1.WarningH\004\210\001\001B" + + "\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_" + + "self_linkB\n\n\010_warning\"\272\006\n\016NetworkPeering" + + "\022\"\n\022auto_create_routes\030\335\342\262\033 \001(\010H\000\210\001\001\022&\n\026" + + "exchange_subnet_routes\030\320\312\306\014 \001(\010H\001\210\001\001\022$\n\024" + + "export_custom_routes\030\215\245\337\034 \001(\010H\002\210\001\001\0223\n#ex" + + "port_subnet_routes_with_public_ip\030\342\352\331. \001" + + "(\010H\003\210\001\001\022$\n\024import_custom_routes\030\276\361\263^ \001(\010" + + "H\004\210\001\001\0223\n#import_subnet_routes_with_publi" + + "c_ip\030\221\216\360\006 \001(\010H\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001" + + "\022\027\n\007network\030\256\264\205o \001(\tH\007\210\001\001\022\030\n\010peer_mtu\030\321\216" + + "\227! \001(\005H\010\210\001\001\022\033\n\nstack_type\030\221\265\213\313\001 \001(\tH\t\210\001\001" + + "\022\025\n\005state\030\221\211\2534 \001(\tH\n\210\001\001\022\035\n\rstate_details" + + "\030\224\371\310- \001(\tH\013\210\001\001\"I\n\tStackType\022\030\n\024UNDEFINED" + + "_STACK_TYPE\020\000\022\020\n\tIPV4_IPV6\020\201\350\312\n\022\020\n\tIPV4_" + + "ONLY\020\246\313\325\n\">\n\005State\022\023\n\017UNDEFINED_STATE\020\000\022" + + "\016\n\006ACTIVE\020\206\346\211\226\001\022\020\n\010INACTIVE\020\353\230\371\200\001B\025\n\023_au" + + "to_create_routesB\031\n\027_exchange_subnet_rou" + + "tesB\027\n\025_export_custom_routesB&\n$_export_" + + "subnet_routes_with_public_ipB\027\n\025_import_" + + "custom_routesB&\n$_import_subnet_routes_w" + + "ith_public_ipB\007\n\005_nameB\n\n\010_networkB\013\n\t_p" + + "eer_mtuB\r\n\013_stack_typeB\010\n\006_stateB\020\n\016_sta" + + "te_details\"\316\001\n\030NetworkPerformanceConfig\022" + + "+\n\033total_egress_bandwidth_tier\030\377\237\205> \001(\tH" + + "\000\210\001\001\"e\n\030TotalEgressBandwidthTier\022)\n%UNDE" + + "FINED_TOTAL_EGRESS_BANDWIDTH_TIER\020\000\022\016\n\007D" + + "EFAULT\020\241\304\3756\022\016\n\006TIER_1\020\224\312\361\233\001B\036\n\034_total_eg" + + "ress_bandwidth_tier\"\222\001\n\024NetworkRoutingCo" + + "nfig\022\035\n\014routing_mode\030\374\272\310\342\001 \001(\tH\000\210\001\001\"J\n\013R" + + "outingMode\022\032\n\026UNDEFINED_ROUTING_MODE\020\000\022\016" + + "\n\006GLOBAL\020\243\357\357\353\001\022\017\n\010REGIONAL\020\237\354\200,B\017\n\r_rout" + + "ing_mode\"\204\002\n\031NetworksAddPeeringRequest\022\"" + + "\n\022auto_create_routes\030\335\342\262\033 \001(\010H\000\210\001\001\022\024\n\004na" + + "me\030\213\365\315\001 \001(\tH\001\210\001\001\022I\n\017network_peering\030\257\214\354\234" + + "\001 \001(\0132\'.google.cloud.compute.v1.NetworkP" + + "eeringH\002\210\001\001\022\035\n\014peer_network\030\321\340\333\356\001 \001(\tH\003\210" + + "\001\001B\025\n\023_auto_create_routesB\007\n\005_nameB\022\n\020_n" + + "etwork_peeringB\017\n\r_peer_network\"\326\001\n%Netw" + + "orksGetEffectiveFirewallsResponse\022s\n\020fir" + + "ewall_policys\030\302\312\374\303\001 \003(\0132U.google.cloud.c" + + "ompute.v1.NetworksGetEffectiveFirewallsR" + + "esponseEffectiveFirewallPolicy\0228\n\tfirewa" + + "lls\030\363\306\350\201\001 \003(\0132!.google.cloud.compute.v1." + + "Firewall\"\352\002\n\n\rmachine_types\030\201\335\201& \003(\0132" - + "$.google.cloud.compute.v1.MachineType\0229\n" - + "\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compute" - + ".v1.WarningH\000\210\001\001B\n\n\010_warning\"\257\t\n\017Managed" - + "Instance\022\036\n\016current_action\030\274\247\215U \001(\tH\000\210\001\001" - + "\022\020\n\002id\030\233\032 \001(\004H\001\210\001\001\022\030\n\010instance\030\225\251\332\010 \001(\tH" - + "\002\210\001\001\022S\n\017instance_health\030\306\222\274\266\001 \003(\01326.goog" - + "le.cloud.compute.v1.ManagedInstanceInsta" - + "nceHealth\022\037\n\017instance_status\030\334\255\237S \001(\tH\003\210" - + "\001\001\022R\n\014last_attempt\030\244\254\250\317\001 \001(\01323.google.cl" - + "oud.compute.v1.ManagedInstanceLastAttemp" - + "tH\004\210\001\001\022T\n\033preserved_state_from_config\030\342\353" - + "\205/ \001(\0132\'.google.cloud.compute.v1.Preserv" - + "edStateH\005\210\001\001\022U\n\033preserved_state_from_pol" - + "icy\030\322\257\276\340\001 \001(\0132\'.google.cloud.compute.v1." - + "PreservedStateH\006\210\001\001\022I\n\007version\030\330\271\324\247\001 \001(\013" - + "2/.google.cloud.compute.v1.ManagedInstan" - + "ceVersionH\007\210\001\001\"\205\002\n\rCurrentAction\022\034\n\030UNDE" - + "FINED_CURRENT_ACTION\020\000\022\022\n\nABANDONING\020\315\312\220" - + "\271\001\022\020\n\010CREATING\020\271\275\235\331\001\022 \n\030CREATING_WITHOUT" - + "_RETRIES\020\211\306\276\314\001\022\020\n\010DELETING\020\250\247\207\374\001\022\013\n\004NONE" - + "\020\270\316\222\001\022\022\n\nRECREATING\020\354\213\376\210\001\022\021\n\nREFRESHING\020" - + "\247\376\354M\022\022\n\nRESTARTING\020\363\356\353\230\001\022\020\n\010RESUMING\020\252\373\211" - + "\325\001\022\020\n\010STARTING\020\300\240\213\351\001\022\020\n\tVERIFYING\020\251\301\214\010\"\355" - + "\001\n\016InstanceStatus\022\035\n\031UNDEFINED_INSTANCE_" - + "STATUS\020\000\022\026\n\016DEPROVISIONING\020\356\223\304\314\001\022\024\n\014PROV" - + "ISIONING\020\355\365\332\212\001\022\021\n\tREPAIRING\020\225\202\225\305\001\022\016\n\007RUN" - + "NING\020\237\303\3529\022\017\n\007STAGING\020\233\310\306\315\001\022\017\n\007STOPPED\020\255\273" - + "\354\323\001\022\020\n\010STOPPING\020\364\320\242\247\001\022\020\n\tSUSPENDED\020\273\273\266\030\022" - + "\022\n\nSUSPENDING\020\246\324\230\365\001\022\021\n\nTERMINATED\020\243\364\233wB\021" - + "\n\017_current_actionB\005\n\003_idB\013\n\t_instanceB\022\n" - + "\020_instance_statusB\017\n\r_last_attemptB\036\n\034_p" - + "reserved_state_from_configB\036\n\034_preserved" - + "_state_from_policyB\n\n\010_version\"\246\002\n\035Manag" - + "edInstanceInstanceHealth\022&\n\025detailed_hea" - + "lth_state\030\235\320\264\363\001 \001(\tH\000\210\001\001\022\035\n\014health_check" - + "\030\345\252\244\223\001 \001(\tH\001\210\001\001\"\222\001\n\023DetailedHealthState\022" - + "#\n\037UNDEFINED_DETAILED_HEALTH_STATE\020\000\022\020\n\010" - + "DRAINING\020\352\325\214\345\001\022\017\n\007HEALTHY\020\375\252\333\321\001\022\017\n\007TIMEO" - + "UT\020\301\262\353\343\001\022\021\n\tUNHEALTHY\020\304\271\255\334\001\022\017\n\007UNKNOWN\020\252" - + "\360\304\316\001B\030\n\026_detailed_health_stateB\017\n\r_healt" - + "h_check\"a\n\032ManagedInstanceLastAttempt\0228\n" - + "\006errors\030\353\336\325\226\001 \001(\0132\037.google.cloud.compute" - + ".v1.ErrorsH\000\210\001\001B\t\n\007_errors\"q\n\026ManagedIns" - + "tanceVersion\022\"\n\021instance_template\030\344\201\273\223\001 " - + "\001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001\001B\024\n\022_insta" - + "nce_templateB\007\n\005_name\"\210\001\n\010Metadata\022\033\n\013fi" - + "ngerprint\030\344\321\363o \001(\tH\000\210\001\001\0220\n\005items\030\300\317\367/ \003(" - + "\0132\036.google.cloud.compute.v1.Items\022\024\n\004kin" - + "d\030\224\367\310\001 \001(\tH\001\210\001\001B\016\n\014_fingerprintB\007\n\005_kind" - + "\"\217\002\n\016MetadataFilter\022L\n\rfilter_labels\030\246\365\350" - + "\222\001 \003(\01321.google.cloud.compute.v1.Metadat" - + "aFilterLabelMatch\022%\n\025filter_match_criter" - + "ia\030\300\320\266r \001(\tH\000\210\001\001\"n\n\023FilterMatchCriteria\022" - + "#\n\037UNDEFINED_FILTER_MATCH_CRITERIA\020\000\022\020\n\t" - + "MATCH_ALL\020\347\347\222V\022\020\n\tMATCH_ANY\020\262\350\222V\022\016\n\007NOT_" - + "SET\020\266\231\204NB\030\n\026_filter_match_criteria\"Z\n\030Me" - + "tadataFilterLabelMatch\022\024\n\004name\030\213\365\315\001 \001(\tH" - + "\000\210\001\001\022\025\n\005value\030\361\242\2625 \001(\tH\001\210\001\001B\007\n\005_nameB\010\n\006" - + "_value\"\275\001\n\026MoveDiskProjectRequest\022U\n\032dis" - + "k_move_request_resource\030\312\302\240\225\001 \001(\0132(.goog" - + "le.cloud.compute.v1.DiskMoveRequestB\003\340A\002" - + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nr" - + "equest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\220" - + "\001\n\031MoveFirewallPolicyRequest\022 \n\017firewall" - + "_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022&\n\tparent_id\030\320\341\232\333" - + "\001 \001(\tB\017\340A\002\362G\tparent_id\022\032\n\nrequest_id\030\313\201\331" - + "\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\311\001\n\032MoveInstan" - + "ceProjectRequest\022]\n\036instance_move_reques" - + "t_resource\030\302\274\316\224\001 \001(\0132,.google.cloud.comp" - + "ute.v1.InstanceMoveRequestB\003\340A\002\022!\n\007proje" - + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id" - + "\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"I\n\tNamedPo" - + "rt\022\024\n\004name\030\213\365\315\001 \001(\tH\000\210\001\001\022\024\n\004port\030\201\261\322\001 \001(" - + "\005H\001\210\001\001B\007\n\005_nameB\007\n\005_port\"\355\010\n\007Network\022\033\n\013" - + "I_pv4_range\030\266\260\237\034 \001(\tH\000\210\001\001\022\'\n\027auto_create" - + "_subnetworks\030\222\310\222z \001(\010H\001\210\001\001\022\"\n\022creation_t" - + "imestamp\030\266\217\307\016 \001(\tH\002\210\001\001\022\034\n\013description\030\374\207" - + "\326\311\001 \001(\tH\003\210\001\001\022)\n\030enable_ula_internal_ipv6" - + "\030\230\217\210\312\001 \001(\010H\004\210\001\001\022 \n\017firewall_policy\030\321\212\306\355\001" - + " \001(\tH\005\210\001\001\022\035\n\rgateway_i_pv4\030\335\330\231U \001(\tH\006\210\001\001" - + "\022\020\n\002id\030\233\032 \001(\004H\007\210\001\001\022$\n\023internal_ipv6_rang" - + "e\030\247\317\246\204\001 \001(\tH\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\t\210\001\001\022\022" - + "\n\003mtu\030\256\317\006 \001(\005H\n\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\013\210\001\001" - + "\0229\n)network_firewall_policy_enforcement_" - + "order\030\320\202\215\003 \001(\tH\014\210\001\001\022<\n\010peerings\030\263\252\251! \003(\013" - + "2\'.google.cloud.compute.v1.NetworkPeerin" - + "g\022N\n\016routing_config\030\333\251\323\371\001 \001(\0132-.google.c" - + "loud.compute.v1.NetworkRoutingConfigH\r\210\001" - + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\016\210\001\001\022!\n\021self_li" - + "nk_with_id\030\202\254\235\025 \001(\tH\017\210\001\001\022\027\n\013subnetworks\030" - + "\305\324\245\306\001 \003(\t\"\240\001\n%NetworkFirewallPolicyEnfor" - + "cementOrder\0227\n3UNDEFINED_NETWORK_FIREWAL" - + "L_POLICY_ENFORCEMENT_ORDER\020\000\022\035\n\026AFTER_CL" - + "ASSIC_FIREWALL\020\320\374\332I\022\037\n\027BEFORE_CLASSIC_FI" - + "REWALL\020\355\355\261\241\001B\016\n\014_I_pv4_rangeB\032\n\030_auto_cr" - + "eate_subnetworksB\025\n\023_creation_timestampB" - + "\016\n\014_descriptionB\033\n\031_enable_ula_internal_" - + "ipv6B\022\n\020_firewall_policyB\020\n\016_gateway_i_p" - + "v4B\005\n\003_idB\026\n\024_internal_ipv6_rangeB\007\n\005_ki" - + "ndB\006\n\004_mtuB\007\n\005_nameB,\n*_network_firewall" - + "_policy_enforcement_orderB\021\n\017_routing_co" - + "nfigB\014\n\n_self_linkB\024\n\022_self_link_with_id" - + "\"\247\006\n\021NetworkAttachment\022]\n\024connection_end" - + "points\030\335\242\276\233\001 \003(\0132;.google.cloud.compute." - + "v1.NetworkAttachmentConnectedEndpoint\022&\n" - + "\025connection_preference\030\334\371\244\210\001 \001(\tH\000\210\001\001\022\"\n" - + "\022creation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013des" - + "cription\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\033\n\013fingerprint\030\344" - + "\321\363o \001(\tH\003\210\001\001\022\020\n\002id\030\233\032 \001(\004H\004\210\001\001\022\024\n\004kind\030\224" - + "\367\310\001 \001(\tH\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001\022\027\n\007ne" - + "twork\030\256\264\205o \001(\tH\007\210\001\001\022 \n\025producer_accept_l" - + "ists\030\253\232\332` \003(\t\022 \n\025producer_reject_lists\030\202" - + "\375\372\001 \003(\t\022\026\n\006region\030\364\315\240B \001(\tH\010\210\001\001\022\032\n\tself_" - + "link\030\215\222\305\331\001 \001(\tH\t\210\001\001\022!\n\021self_link_with_id" - + "\030\202\254\235\025 \001(\tH\n\210\001\001\022\027\n\013subnetworks\030\305\324\245\306\001 \003(\t\"" - + "|\n\024ConnectionPreference\022#\n\037UNDEFINED_CON" - + "NECTION_PREFERENCE\020\000\022\027\n\020ACCEPT_AUTOMATIC" - + "\020\224\367\360#\022\025\n\rACCEPT_MANUAL\020\335\355\361\261\001\022\017\n\007INVALID\020" - + "\327\373\355\374\001B\030\n\026_connection_preferenceB\025\n\023_crea" - + "tion_timestampB\016\n\014_descriptionB\016\n\014_finge" - + "rprintB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\n\n\010_netw" - + "orkB\t\n\007_regionB\014\n\n_self_linkB\024\n\022_self_li" - + "nk_with_id\"\273\003\n\037NetworkAttachmentAggregat" - + "edList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022U\n\005items\030\300\317\367/ \003" - + "(\0132C.google.cloud.compute.v1.NetworkAtta" - + "chmentAggregatedList.ItemsEntry\022\024\n\004kind\030" - + "\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(" - + "\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007wa" - + "rning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1" - + ".WarningH\004\210\001\001\032c\n\nItemsEntry\022\013\n\003key\030\001 \001(\t" - + "\022D\n\005value\030\002 \001(\01325.google.cloud.compute.v" - + "1.NetworkAttachmentsScopedList:\0028\001B\005\n\003_i" - + "dB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_" - + "linkB\n\n\010_warning\"\225\003\n\"NetworkAttachmentCo" - + "nnectedEndpoint\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH" - + "\000\210\001\001\022\"\n\021project_id_or_num\030\250\212\345\246\001 \001(\tH\001\210\001\001" - + "\022#\n\030secondary_ip_cidr_ranges\030\224\262\3607 \003(\t\022\026\n" - + "\006status\030\362\237\267V \001(\tH\002\210\001\001\022\033\n\nsubnetwork\030\356\247\344\222" - + "\001 \001(\tH\003\210\001\001\"\224\001\n\006Status\022\024\n\020UNDEFINED_STATU" - + "S\020\000\022\017\n\010ACCEPTED\020\247\237\322u\022\016\n\006CLOSED\020\354\252\243\265\001\022\027\n\017" - + "NEEDS_ATTENTION\020\274\213\242\244\001\022\016\n\007PENDING\020\367\252\360\020\022\017\n" - + "\010REJECTED\020\376\210\204S\022\031\n\022STATUS_UNSPECIFIED\020\312\314\213" - + "\024B\r\n\013_ip_addressB\024\n\022_project_id_or_numB\t" - + "\n\007_statusB\r\n\013_subnetwork\"\263\002\n\025NetworkAtta" - + "chmentList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022<\n\005items\030\300\317" - + "\367/ \003(\0132*.google.cloud.compute.v1.Network" - + "Attachment\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next" + + "\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachable" + + "s\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google." + + "cloud.compute.v1.WarningH\004\210\001\001\032[\n\nItemsEn" + + "try\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-.google" + + ".cloud.compute.v1.NodeGroupsScopedList:\002" + + "8\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014" + + "\n\n_self_linkB\n\n\010_warning\"\360\001\n\032NodeGroupAu" + + "toscalingPolicy\022\032\n\tmax_nodes\030\226\200\376\215\001 \001(\005H\000" + + "\210\001\001\022\032\n\tmin_nodes\030\204\255\252\376\001 \001(\005H\001\210\001\001\022\024\n\004mode\030" + + "\243\363\314\001 \001(\tH\002\210\001\001\"_\n\004Mode\022\022\n\016UNDEFINED_MODE\020" + + "\000\022\030\n\020MODE_UNSPECIFIED\020\373\244\211\261\001\022\t\n\003OFF\020\317\342\004\022\007" + + "\n\002ON\020\337\023\022\025\n\016ONLY_SCALE_OUT\020\306\363\350HB\014\n\n_max_n" + + "odesB\014\n\n_min_nodesB\007\n\005_mode\"\243\002\n\rNodeGrou" + + "pList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0224\n\005items\030\300\317\367/ \003(" + + "\0132\".google.cloud.compute.v1.NodeGroup\022\024\n" + + "\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225" + + "\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001" + + "\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comp" + + "ute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_" + + "next_page_tokenB\014\n\n_self_linkB\n\n\010_warnin" + + "g\"\252\001\n\032NodeGroupMaintenanceWindow\022H\n\024main" + + "tenance_duration\030\300\242\275\372\001 \001(\0132!.google.clou" + + "d.compute.v1.DurationH\000\210\001\001\022\032\n\nstart_time" + + "\030\212\351\356\021 \001(\tH\001\210\001\001B\027\n\025_maintenance_durationB" + + "\r\n\013_start_time\"\242\010\n\rNodeGroupNode\022D\n\014acce" + + "lerators\030\350\326\305\200\001 \003(\0132*.google.cloud.comput" + + "e.v1.AcceleratorConfig\022U\n\022consumed_resou" + + "rces\030\216\365\301\237\001 \001(\01320.google.cloud.compute.v1" + + ".InstanceConsumptionInfoH\000\210\001\001\022#\n\023cpu_ove" + + "rcommit_type\030\327\216\220v \001(\tH\001\210\001\001\0224\n\005disks\030\366\314\312-" + + " \003(\0132\".google.cloud.compute.v1.LocalDisk" + + "\022V\n\031instance_consumption_data\030\270\320\262( \003(\01320" + + ".google.cloud.compute.v1.InstanceConsump" + + "tionData\022\024\n\tinstances\030\376\374\357\r \003(\t\022\024\n\004name\030\213" + + "\365\315\001 \001(\tH\002\210\001\001\022\032\n\tnode_type\030\327\226\220\336\001 \001(\tH\003\210\001\001" + + "\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001(\010H\004\210\001\001\022F\n\016serv" + + "er_binding\030\211\243\242c \001(\0132&.google.cloud.compu" + + "te.v1.ServerBindingH\005\210\001\001\022\032\n\tserver_id\030\227\257" + + "\355\241\001 \001(\tH\006\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\007\210\001\001\022Q\n\017" + + "total_resources\030\352\235\271. \001(\01320.google.cloud." + + "compute.v1.InstanceConsumptionInfoH\010\210\001\001\"" + + "|\n\021CpuOvercommitType\022!\n\035UNDEFINED_CPU_OV" + + "ERCOMMIT_TYPE\020\000\022\'\n\037CPU_OVERCOMMIT_TYPE_U" + + "NSPECIFIED\020\217\364\242\370\001\022\016\n\007ENABLED\020\241\256\354V\022\013\n\004NONE" + + "\020\270\316\222\001\"t\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\020\n" + + "\010CREATING\020\271\275\235\331\001\022\020\n\010DELETING\020\250\247\207\374\001\022\017\n\007INV" + + "ALID\020\327\373\355\374\001\022\014\n\005READY\020\203\303\217%\022\021\n\tREPAIRING\020\225\202" + + "\225\305\001B\025\n\023_consumed_resourcesB\026\n\024_cpu_overc" + + "ommit_typeB\007\n\005_nameB\014\n\n_node_typeB\020\n\016_sa" + + "tisfies_pzsB\021\n\017_server_bindingB\014\n\n_serve" + + "r_idB\t\n\007_statusB\022\n\020_total_resources\"\\\n\031N" + + "odeGroupsAddNodesRequest\022%\n\025additional_n" + + "ode_count\030\252\317\257@ \001(\005H\000\210\001\001B\030\n\026_additional_n" + + "ode_count\"0\n\034NodeGroupsDeleteNodesReques" + + "t\022\020\n\005nodes\030\261\245\2102 \003(\t\"\255\002\n\023NodeGroupsListNo" + + "des\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0228\n\005items\030\300\317\367/ \003(\0132" + + "&.google.cloud.compute.v1.NodeGroupNode\022" + + "\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token" + + "\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210" + + "\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.co" + + "mpute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n" + + "\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_warn" + + "ing\"\231\001\n\024NodeGroupsScopedList\022:\n\013node_gro" + + "ups\030\261\205\363\" \003(\0132\".google.cloud.compute.v1.N" + + "odeGroup\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cl" + + "oud.compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"" + + "T\n NodeGroupsSetNodeTemplateRequest\022\036\n\rn" + + "ode_template\030\227\344\213\232\001 \001(\tH\000\210\001\001B\020\n\016_node_tem" + + "plate\"=\n)NodeGroupsSimulateMaintenanceEv" + + "entRequest\022\020\n\005nodes\030\261\245\2102 \003(\t\"\251\t\n\014NodeTem" + + "plate\022D\n\014accelerators\030\350\326\305\200\001 \003(\0132*.google" + + ".cloud.compute.v1.AcceleratorConfig\022#\n\023c" + + "pu_overcommit_type\030\327\216\220v \001(\tH\000\210\001\001\022\"\n\022crea" + + "tion_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013descript" + + "ion\030\374\207\326\311\001 \001(\tH\002\210\001\001\0224\n\005disks\030\366\314\312- \003(\0132\".g" + + "oogle.cloud.compute.v1.LocalDisk\022\020\n\002id\030\233" + + "\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name" + + "\030\213\365\315\001 \001(\tH\005\210\001\001\022_\n\024node_affinity_labels\030\271" + + "\255\323\241\001 \003(\0132=.google.cloud.compute.v1.NodeT" + + "emplate.NodeAffinityLabelsEntry\022\032\n\tnode_" + + "type\030\327\226\220\336\001 \001(\tH\006\210\001\001\022`\n\025node_type_flexibi" + + "lity\030\261\350\251\226\001 \001(\01328.google.cloud.compute.v1" + + ".NodeTemplateNodeTypeFlexibilityH\007\210\001\001\022\026\n" + + "\006region\030\364\315\240B \001(\tH\010\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" + + " \001(\tH\t\210\001\001\022F\n\016server_binding\030\211\243\242c \001(\0132&.g" + + "oogle.cloud.compute.v1.ServerBindingH\n\210\001" + + "\001\022\026\n\006status\030\362\237\267V \001(\tH\013\210\001\001\022\037\n\016status_mess" + + "age\030\272\311\351\215\001 \001(\tH\014\210\001\001\0329\n\027NodeAffinityLabels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"|\n" + + "\021CpuOvercommitType\022!\n\035UNDEFINED_CPU_OVER" + + "COMMIT_TYPE\020\000\022\'\n\037CPU_OVERCOMMIT_TYPE_UNS" + + "PECIFIED\020\217\364\242\370\001\022\016\n\007ENABLED\020\241\256\354V\022\013\n\004NONE\020\270" + + "\316\222\001\"a\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\020\n\010C" + + "REATING\020\271\275\235\331\001\022\020\n\010DELETING\020\250\247\207\374\001\022\017\n\007INVAL" + + "ID\020\327\373\355\374\001\022\014\n\005READY\020\203\303\217%B\026\n\024_cpu_overcommi" + + "t_typeB\025\n\023_creation_timestampB\016\n\014_descri" + + "ptionB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\014\n\n_node_" + + "typeB\030\n\026_node_type_flexibilityB\t\n\007_regio" + + "nB\014\n\n_self_linkB\021\n\017_server_bindingB\t\n\007_s" + + "tatusB\021\n\017_status_message\"\305\003\n\032NodeTemplat" + + "eAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022P\n\005ite" + + "ms\030\300\317\367/ \003(\0132>.google.cloud.compute.v1.No" + + "deTemplateAggregatedList.ItemsEntry\022\024\n\004k" + + "ind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206" + + "& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027" + + "\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 " + + "\001(\0132 .google.cloud.compute.v1.WarningH\004\210" + + "\001\001\032^\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022?\n\005value\030\002" + + " \001(\01320.google.cloud.compute.v1.NodeTempl" + + "atesScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_n" + + "ext_page_tokenB\014\n\n_self_linkB\n\n\010_warning" + + "\"\251\002\n\020NodeTemplateList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022" + + "7\n\005items\030\300\317\367/ \003(\0132%.google.cloud.compute" + + ".v1.NodeTemplate\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037" + + "\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_" + + "link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132" + + " .google.cloud.compute.v1.WarningH\004\210\001\001B\005" + + "\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_s" + + "elf_linkB\n\n\010_warning\"\216\001\n\037NodeTemplateNod" + + "eTypeFlexibility\022\024\n\004cpus\030\313\347\272\001 \001(\tH\000\210\001\001\022\032" + + "\n\tlocal_ssd\030\260\276\274\301\001 \001(\tH\001\210\001\001\022\027\n\006memory\030\201\372\212" + + "\376\001 \001(\tH\002\210\001\001B\007\n\005_cpusB\014\n\n_local_ssdB\t\n\007_m" + + "emory\"\243\001\n\027NodeTemplatesScopedList\022A\n\016nod" + + "e_templates\030\274\242\355\250\001 \003(\0132%.google.cloud.com" + + "pute.v1.NodeTemplate\0229\n\007warning\030\234\337\226\030 \001(\013" + + "2 .google.cloud.compute.v1.WarningH\000\210\001\001B" + + "\n\n\010_warning\"\240\004\n\010NodeType\022\035\n\014cpu_platform" + + "\030\252\352\321\303\001 \001(\tH\000\210\001\001\022\"\n\022creation_timestamp\030\266\217" + + "\307\016 \001(\tH\001\210\001\001\022G\n\ndeprecated\030\263\313\321\365\001 \001(\0132*.go" + + "ogle.cloud.compute.v1.DeprecationStatusH" + + "\002\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\003\210\001\001\022\033\n\ngu" + + "est_cpus\030\322\313\310\273\001 \001(\005H\004\210\001\001\022\020\n\002id\030\233\032 \001(\004H\005\210\001" + + "\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\006\210\001\001\022\035\n\014local_ssd_gb\030" + + "\312\210\377\234\001 \001(\005H\007\210\001\001\022\031\n\tmemory_mb\030\223\223\2507 \001(\005H\010\210\001" + + "\001\022\024\n\004name\030\213\365\315\001 \001(\tH\t\210\001\001\022\032\n\tself_link\030\215\222\305" + + "\331\001 \001(\tH\n\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH\013\210\001\001B\017\n\r_cp" + + "u_platformB\025\n\023_creation_timestampB\r\n\013_de" + + "precatedB\016\n\014_descriptionB\r\n\013_guest_cpusB" + + "\005\n\003_idB\007\n\005_kindB\017\n\r_local_ssd_gbB\014\n\n_mem" + + "ory_mbB\007\n\005_nameB\014\n\n_self_linkB\007\n\005_zone\"\271" + + "\003\n\026NodeTypeAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000" + + "\210\001\001\022L\n\005items\030\300\317\367/ \003(\0132:.google.cloud.com" + + "pute.v1.NodeTypeAggregatedList.ItemsEntr" + + "y\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_tok" + + "en\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH" + + "\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning" + + "\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warn" + + "ingH\004\210\001\001\032Z\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022;\n\005v" + + "alue\030\002 \001(\0132,.google.cloud.compute.v1.Nod" + + "eTypesScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020" + + "_next_page_tokenB\014\n\n_self_linkB\n\n\010_warni" + + "ng\"\241\002\n\014NodeTypeList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0223\n" + + "\005items\030\300\317\367/ \003(\0132!.google.cloud.compute.v" + + "1.NodeType\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next" + "_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215" + "\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .goog" + "le.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB" + "\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_li" - + "nkB\n\n\010_warning\"\262\001\n\034NetworkAttachmentsSco" - + "pedList\022K\n\023network_attachments\030\237\336\326\370\001 \003(\013" - + "2*.google.cloud.compute.v1.NetworkAttach" - + "ment\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud." - + "compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\304\003\n\032" - + "NetworkEdgeSecurityService\022\"\n\022creation_t" - + "imestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207" - + "\326\311\001 \001(\tH\001\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\002\210\001" - + "\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001" - + "\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\026\n\006region\030\364\315\240B \001" - + "(\tH\006\210\001\001\022\037\n\017security_policy\030\221\206\312Q \001(\tH\007\210\001\001" - + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022!\n\021self_lin" - + "k_with_id\030\202\254\235\025 \001(\tH\t\210\001\001B\025\n\023_creation_tim" - + "estampB\016\n\014_descriptionB\016\n\014_fingerprintB\005" - + "\n\003_idB\007\n\005_kindB\007\n\005_nameB\t\n\007_regionB\022\n\020_s" - + "ecurity_policyB\014\n\n_self_linkB\024\n\022_self_li" - + "nk_with_id\"\216\004\n(NetworkEdgeSecurityServic" - + "eAggregatedList\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\022\020\n" - + "\002id\030\233\032 \001(\tH\001\210\001\001\022^\n\005items\030\300\317\367/ \003(\0132L.goog" - + "le.cloud.compute.v1.NetworkEdgeSecurityS" - + "erviceAggregatedList.ItemsEntry\022\024\n\004kind\030" - + "\224\367\310\001 \001(\tH\002\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(" - + "\tH\003\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\004\210\001\001\022\027\n\014un" - + "reachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132" - + " .google.cloud.compute.v1.WarningH\005\210\001\001\032l" - + "\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022M\n\005value\030\002 \001(\013" - + "2>.google.cloud.compute.v1.NetworkEdgeSe" - + "curityServicesScopedList:\0028\001B\007\n\005_etagB\005\n" - + "\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_se" - + "lf_linkB\n\n\010_warning\"\316\001\n%NetworkEdgeSecur" - + "ityServicesScopedList\022^\n\036network_edge_se" - + "curity_services\030\254\313\370\020 \003(\01323.google.cloud." - + "compute.v1.NetworkEdgeSecurityService\0229\n" - + "\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compute" - + ".v1.WarningH\000\210\001\001B\n\n\010_warning\"\251\002\n\017Network" - + "Endpoint\022Q\n\013annotations\030\244\366\2655 \003(\01329.googl" - + "e.cloud.compute.v1.NetworkEndpoint.Annot" - + "ationsEntry\022\024\n\004fqdn\030\225\245\300\001 \001(\tH\000\210\001\001\022\030\n\010ins" - + "tance\030\225\251\332\010 \001(\tH\001\210\001\001\022\033\n\nip_address\030\334\361\334\301\001 " - + "\001(\tH\002\210\001\001\022\024\n\004port\030\201\261\322\001 \001(\005H\003\210\001\001\0322\n\020Annota" - + "tionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - + "8\001B\007\n\005_fqdnB\013\n\t_instanceB\r\n\013_ip_addressB" - + "\007\n\005_port\"\357\n\n\024NetworkEndpointGroup\022V\n\013ann" - + "otations\030\244\366\2655 \003(\0132>.google.cloud.compute" - + ".v1.NetworkEndpointGroup.AnnotationsEntr" - + "y\022S\n\napp_engine\030\240\214\300\242\001 \001(\01326.google.cloud" - + ".compute.v1.NetworkEndpointGroupAppEngin" - + "eH\000\210\001\001\022[\n\016cloud_function\030\242\345\363\367\001 \001(\0132:.goo" - + "gle.cloud.compute.v1.NetworkEndpointGrou" - + "pCloudFunctionH\001\210\001\001\022P\n\tcloud_run\030\201\313\3724 \001(" - + "\01325.google.cloud.compute.v1.NetworkEndpo" - + "intGroupCloudRunH\002\210\001\001\022\"\n\022creation_timest" - + "amp\030\266\217\307\016 \001(\tH\003\210\001\001\022\035\n\014default_port\030\277\367\360\311\001 " - + "\001(\005H\004\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\005\210\001\001\022\020" - + "\n\002id\030\233\032 \001(\004H\006\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\007\210\001\001\022\024" - + "\n\004name\030\213\365\315\001 \001(\tH\010\210\001\001\022\027\n\007network\030\256\264\205o \001(\t" - + "H\t\210\001\001\022%\n\025network_endpoint_type\030\323\306\2648 \001(\tH" - + "\n\210\001\001\022N\n\010psc_data\030\311\333\246\" \001(\01324.google.cloud" - + ".compute.v1.NetworkEndpointGroupPscDataH" - + "\013\210\001\001\022#\n\022psc_target_service\030\346\302\252\200\001 \001(\tH\014\210\001" - + "\001\022\026\n\006region\030\364\315\240B \001(\tH\r\210\001\001\022\032\n\tself_link\030\215" - + "\222\305\331\001 \001(\tH\016\210\001\001\022\024\n\004size\030\201\300\327\001 \001(\005H\017\210\001\001\022\033\n\ns" - + "ubnetwork\030\356\247\344\222\001 \001(\tH\020\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(" - + "\tH\021\210\001\001\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001\"\360\001\n\023NetworkEndpointTy" - + "pe\022#\n\037UNDEFINED_NETWORK_ENDPOINT_TYPE\020\000\022" - + "\021\n\tGCE_VM_IP\020\331\355\320\277\001\022\026\n\016GCE_VM_IP_PORT\020\247\344\245" - + "\357\001\022\032\n\022INTERNET_FQDN_PORT\020\355\320\333\300\001\022\030\n\020INTERN" - + "ET_IP_PORT\020\233\333\345\343\001\022\037\n\027NON_GCP_PRIVATE_IP_P" - + "ORT\020\340\223\267\240\001\022\036\n\027PRIVATE_SERVICE_CONNECT\020\304\364\371" - + "\026\022\022\n\nSERVERLESS\020\334\306\375\200\001B\r\n\013_app_engineB\021\n\017" - + "_cloud_functionB\014\n\n_cloud_runB\025\n\023_creati" - + "on_timestampB\017\n\r_default_portB\016\n\014_descri" - + "ptionB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\n\n\010_netwo" - + "rkB\030\n\026_network_endpoint_typeB\013\n\t_psc_dat" - + "aB\025\n\023_psc_target_serviceB\t\n\007_regionB\014\n\n_" - + "self_linkB\007\n\005_sizeB\r\n\013_subnetworkB\007\n\005_zo" - + "ne\"\335\003\n\"NetworkEndpointGroupAggregatedLis" - + "t\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022X\n\005items\030\300\317\367/ \003(\0132F." - + "google.cloud.compute.v1.NetworkEndpointG" - + "roupAggregatedList.ItemsEntry\022\024\n\004kind\030\224\367" - + "\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH" - + "\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unre" - + "achables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 ." - + "google.cloud.compute.v1.WarningH\004\210\001\001\032f\n\n" - + "ItemsEntry\022\013\n\003key\030\001 \001(\t\022G\n\005value\030\002 \001(\01328" - + ".google.cloud.compute.v1.NetworkEndpoint" - + "GroupsScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020" - + "_next_page_tokenB\014\n\n_self_linkB\n\n\010_warni" - + "ng\"\222\001\n\035NetworkEndpointGroupAppEngine\022\030\n\007" - + "service\030\265\215\217\262\001 \001(\tH\000\210\001\001\022\030\n\010url_mask\030\274\217\2441 " - + "\001(\tH\001\210\001\001\022\030\n\007version\030\330\271\324\247\001 \001(\tH\002\210\001\001B\n\n\010_s" - + "erviceB\013\n\t_url_maskB\n\n\010_version\"r\n!Netwo" - + "rkEndpointGroupCloudFunction\022\031\n\010function" - + "\030\330\347\275\222\001 \001(\tH\000\210\001\001\022\030\n\010url_mask\030\274\217\2441 \001(\tH\001\210\001" - + "\001B\013\n\t_functionB\013\n\t_url_mask\"\207\001\n\034NetworkE" - + "ndpointGroupCloudRun\022\030\n\007service\030\265\215\217\262\001 \001(" - + "\tH\000\210\001\001\022\022\n\003tag\030\232\377\006 \001(\tH\001\210\001\001\022\030\n\010url_mask\030\274" - + "\217\2441 \001(\tH\002\210\001\001B\n\n\010_serviceB\006\n\004_tagB\013\n\t_url" - + "_mask\"\271\002\n\030NetworkEndpointGroupList\022\020\n\002id" + + "nkB\n\n\010_warning\"\227\001\n\023NodeTypesScopedList\0229" + + "\n\nnode_types\030\374\277\365\345\001 \003(\0132!.google.cloud.co" + + "mpute.v1.NodeType\0229\n\007warning\030\234\337\226\030 \001(\0132 ." + + "google.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010" + + "_warning\"\220\003\n\024NotificationEndpoint\022\"\n\022cre" + + "ation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013descrip" + + "tion\030\374\207\326\311\001 \001(\tH\001\210\001\001\022Y\n\rgrpc_settings\030\244\306\300" + + "\331\001 \001(\01329.google.cloud.compute.v1.Notific" + + "ationEndpointGrpcSettingsH\002\210\001\001\022\020\n\002id\030\233\032 " + + "\001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213" + + "\365\315\001 \001(\tH\005\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\006\210\001\001\022\032\n\t" + + "self_link\030\215\222\305\331\001 \001(\tH\007\210\001\001B\025\n\023_creation_ti" + + "mestampB\016\n\014_descriptionB\020\n\016_grpc_setting" + + "sB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\t\n\007_regionB\014\n" + + "\n_self_link\"\267\002\n NotificationEndpointGrpc" + + "Settings\022\032\n\tauthority\030\303\216\320\277\001 \001(\tH\000\210\001\001\022\030\n\010" + + "endpoint\030\225\273\234> \001(\tH\001\210\001\001\022\035\n\014payload_name\030\234" + + "\265\234\217\001 \001(\tH\002\210\001\001\022C\n\017resend_interval\030\311\270\210\344\001 \001" + + "(\0132!.google.cloud.compute.v1.DurationH\003\210" + + "\001\001\022\"\n\022retry_duration_sec\030\335\316\2247 \001(\rH\004\210\001\001B\014" + + "\n\n_authorityB\013\n\t_endpointB\017\n\r_payload_na" + + "meB\022\n\020_resend_intervalB\025\n\023_retry_duratio" + + "n_sec\"\271\002\n\030NotificationEndpointList\022\020\n\002id" + "\030\233\032 \001(\tH\000\210\001\001\022?\n\005items\030\300\317\367/ \003(\0132-.google." - + "cloud.compute.v1.NetworkEndpointGroup\022\024\n" + + "cloud.compute.v1.NotificationEndpoint\022\024\n" + "\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225" + "\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001" + "\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comp" + "ute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_" + "next_page_tokenB\014\n\n_self_linkB\n\n\010_warnin" - + "g\"\213\003\n\033NetworkEndpointGroupPscData\022%\n\024con" - + "sumer_psc_address\030\254\255\353\327\001 \001(\tH\000\210\001\001\022\"\n\021psc_" - + "connection_id\030\335\245\243\213\001 \001(\004H\001\210\001\001\022%\n\025psc_conn" - + "ection_status\030\264\311\347W \001(\tH\002\210\001\001\"\260\001\n\023PscConne" - + "ctionStatus\022#\n\037UNDEFINED_PSC_CONNECTION_" - + "STATUS\020\000\022\017\n\010ACCEPTED\020\247\237\322u\022\016\n\006CLOSED\020\354\252\243\265" - + "\001\022\027\n\017NEEDS_ATTENTION\020\274\213\242\244\001\022\016\n\007PENDING\020\367\252" - + "\360\020\022\017\n\010REJECTED\020\376\210\204S\022\031\n\022STATUS_UNSPECIFIE" - + "D\020\312\314\213\024B\027\n\025_consumer_psc_addressB\024\n\022_psc_" - + "connection_idB\030\n\026_psc_connection_status\"" - + "u\n+NetworkEndpointGroupsAttachEndpointsR" - + "equest\022F\n\021network_endpoints\030\255\221\272G \003(\0132(.g" - + "oogle.cloud.compute.v1.NetworkEndpoint\"u" - + "\n+NetworkEndpointGroupsDetachEndpointsRe" - + "quest\022F\n\021network_endpoints\030\255\221\272G \003(\0132(.go" - + "ogle.cloud.compute.v1.NetworkEndpoint\"\244\001" - + "\n)NetworkEndpointGroupsListEndpointsRequ" - + "est\022\036\n\rhealth_status\030\265\326\272\265\001 \001(\tH\000\210\001\001\"E\n\014H" - + "ealthStatus\022\033\n\027UNDEFINED_HEALTH_STATUS\020\000" - + "\022\013\n\004SHOW\020\375\245\233\001\022\013\n\004SKIP\020\377\272\233\001B\020\n\016_health_st" - + "atus\"\253\002\n)NetworkEndpointGroupsListNetwor" - + "kEndpoints\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022J\n\005items\030\300\317" - + "\367/ \003(\01328.google.cloud.compute.v1.Network" - + "EndpointWithHealthStatus\022\024\n\004kind\030\224\367\310\001 \001(" + + "g\"\333\t\n\tOperation\022$\n\023client_operation_id\030\347" + + "\215\336\215\001 \001(\tH\000\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016" + + " \001(\tH\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022" + + "\030\n\010end_time\030\261\247\3476 \001(\tH\003\210\001\001\0225\n\005error\030\210\244\223. " + + "\001(\0132\036.google.cloud.compute.v1.ErrorH\004\210\001\001" + + "\022\'\n\022http_error_message\030\331\372\310` \001(\tB\003\350G\004H\005\210\001" + + "\001\022,\n\026http_error_status_code\030\354\204\370\224\001 \001(\005B\003\350" + + "G\003H\006\210\001\001\022\020\n\002id\030\233\032 \001(\004H\007\210\001\001\022\034\n\013insert_time" + + "\030\223\251\350\316\001 \001(\tH\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\t\210\001\001\022\031\n" + + "\004name\030\213\365\315\001 \001(\tB\003\350G\001H\n\210\001\001\022\"\n\022operation_gr" + + "oup_id\030\263\355\223\023 \001(\tH\013\210\001\001\022\036\n\016operation_type\030\222" + + "\366\332T \001(\tH\014\210\001\001\022\030\n\010progress\030\255\204\323\" \001(\005H\r\210\001\001\022\026" + + "\n\006region\030\364\315\240B \001(\tH\016\210\001\001\022\032\n\tself_link\030\215\222\305\331" + + "\001 \001(\tH\017\210\001\001\022\032\n\nstart_time\030\212\351\356\021 \001(\tH\020\210\001\001\022F" + + "\n\006status\030\362\237\267V \001(\0162).google.cloud.compute" + + ".v1.Operation.StatusB\003\350G\002H\021\210\001\001\022\037\n\016status" + + "_message\030\272\311\351\215\001 \001(\tH\022\210\001\001\022\031\n\ttarget_id\030\211\225\215" + + "{ \001(\004H\023\210\001\001\022\033\n\013target_link\030\350\223\361\035 \001(\tH\024\210\001\001\022" + + "\024\n\004user\030\313\327\333\001 \001(\tH\025\210\001\001\0227\n\010warnings\030\327\210\301\355\001 " + + "\003(\0132!.google.cloud.compute.v1.Warnings\022\024" + + "\n\004zone\030\254\307\344\001 \001(\tH\026\210\001\001\"K\n\006Status\022\024\n\020UNDEFI" + + "NED_STATUS\020\000\022\013\n\004DONE\020\202\267\200\001\022\016\n\007PENDING\020\367\252\360" + + "\020\022\016\n\007RUNNING\020\237\303\3529B\026\n\024_client_operation_i" + + "dB\025\n\023_creation_timestampB\016\n\014_description" + + "B\013\n\t_end_timeB\010\n\006_errorB\025\n\023_http_error_m" + + "essageB\031\n\027_http_error_status_codeB\005\n\003_id" + + "B\016\n\014_insert_timeB\007\n\005_kindB\007\n\005_nameB\025\n\023_o" + + "peration_group_idB\021\n\017_operation_typeB\013\n\t" + + "_progressB\t\n\007_regionB\014\n\n_self_linkB\r\n\013_s" + + "tart_timeB\t\n\007_statusB\021\n\017_status_messageB" + + "\014\n\n_target_idB\016\n\014_target_linkB\007\n\005_userB\007" + + "\n\005_zone\"\274\003\n\027OperationAggregatedList\022\020\n\002i" + + "d\030\233\032 \001(\tH\000\210\001\001\022M\n\005items\030\300\317\367/ \003(\0132;.google" + + ".cloud.compute.v1.OperationAggregatedLis" + + "t.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" + + "xt_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link" + + "\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t" + + "\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comp" + + "ute.v1.WarningH\004\210\001\001\032[\n\nItemsEntry\022\013\n\003key" + + "\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-.google.cloud.com" + + "pute.v1.OperationsScopedList:\0028\001B\005\n\003_idB" + + "\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_li" + + "nkB\n\n\010_warning\"\243\002\n\rOperationList\022\020\n\002id\030\233" + + "\032 \001(\tH\000\210\001\001\0224\n\005items\030\300\317\367/ \003(\0132\".google.cl" + + "oud.compute.v1.Operation\022\024\n\004kind\030\224\367\310\001 \001(" + "\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022" - + "9\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compu" - + "te.v1.WarningH\003\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_n" - + "ext_page_tokenB\n\n\010_warning\"\273\001\n\037NetworkEn" - + "dpointGroupsScopedList\022Q\n\027network_endpoi" - + "nt_groups\030\255\227\377\r \003(\0132-.google.cloud.comput" - + "e.v1.NetworkEndpointGroup\0229\n\007warning\030\234\337\226" - + "\030 \001(\0132 .google.cloud.compute.v1.WarningH" - + "\000\210\001\001B\n\n\010_warning\"\317\001\n\037NetworkEndpointWith" - + "HealthStatus\022K\n\007healths\030\227\223\255{ \003(\01327.googl" - + "e.cloud.compute.v1.HealthStatusForNetwor", - "kEndpoint\022J\n\020network_endpoint\030\206\221\212\033 \001(\0132(" - + ".google.cloud.compute.v1.NetworkEndpoint" - + "H\000\210\001\001B\023\n\021_network_endpoint\"\201\t\n\020NetworkIn" - + "terface\022@\n\016access_configs\030\226\273\3724 \003(\0132%.goo" - + "gle.cloud.compute.v1.AccessConfig\022A\n\017ali" - + "as_ip_ranges\030\277\203\334N \003(\0132%.google.cloud.com" - + "pute.v1.AliasIpRange\022\033\n\013fingerprint\030\344\321\363o" - + " \001(\tH\000\210\001\001\022+\n\033internal_ipv6_prefix_length" - + "\030\235\203\231a \001(\005H\001\210\001\001\022F\n\023ipv6_access_configs\030\356\345" - + "\304\346\001 \003(\0132%.google.cloud.compute.v1.Access" - + "Config\022!\n\020ipv6_access_type\030\335\365\321\360\001 \001(\tH\002\210\001" - + "\001\022\035\n\014ipv6_address\030\234\263\357\242\001 \001(\tH\003\210\001\001\022\024\n\004kind" - + "\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\027\n\007" - + "network\030\256\264\205o \001(\tH\006\210\001\001\022\"\n\022network_attachm" - + "ent\030\324\227\217k \001(\tH\007\210\001\001\022\033\n\013network_i_p\030\211\261\345b \001(" - + "\tH\010\210\001\001\022\030\n\010nic_type\030\221\306\302\034 \001(\tH\t\210\001\001\022\034\n\013queu" - + "e_count\030\341\370\227\360\001 \001(\005H\n\210\001\001\022\033\n\nstack_type\030\221\265\213" - + "\313\001 \001(\tH\013\210\001\001\022\033\n\nsubnetwork\030\356\247\344\222\001 \001(\tH\014\210\001\001" - + "\"y\n\016Ipv6AccessType\022\036\n\032UNDEFINED_IPV6_ACC" - + "ESS_TYPE\020\000\022\017\n\010EXTERNAL\020\313\247\375\020\022\020\n\010INTERNAL\020" - + "\275\355\226\205\001\022$\n\034UNSPECIFIED_IPV6_ACCESS_TYPE\020\245\366" - + "\244\225\001\"`\n\007NicType\022\026\n\022UNDEFINED_NIC_TYPE\020\000\022\014" - + "\n\005GVNIC\020\231\225\303 \022\033\n\024UNSPECIFIED_NIC_TYPE\020\331\276\222" - + " \022\022\n\nVIRTIO_NET\020\331\266\313\327\001\"i\n\tStackType\022\030\n\024UN" - + "DEFINED_STACK_TYPE\020\000\022\020\n\tIPV4_IPV6\020\201\350\312\n\022\020" - + "\n\tIPV4_ONLY\020\246\313\325\n\022\036\n\026UNSPECIFIED_STACK_TY" - + "PE\020\331\321\221\216\001B\016\n\014_fingerprintB\036\n\034_internal_ip" - + "v6_prefix_lengthB\023\n\021_ipv6_access_typeB\017\n" - + "\r_ipv6_addressB\007\n\005_kindB\007\n\005_nameB\n\n\010_net" - + "workB\025\n\023_network_attachmentB\016\n\014_network_" - + "i_pB\013\n\t_nic_typeB\016\n\014_queue_countB\r\n\013_sta" - + "ck_typeB\r\n\013_subnetwork\"\237\002\n\013NetworkList\022\020" - + "\n\002id\030\233\032 \001(\tH\000\210\001\001\0222\n\005items\030\300\317\367/ \003(\0132 .goo" - + "gle.cloud.compute.v1.Network\022\024\n\004kind\030\224\367\310" - + "\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002" - + "\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warni" - + "ng\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Wa" - + "rningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page" - + "_tokenB\014\n\n_self_linkB\n\n\010_warning\"\272\006\n\016Net" - + "workPeering\022\"\n\022auto_create_routes\030\335\342\262\033 \001" - + "(\010H\000\210\001\001\022&\n\026exchange_subnet_routes\030\320\312\306\014 \001" - + "(\010H\001\210\001\001\022$\n\024export_custom_routes\030\215\245\337\034 \001(\010" - + "H\002\210\001\001\0223\n#export_subnet_routes_with_publi" - + "c_ip\030\342\352\331. \001(\010H\003\210\001\001\022$\n\024import_custom_rout" - + "es\030\276\361\263^ \001(\010H\004\210\001\001\0223\n#import_subnet_routes" - + "_with_public_ip\030\221\216\360\006 \001(\010H\005\210\001\001\022\024\n\004name\030\213\365" - + "\315\001 \001(\tH\006\210\001\001\022\027\n\007network\030\256\264\205o \001(\tH\007\210\001\001\022\030\n\010" - + "peer_mtu\030\321\216\227! \001(\005H\010\210\001\001\022\033\n\nstack_type\030\221\265\213" - + "\313\001 \001(\tH\t\210\001\001\022\025\n\005state\030\221\211\2534 \001(\tH\n\210\001\001\022\035\n\rst" - + "ate_details\030\224\371\310- \001(\tH\013\210\001\001\"I\n\tStackType\022\030" - + "\n\024UNDEFINED_STACK_TYPE\020\000\022\020\n\tIPV4_IPV6\020\201\350" - + "\312\n\022\020\n\tIPV4_ONLY\020\246\313\325\n\">\n\005State\022\023\n\017UNDEFIN" - + "ED_STATE\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\020\n\010INACTIVE\020\353" - + "\230\371\200\001B\025\n\023_auto_create_routesB\031\n\027_exchange" - + "_subnet_routesB\027\n\025_export_custom_routesB" - + "&\n$_export_subnet_routes_with_public_ipB" - + "\027\n\025_import_custom_routesB&\n$_import_subn" - + "et_routes_with_public_ipB\007\n\005_nameB\n\n\010_ne" - + "tworkB\013\n\t_peer_mtuB\r\n\013_stack_typeB\010\n\006_st" - + "ateB\020\n\016_state_details\"\316\001\n\030NetworkPerform" - + "anceConfig\022+\n\033total_egress_bandwidth_tie" - + "r\030\377\237\205> \001(\tH\000\210\001\001\"e\n\030TotalEgressBandwidthT" - + "ier\022)\n%UNDEFINED_TOTAL_EGRESS_BANDWIDTH_" - + "TIER\020\000\022\016\n\007DEFAULT\020\241\304\3756\022\016\n\006TIER_1\020\224\312\361\233\001B\036" - + "\n\034_total_egress_bandwidth_tier\"\222\001\n\024Netwo" - + "rkRoutingConfig\022\035\n\014routing_mode\030\374\272\310\342\001 \001(" - + "\tH\000\210\001\001\"J\n\013RoutingMode\022\032\n\026UNDEFINED_ROUTI" - + "NG_MODE\020\000\022\016\n\006GLOBAL\020\243\357\357\353\001\022\017\n\010REGIONAL\020\237\354" - + "\200,B\017\n\r_routing_mode\"\204\002\n\031NetworksAddPeeri" - + "ngRequest\022\"\n\022auto_create_routes\030\335\342\262\033 \001(\010" - + "H\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001\001\022I\n\017network_p" - + "eering\030\257\214\354\234\001 \001(\0132\'.google.cloud.compute." - + "v1.NetworkPeeringH\002\210\001\001\022\035\n\014peer_network\030\321" - + "\340\333\356\001 \001(\tH\003\210\001\001B\025\n\023_auto_create_routesB\007\n\005" - + "_nameB\022\n\020_network_peeringB\017\n\r_peer_netwo" - + "rk\"\326\001\n%NetworksGetEffectiveFirewallsResp" - + "onse\022s\n\020firewall_policys\030\302\312\374\303\001 \003(\0132U.goo" - + "gle.cloud.compute.v1.NetworksGetEffectiv" - + "eFirewallsResponseEffectiveFirewallPolic" - + "y\0228\n\tfirewalls\030\363\306\350\201\001 \003(\0132!.google.cloud." - + "compute.v1.Firewall\"\352\002\n.google.cloud.compute.v1.NodeTemplateAg" - + "gregatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\t" - + "H\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032" - + "\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachabl" - + "es\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google" - + ".cloud.compute.v1.WarningH\004\210\001\001\032^\n\nItemsE" - + "ntry\022\013\n\003key\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.googl" - + "e.cloud.compute.v1.NodeTemplatesScopedLi" - + "st:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tok" - + "enB\014\n\n_self_linkB\n\n\010_warning\"\251\002\n\020NodeTem" - + "plateList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0227\n\005items\030\300\317\367" - + "/ \003(\0132%.google.cloud.compute.v1.NodeTemp" - + "late\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_" - + "token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001" - + "(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clo" - + "ud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_ki" - + "ndB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010" - + "_warning\"\216\001\n\037NodeTemplateNodeTypeFlexibi" - + "lity\022\024\n\004cpus\030\313\347\272\001 \001(\tH\000\210\001\001\022\032\n\tlocal_ssd\030" - + "\260\276\274\301\001 \001(\tH\001\210\001\001\022\027\n\006memory\030\201\372\212\376\001 \001(\tH\002\210\001\001B" - + "\007\n\005_cpusB\014\n\n_local_ssdB\t\n\007_memory\"\243\001\n\027No" - + "deTemplatesScopedList\022A\n\016node_templates\030" - + "\274\242\355\250\001 \003(\0132%.google.cloud.compute.v1.Node" - + "Template\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cl" - + "oud.compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"" - + "\240\004\n\010NodeType\022\035\n\014cpu_platform\030\252\352\321\303\001 \001(\tH\000" - + "\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022" - + "G\n\ndeprecated\030\263\313\321\365\001 \001(\0132*.google.cloud.c" - + "ompute.v1.DeprecationStatusH\002\210\001\001\022\034\n\013desc" - + "ription\030\374\207\326\311\001 \001(\tH\003\210\001\001\022\033\n\nguest_cpus\030\322\313\310" - + "\273\001 \001(\005H\004\210\001\001\022\020\n\002id\030\233\032 \001(\004H\005\210\001\001\022\024\n\004kind\030\224\367" - + "\310\001 \001(\tH\006\210\001\001\022\035\n\014local_ssd_gb\030\312\210\377\234\001 \001(\005H\007\210" - + "\001\001\022\031\n\tmemory_mb\030\223\223\2507 \001(\005H\010\210\001\001\022\024\n\004name\030\213\365" - + "\315\001 \001(\tH\t\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\n\210\001\001\022" - + "\024\n\004zone\030\254\307\344\001 \001(\tH\013\210\001\001B\017\n\r_cpu_platformB\025" - + "\n\023_creation_timestampB\r\n\013_deprecatedB\016\n\014" - + "_descriptionB\r\n\013_guest_cpusB\005\n\003_idB\007\n\005_k" - + "indB\017\n\r_local_ssd_gbB\014\n\n_memory_mbB\007\n\005_n" - + "ameB\014\n\n_self_linkB\007\n\005_zone\"\271\003\n\026NodeTypeA" - + "ggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022L\n\005items" - + "\030\300\317\367/ \003(\0132:.google.cloud.compute.v1.Node" - + "TypeAggregatedList.ItemsEntry\022\024\n\004kind\030\224\367" - + "\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH" - + "\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unre" - + "achables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 ." - + "google.cloud.compute.v1.WarningH\004\210\001\001\032Z\n\n" - + "ItemsEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132," - + ".google.cloud.compute.v1.NodeTypesScoped" - + "List:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_t" - + "okenB\014\n\n_self_linkB\n\n\010_warning\"\241\002\n\014NodeT" - + "ypeList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0223\n\005items\030\300\317\367/ " - + "\003(\0132!.google.cloud.compute.v1.NodeType\022\024" - + "\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030" - + "\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001" - + "\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.com" - + "pute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020" - + "_next_page_tokenB\014\n\n_self_linkB\n\n\010_warni" - + "ng\"\227\001\n\023NodeTypesScopedList\0229\n\nnode_types" - + "\030\374\277\365\345\001 \003(\0132!.google.cloud.compute.v1.Nod" - + "eType\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud" - + ".compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\220\003\n" - + "\024NotificationEndpoint\022\"\n\022creation_timest" - + "amp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001" - + "(\tH\001\210\001\001\022Y\n\rgrpc_settings\030\244\306\300\331\001 \001(\01329.goo" - + "gle.cloud.compute.v1.NotificationEndpoin" - + "tGrpcSettingsH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004" - + "kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001" - + "\022\026\n\006region\030\364\315\240B \001(\tH\006\210\001\001\022\032\n\tself_link\030\215\222" - + "\305\331\001 \001(\tH\007\210\001\001B\025\n\023_creation_timestampB\016\n\014_" - + "descriptionB\020\n\016_grpc_settingsB\005\n\003_idB\007\n\005" - + "_kindB\007\n\005_nameB\t\n\007_regionB\014\n\n_self_link\"" - + "\267\002\n NotificationEndpointGrpcSettings\022\032\n\t" - + "authority\030\303\216\320\277\001 \001(\tH\000\210\001\001\022\030\n\010endpoint\030\225\273\234" - + "> \001(\tH\001\210\001\001\022\035\n\014payload_name\030\234\265\234\217\001 \001(\tH\002\210\001" - + "\001\022C\n\017resend_interval\030\311\270\210\344\001 \001(\0132!.google." - + "cloud.compute.v1.DurationH\003\210\001\001\022\"\n\022retry_" - + "duration_sec\030\335\316\2247 \001(\rH\004\210\001\001B\014\n\n_authority" - + "B\013\n\t_endpointB\017\n\r_payload_nameB\022\n\020_resen" - + "d_intervalB\025\n\023_retry_duration_sec\"\271\002\n\030No" - + "tificationEndpointList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001" - + "\022?\n\005items\030\300\317\367/ \003(\0132-.google.cloud.comput" - + "e.v1.NotificationEndpoint\022\024\n\004kind\030\224\367\310\001 \001" - + "(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001" - + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030" - + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" - + "ngH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_to" - + "kenB\014\n\n_self_linkB\n\n\010_warning\"\333\t\n\tOperat" - + "ion\022$\n\023client_operation_id\030\347\215\336\215\001 \001(\tH\000\210\001" - + "\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n" - + "\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\030\n\010end_time\030" - + "\261\247\3476 \001(\tH\003\210\001\001\0225\n\005error\030\210\244\223. \001(\0132\036.google" - + ".cloud.compute.v1.ErrorH\004\210\001\001\022\'\n\022http_err" - + "or_message\030\331\372\310` \001(\tB\003\350G\004H\005\210\001\001\022,\n\026http_er" - + "ror_status_code\030\354\204\370\224\001 \001(\005B\003\350G\003H\006\210\001\001\022\020\n\002i" - + "d\030\233\032 \001(\004H\007\210\001\001\022\034\n\013insert_time\030\223\251\350\316\001 \001(\tH\010" - + "\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\t\210\001\001\022\031\n\004name\030\213\365\315\001 \001" - + "(\tB\003\350G\001H\n\210\001\001\022\"\n\022operation_group_id\030\263\355\223\023 " - + "\001(\tH\013\210\001\001\022\036\n\016operation_type\030\222\366\332T \001(\tH\014\210\001\001" - + "\022\030\n\010progress\030\255\204\323\" \001(\005H\r\210\001\001\022\026\n\006region\030\364\315\240" - + "B \001(\tH\016\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\017\210\001\001\022\032" - + "\n\nstart_time\030\212\351\356\021 \001(\tH\020\210\001\001\022F\n\006status\030\362\237\267" - + "V \001(\0162).google.cloud.compute.v1.Operatio" - + "n.StatusB\003\350G\002H\021\210\001\001\022\037\n\016status_message\030\272\311\351" - + "\215\001 \001(\tH\022\210\001\001\022\031\n\ttarget_id\030\211\225\215{ \001(\004H\023\210\001\001\022\033" - + "\n\013target_link\030\350\223\361\035 \001(\tH\024\210\001\001\022\024\n\004user\030\313\327\333\001" - + " \001(\tH\025\210\001\001\0227\n\010warnings\030\327\210\301\355\001 \003(\0132!.google" - + ".cloud.compute.v1.Warnings\022\024\n\004zone\030\254\307\344\001 " - + "\001(\tH\026\210\001\001\"K\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000" - + "\022\013\n\004DONE\020\202\267\200\001\022\016\n\007PENDING\020\367\252\360\020\022\016\n\007RUNNING" - + "\020\237\303\3529B\026\n\024_client_operation_idB\025\n\023_creati" - + "on_timestampB\016\n\014_descriptionB\013\n\t_end_tim" - + "eB\010\n\006_errorB\025\n\023_http_error_messageB\031\n\027_h" - + "ttp_error_status_codeB\005\n\003_idB\016\n\014_insert_" - + "timeB\007\n\005_kindB\007\n\005_nameB\025\n\023_operation_gro" - + "up_idB\021\n\017_operation_typeB\013\n\t_progressB\t\n" - + "\007_regionB\014\n\n_self_linkB\r\n\013_start_timeB\t\n" - + "\007_statusB\021\n\017_status_messageB\014\n\n_target_i" - + "dB\016\n\014_target_linkB\007\n\005_userB\007\n\005_zone\"\274\003\n\027" - + "OperationAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" - + "\001\022M\n\005items\030\300\317\367/ \003(\0132;.google.cloud.compu" - + "te.v1.OperationAggregatedList.ItemsEntry" - + "\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_toke" - + "n\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003" - + "\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030" - + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" - + "ngH\004\210\001\001\032[\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022<\n\005va" - + "lue\030\002 \001(\0132-.google.cloud.compute.v1.Oper" - + "ationsScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020" - + "_next_page_tokenB\014\n\n_self_linkB\n\n\010_warni" - + "ng\"\243\002\n\rOperationList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0224" - + "\n\005items\030\300\317\367/ \003(\0132\".google.cloud.compute." - + "v1.Operation\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" - + "xt_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link" - + "\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .go" - + "ogle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_i" - + "dB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_" - + "linkB\n\n\010_warning\"\230\001\n\024OperationsScopedLis" - + "t\0229\n\noperations\030\354\257\377\001 \003(\0132\".google.cloud." - + "compute.v1.Operation\0229\n\007warning\030\234\337\226\030 \001(\013" - + "2 .google.cloud.compute.v1.WarningH\000\210\001\001B" - + "\n\n\010_warning\"\332\006\n\020OutlierDetection\022E\n\022base" - + "_ejection_time\030\207\327\317& \001(\0132!.google.cloud.c" - + "ompute.v1.DurationH\000\210\001\001\022#\n\022consecutive_e" - + "rrors\030\240\263\320\270\001 \001(\005H\001\210\001\001\022,\n\033consecutive_gate" - + "way_failure\030\372\267\212\307\001 \001(\005H\002\210\001\001\022,\n\034enforcing_" - + "consecutive_errors\030\300\323\320e \001(\005H\003\210\001\001\0226\n%enfo" - + "rcing_consecutive_gateway_failure\030\332\337\212\274\001 " - + "\001(\005H\004\210\001\001\022&\n\026enforcing_success_rate\030\274\357\337\\ " - + "\001(\005H\005\210\001\001\022;\n\010interval\030\305\311\377\017 \001(\0132!.google.c" - + "loud.compute.v1.DurationH\006\210\001\001\022$\n\024max_eje" - + "ction_percent\030\230\246\345\010 \001(\005H\007\210\001\001\022+\n\032success_r" - + "ate_minimum_hosts\030\367\241\332\372\001 \001(\005H\010\210\001\001\022,\n\033succ" - + "ess_rate_request_volume\030\315\353\230\206\001 \001(\005H\t\210\001\001\022)" - + "\n\031success_rate_stdev_factor\030\235\203\251S \001(\005H\n\210\001" - + "\001B\025\n\023_base_ejection_timeB\025\n\023_consecutive" - + "_errorsB\036\n\034_consecutive_gateway_failureB" - + "\037\n\035_enforcing_consecutive_errorsB(\n&_enf" - + "orcing_consecutive_gateway_failureB\031\n\027_e" - + "nforcing_success_rateB\013\n\t_intervalB\027\n\025_m" - + "ax_ejection_percentB\035\n\033_success_rate_min" - + "imum_hostsB\036\n\034_success_rate_request_volu" - + "meB\034\n\032_success_rate_stdev_factor\"\306\003\n\017Pac" - + "ketIntervals\022\026\n\006avg_ms\030\263\334\324a \001(\003H\000\210\001\001\022\030\n\010" - + "duration\030\224\233\221J \001(\tH\001\210\001\001\022\027\n\006max_ms\030\341\304\274\374\001 \001" - + "(\003H\002\210\001\001\022\027\n\006min_ms\030\263\245\355\377\001 \001(\003H\003\210\001\001\022\035\n\rnum_" - + "intervals\030\325\325\354X \001(\003H\004\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\t" - + "H\005\210\001\001\"g\n\010Duration\022\026\n\022UNDEFINED_DURATION\020" - + "\000\022\034\n\024DURATION_UNSPECIFIED\020\354\371\243\374\001\022\013\n\004HOUR\020" - + "\344\333\207\001\022\t\n\003MAX\020\304\322\004\022\r\n\006MINUTE\020\224\264\272<\"h\n\004Type\022\022" - + "\n\016UNDEFINED_TYPE\020\000\022\020\n\010LOOPBACK\020\213\223\353\251\001\022\016\n\007" - + "RECEIVE\020\303\375\267Z\022\020\n\010TRANSMIT\020\260\205\373\327\001\022\030\n\020TYPE_U" - + "NSPECIFIED\020\222\373\333\320\001B\t\n\007_avg_msB\013\n\t_duration" - + "B\t\n\007_max_msB\t\n\007_min_msB\020\n\016_num_intervals", - "B\007\n\005_type\"\272\006\n\017PacketMirroring\022Z\n\rcollect" - + "or_ilb\030\355\211\266\313\001 \001(\0132:.google.cloud.compute." - + "v1.PacketMirroringForwardingRuleInfoH\000\210\001" - + "\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n" - + "\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\027\n\006enable\030\203\313" - + "\324\224\001 \001(\tH\003\210\001\001\022G\n\006filter\030\370\226\243\240\001 \001(\0132..googl" - + "e.cloud.compute.v1.PacketMirroringFilter" - + "H\004\210\001\001\022\020\n\002id\030\233\032 \001(\004H\005\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\t" - + "H\006\210\001\001\022`\n\022mirrored_resources\030\304\237\302; \001(\0132<.g" - + "oogle.cloud.compute.v1.PacketMirroringMi" - + "rroredResourceInfoH\007\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\t" - + "H\010\210\001\001\022L\n\007network\030\256\264\205o \001(\01323.google.cloud" - + ".compute.v1.PacketMirroringNetworkInfoH\t" - + "\210\001\001\022\031\n\010priority\030\244\363\241\324\001 \001(\rH\n\210\001\001\022\026\n\006region" - + "\030\364\315\240B \001(\tH\013\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\014\210" - + "\001\001\"9\n\006Enable\022\024\n\020UNDEFINED_ENABLE\020\000\022\014\n\005FA" - + "LSE\020\203\302\344\037\022\013\n\004TRUE\020\216\333\235\001B\020\n\016_collector_ilbB" - + "\025\n\023_creation_timestampB\016\n\014_descriptionB\t" - + "\n\007_enableB\t\n\007_filterB\005\n\003_idB\007\n\005_kindB\025\n\023" - + "_mirrored_resourcesB\007\n\005_nameB\n\n\010_network" - + "B\013\n\t_priorityB\t\n\007_regionB\014\n\n_self_link\"\316" - + "\003\n\035PacketMirroringAggregatedList\022\020\n\002id\030\233" - + "\032 \001(\tH\000\210\001\001\022S\n\005items\030\300\317\367/ \003(\0132A.google.cl" - + "oud.compute.v1.PacketMirroringAggregated" - + "List.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n" - + "\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_l" - + "ink\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t " - + "\003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.c" - + "ompute.v1.WarningH\004\210\001\001\032a\n\nItemsEntry\022\013\n\003" - + "key\030\001 \001(\t\022B\n\005value\030\002 \001(\01323.google.cloud." - + "compute.v1.PacketMirroringsScopedList:\0028" - + "\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n" - + "\n_self_linkB\n\n\010_warning\"\306\001\n\025PacketMirror" - + "ingFilter\022\030\n\rI_p_protocols\030\326\331\376. \003(\t\022\027\n\013c" - + "idr_ranges\030\201\224\323\350\001 \003(\t\022\031\n\tdirection\030\377\216\2005 \001" - + "(\tH\000\210\001\001\"Q\n\tDirection\022\027\n\023UNDEFINED_DIRECT" - + "ION\020\000\022\n\n\004BOTH\020\201\347|\022\016\n\006EGRESS\020\365\366\264\316\001\022\017\n\007ING" - + "RESS\020\225\375\276\366\001B\014\n\n_direction\"q\n!PacketMirror" - + "ingForwardingRuleInfo\022\036\n\rcanonical_url\030\244" - + "\377\243\364\001 \001(\tH\000\210\001\001\022\022\n\003url\030\357\212\007 \001(\tH\001\210\001\001B\020\n\016_ca" - + "nonical_urlB\006\n\004_url\"\257\002\n\023PacketMirroringL" - + "ist\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022:\n\005items\030\300\317\367/ \003(\0132" - + "(.google.cloud.compute.v1.PacketMirrorin" - + "g\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_tok" - + "en\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH" - + "\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud." - + "compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB" - + "\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_wa" - + "rning\"\367\001\n#PacketMirroringMirroredResourc" - + "eInfo\022^\n\tinstances\030\376\374\357\r \003(\0132H.google.clo" - + "ud.compute.v1.PacketMirroringMirroredRes" - + "ourceInfoInstanceInfo\022_\n\013subnetworks\030\305\324\245" - + "\306\001 \003(\0132F.google.cloud.compute.v1.PacketM" - + "irroringMirroredResourceInfoSubnetInfo\022\017" - + "\n\004tags\030\231\350\330\001 \003(\t\"\177\n/PacketMirroringMirror" - + "edResourceInfoInstanceInfo\022\036\n\rcanonical_" - + "url\030\244\377\243\364\001 \001(\tH\000\210\001\001\022\022\n\003url\030\357\212\007 \001(\tH\001\210\001\001B\020" - + "\n\016_canonical_urlB\006\n\004_url\"}\n-PacketMirror" - + "ingMirroredResourceInfoSubnetInfo\022\036\n\rcan" + + "age_tokenB\014\n\n_self_linkB\n\n\010_warning\"\306\001\n\025" + + "PacketMirroringFilter\022\030\n\rI_p_protocols\030\326" + + "\331\376. \003(\t\022\027\n\013cidr_ranges\030\201\224\323\350\001 \003(\t\022\031\n\tdire" + + "ction\030\377\216\2005 \001(\tH\000\210\001\001\"Q\n\tDirection\022\027\n\023UNDE" + + "FINED_DIRECTION\020\000\022\n\n\004BOTH\020\201\347|\022\016\n\006EGRESS\020" + + "\365\366\264\316\001\022\017\n\007INGRESS\020\225\375\276\366\001B\014\n\n_direction\"q\n!" + + "PacketMirroringForwardingRuleInfo\022\036\n\rcan" + "onical_url\030\244\377\243\364\001 \001(\tH\000\210\001\001\022\022\n\003url\030\357\212\007 \001(\t" - + "H\001\210\001\001B\020\n\016_canonical_urlB\006\n\004_url\"j\n\032Packe" - + "tMirroringNetworkInfo\022\036\n\rcanonical_url\030\244" - + "\377\243\364\001 \001(\tH\000\210\001\001\022\022\n\003url\030\357\212\007 \001(\tH\001\210\001\001B\020\n\016_ca" - + "nonical_urlB\006\n\004_url\"\253\001\n\032PacketMirrorings" - + "ScopedList\022F\n\021packet_mirrorings\030\247\372\334I \003(\013" - + "2(.google.cloud.compute.v1.PacketMirrori" - + "ng\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.co" - + "mpute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\371\001\n\026Pa" - + "tchAutoscalerRequest\022\033\n\nautoscaler\030\327\375\322\366\001" - + " \001(\tH\000\210\001\001\022H\n\023autoscaler_resource\030\366\360\377b \001(" - + "\0132#.google.cloud.compute.v1.AutoscalerB\003" - + "\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032" - + "\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\033\n\004zone\030\254\307\344\001 " - + "\001(\tB\n\340A\002\362G\004zoneB\r\n\013_autoscalerB\r\n\013_reque" - + "st_id\"\333\001\n\031PatchBackendBucketRequest\022\036\n\016b" - + "ackend_bucket\030\365\343\335+ \001(\tB\003\340A\002\022P\n\027backend_b" - + "ucket_resource\030\230\316\307\265\001 \001(\0132&.google.cloud." - + "compute.v1.BackendBucketB\003\340A\002\022!\n\007project" + + "H\001\210\001\001B\020\n\016_canonical_urlB\006\n\004_url\"\257\002\n\023Pack" + + "etMirroringList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022:\n\005ite" + + "ms\030\300\317\367/ \003(\0132(.google.cloud.compute.v1.Pa" + + "cketMirroring\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017n" + + "ext_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_lin" + + "k\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .g" + + "oogle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_" + + "idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self" + + "_linkB\n\n\010_warning\"\367\001\n#PacketMirroringMir" + + "roredResourceInfo\022^\n\tinstances\030\376\374\357\r \003(\0132" + + "H.google.cloud.compute.v1.PacketMirrorin" + + "gMirroredResourceInfoInstanceInfo\022_\n\013sub" + + "networks\030\305\324\245\306\001 \003(\0132F.google.cloud.comput" + + "e.v1.PacketMirroringMirroredResourceInfo" + + "SubnetInfo\022\017\n\004tags\030\231\350\330\001 \003(\t\"\177\n/PacketMir" + + "roringMirroredResourceInfoInstanceInfo\022\036" + + "\n\rcanonical_url\030\244\377\243\364\001 \001(\tH\000\210\001\001\022\022\n\003url\030\357\212" + + "\007 \001(\tH\001\210\001\001B\020\n\016_canonical_urlB\006\n\004_url\"}\n-" + + "PacketMirroringMirroredResourceInfoSubne" + + "tInfo\022\036\n\rcanonical_url\030\244\377\243\364\001 \001(\tH\000\210\001\001\022\022\n" + + "\003url\030\357\212\007 \001(\tH\001\210\001\001B\020\n\016_canonical_urlB\006\n\004_" + + "url\"j\n\032PacketMirroringNetworkInfo\022\036\n\rcan" + + "onical_url\030\244\377\243\364\001 \001(\tH\000\210\001\001\022\022\n\003url\030\357\212\007 \001(\t" + + "H\001\210\001\001B\020\n\016_canonical_urlB\006\n\004_url\"\253\001\n\032Pack" + + "etMirroringsScopedList\022F\n\021packet_mirrori" + + "ngs\030\247\372\334I \003(\0132(.google.cloud.compute.v1.P" + + "acketMirroring\0229\n\007warning\030\234\337\226\030 \001(\0132 .goo" + + "gle.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_wa" + + "rning\"\371\001\n\026PatchAutoscalerRequest\022\033\n\nauto" + + "scaler\030\327\375\322\366\001 \001(\tH\000\210\001\001\022H\n\023autoscaler_reso" + + "urce\030\366\360\377b \001(\0132#.google.cloud.compute.v1." + + "AutoscalerB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" + + "\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\033" + + "\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_autoscal" + + "erB\r\n\013_request_id\"\333\001\n\031PatchBackendBucket" + + "Request\022\036\n\016backend_bucket\030\365\343\335+ \001(\tB\003\340A\002\022" + + "P\n\027backend_bucket_resource\030\230\316\307\265\001 \001(\0132&.g" + + "oogle.cloud.compute.v1.BackendBucketB\003\340A" + + "\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\n" + + "request_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"" + + "\340\001\n\032PatchBackendServiceRequest\022 \n\017backen" + + "d_service\030\212\300\256\222\001 \001(\tB\003\340A\002\022R\n\030backend_serv" + + "ice_resource\030\243\201\337\245\001 \001(\0132\'.google.cloud.co" + + "mpute.v1.BackendServiceB\003\340A\002\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201" + + "\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\275\001\n\032PatchFire" + + "wallPolicyRequest\022 \n\017firewall_policy\030\321\212\306" + + "\355\001 \001(\tB\003\340A\002\022R\n\030firewall_policy_resource\030" + + "\274\266\207\354\001 \001(\0132\'.google.cloud.compute.v1.Fire" + + "wallPolicyB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001B\r\n\013_request_id\"\305\001\n\024PatchFirewallRequ" + + "est\022\031\n\010firewall\030\200\372\325\363\001 \001(\tB\003\340A\002\022D\n\021firewa" + + "ll_resource\030\355\260\340\023 \001(\0132!.google.cloud.comp" + + "ute.v1.FirewallB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" + + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001B\r\n\013_request_id\"\201\002\n\032PatchForwardingRu" + + "leRequest\022 \n\017forwarding_rule\030\376\245\335\200\001 \001(\tB\003" + + "\340A\002\022R\n\030forwarding_rule_resource\030\257\300\320\217\001 \001(" + + "\0132\'.google.cloud.compute.v1.ForwardingRu" + + "leB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proje" + + "ct\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nr" + + "equest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\346" + + "\001\n PatchGlobalForwardingRuleRequest\022 \n\017f" + + "orwarding_rule\030\376\245\335\200\001 \001(\tB\003\340A\002\022R\n\030forward" + + "ing_rule_resource\030\257\300\320\217\001 \001(\0132\'.google.clo" + + "ud.compute.v1.ForwardingRuleB\003\340A\002\022!\n\007pro" + + "ject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_" + + "id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\203\002\n(Patc" + + "hGlobalPublicDelegatedPrefixeRequest\022!\n\007" + + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\'\n\027publi" + + "c_delegated_prefix\030\350\334\261a \001(\tB\003\340A\002\022`\n publ" + + "ic_delegated_prefix_resource\030\205\370\330\026 \001(\0132.." + + "google.cloud.compute.v1.PublicDelegatedP" + + "refixB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r" + + "\n\013_request_id\"\323\001\n\027PatchHealthCheckReques" + + "t\022\035\n\014health_check\030\345\252\244\223\001 \001(\tB\003\340A\002\022K\n\025heal" + + "th_check_resource\030\250\303\244` \001(\0132$.google.clou" + + "d.compute.v1.HealthCheckB\003\340A\002\022!\n\007project" + "\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313" - + "\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\340\001\n\032PatchBac" - + "kendServiceRequest\022 \n\017backend_service\030\212\300" - + "\256\222\001 \001(\tB\003\340A\002\022R\n\030backend_service_resource" - + "\030\243\201\337\245\001 \001(\0132\'.google.cloud.compute.v1.Bac" - + "kendServiceB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B" - + "\r\n\013_request_id\"\275\001\n\032PatchFirewallPolicyRe" - + "quest\022 \n\017firewall_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022" - + "R\n\030firewall_policy_resource\030\274\266\207\354\001 \001(\0132\'." - + "google.cloud.compute.v1.FirewallPolicyB\003" - + "\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_requ" - + "est_id\"\305\001\n\024PatchFirewallRequest\022\031\n\010firew" - + "all\030\200\372\325\363\001 \001(\tB\003\340A\002\022D\n\021firewall_resource\030" - + "\355\260\340\023 \001(\0132!.google.cloud.compute.v1.Firew" - + "allB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" - + "ect\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_requ" - + "est_id\"\201\002\n\032PatchForwardingRuleRequest\022 \n" - + "\017forwarding_rule\030\376\245\335\200\001 \001(\tB\003\340A\002\022R\n\030forwa" - + "rding_rule_resource\030\257\300\320\217\001 \001(\0132\'.google.c" - + "loud.compute.v1.ForwardingRuleB\003\340A\002\022!\n\007p" - + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region" - + "\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201" - + "\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\346\001\n PatchGlob" - + "alForwardingRuleRequest\022 \n\017forwarding_ru" - + "le\030\376\245\335\200\001 \001(\tB\003\340A\002\022R\n\030forwarding_rule_res" - + "ource\030\257\300\320\217\001 \001(\0132\'.google.cloud.compute.v" - + "1.ForwardingRuleB\003\340A\002\022!\n\007project\030\231\226\301l \001(" - + "\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" - + "\000\210\001\001B\r\n\013_request_id\"\203\002\n(PatchGlobalPubli" - + "cDelegatedPrefixeRequest\022!\n\007project\030\231\226\301l" - + " \001(\tB\r\340A\002\362G\007project\022\'\n\027public_delegated_" - + "prefix\030\350\334\261a \001(\tB\003\340A\002\022`\n public_delegated" - + "_prefix_resource\030\205\370\330\026 \001(\0132..google.cloud" - + ".compute.v1.PublicDelegatedPrefixB\003\340A\002\022\032" - + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_i" - + "d\"\323\001\n\027PatchHealthCheckRequest\022\035\n\014health_" - + "check\030\345\252\244\223\001 \001(\tB\003\340A\002\022K\n\025health_check_res" - + "ource\030\250\303\244` \001(\0132$.google.cloud.compute.v1" - + ".HealthCheckB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340" + + "\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\271\001\n\021PatchIma" + + "geRequest\022\025\n\005image\030\333\322\352/ \001(\tB\003\340A\002\022?\n\016imag" + + "e_resource\030\362\304\376\260\001 \001(\0132\036.google.cloud.comp" + + "ute.v1.ImageB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340" + "A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001" - + "B\r\n\013_request_id\"\271\001\n\021PatchImageRequest\022\025\n" - + "\005image\030\333\322\352/ \001(\tB\003\340A\002\022?\n\016image_resource\030\362" - + "\304\376\260\001 \001(\0132\036.google.cloud.compute.v1.Image" - + "B\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project" - + "\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request" - + "_id\"\225\002\n PatchInstanceGroupManagerRequest" - + "\022&\n\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002" - + "\022^\n\037instance_group_manager_resource\030\212\212\276|" - + " \001(\0132-.google.cloud.compute.v1.InstanceG" - + "roupManagerB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022" - + "\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request" - + "_id\"\240\002\n\"PatchInterconnectAttachmentReque" - + "st\022(\n\027interconnect_attachment\030\364\212\367\222\001 \001(\tB" - + "\003\340A\002\022a\n interconnect_attachment_resource" - + "\030\371\244\240e \001(\0132/.google.cloud.compute.v1.Inte" - + "rconnectAttachmentB\003\340A\002\022!\n\007project\030\231\226\301l " - + "\001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340" - + "A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B" - + "\r\n\013_request_id\"\325\001\n\030PatchInterconnectRequ" - + "est\022\034\n\014interconnect\030\216\311\214k \001(\tB\003\340A\002\022M\n\025int" - + "erconnect_resource\030\237\241\314\275\001 \001(\0132%.google.cl" - + "oud.compute.v1.InterconnectB\003\340A\002\022!\n\007proj" - + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_i" - + "d\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\203\003\n&Patch" - + "NetworkEdgeSecurityServiceRequest\022-\n\035net" - + "work_edge_security_service\030\247\237\357J \001(\tB\003\340A\002" - + "\022l\n&network_edge_security_service_resour" - + "ce\030\246\243\333\343\001 \001(\01323.google.cloud.compute.v1.N" - + "etworkEdgeSecurityServiceB\003\340A\002\022\025\n\005paths\030" - + "\356\301\3402 \001(\tH\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G" - + "\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006regio" - + "n\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\034\n\013update_" - + "mask\030\242\271\272\356\001 \001(\tH\002\210\001\001B\010\n\006_pathsB\r\n\013_reques" - + "t_idB\016\n\014_update_mask\"\347\001\n!PatchNetworkFir" - + "ewallPolicyRequest\022 \n\017firewall_policy\030\321\212" - + "\306\355\001 \001(\tB\003\340A\002\022R\n\030firewall_policy_resource" - + "\030\274\266\207\354\001 \001(\0132\'.google.cloud.compute.v1.Fir" - + "ewallPolicyB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B" - + "\r\n\013_request_id\"\300\001\n\023PatchNetworkRequest\022\027" - + "\n\007network\030\256\264\205o \001(\tB\003\340A\002\022B\n\020network_resou" - + "rce\030\377\335\234: \001(\0132 .google.cloud.compute.v1.N" - + "etworkB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" - + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_r" - + "equest_id\"\351\001\n\025PatchNodeGroupRequest\022\033\n\nn" - + "ode_group\030\202\374\213\340\001 \001(\tB\003\340A\002\022H\n\023node_group_r" - + "esource\030\253\263\372\360\001 \001(\0132\".google.cloud.compute" - + ".v1.NodeGroupB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r" - + "\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001" - + "\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_reque" - + "st_id\"\204\002\n\033PatchPacketMirroringRequest\022 \n" - + "\020packet_mirroring\030\314\271\321\n \001(\tB\003\340A\002\022T\n\031packe" - + "t_mirroring_resource\030\241\374\250\353\001 \001(\0132(.google." - + "cloud.compute.v1.PacketMirroringB\003\340A\002\022!\n" - + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006regi" - + "on\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030" - + "\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\344\002\n2PatchPe" - + "rInstanceConfigsInstanceGroupManagerRequ" - + "est\022&\n\026instance_group_manager\030\303\367\363v \001(\tB\003" - + "\340A\002\022\232\001\n?instance_group_managers_patch_pe" - + "r_instance_configs_req_resource\030\377\233\210\252\001 \001(" - + "\0132H.google.cloud.compute.v1.InstanceGrou" - + "pManagersPatchPerInstanceConfigsReqB\003\340A\002" - + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nr" - + "equest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\t" - + "B\n\340A\002\362G\004zoneB\r\n\013_request_id\"\357\002\n8PatchPer" - + "InstanceConfigsRegionInstanceGroupManage" - + "rRequest\022&\n\026instance_group_manager\030\303\367\363v " - + "\001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" - + "ect\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\233\001\n" - + "@region_instance_group_manager_patch_ins" - + "tance_config_req_resource\030\312\315\241^ \001(\0132I.goo" - + "gle.cloud.compute.v1.RegionInstanceGroup" - + "ManagerPatchInstanceConfigReqB\003\340A\002\022\032\n\nre" - + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\201\002" - + "\n#PatchPublicAdvertisedPrefixeRequest\022!\n" - + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022(\n\030publ" - + "ic_advertised_prefix\030\236\367\3110 \001(\tB\003\340A\002\022b\n!pu" - + "blic_advertised_prefix_resource\030\217\327\262o \001(\013" - + "2/.google.cloud.compute.v1.PublicAdverti" - + "sedPrefixB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210" - + "\001\001B\r\n\013_request_id\"\236\002\n\"PatchPublicDelegat" - + "edPrefixeRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\'\n\027public_delegated_prefix\030\350" - + "\334\261a \001(\tB\003\340A\002\022`\n public_delegated_prefix_" - + "resource\030\205\370\330\026 \001(\0132..google.cloud.compute" - + ".v1.PublicDelegatedPrefixB\003\340A\002\022\037\n\006region" + + "B\r\n\013_request_id\"\225\002\n PatchInstanceGroupMa" + + "nagerRequest\022&\n\026instance_group_manager\030\303" + + "\367\363v \001(\tB\003\340A\002\022^\n\037instance_group_manager_r" + + "esource\030\212\212\276| \001(\0132-.google.cloud.compute." + + "v1.InstanceGroupManagerB\003\340A\002\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201" + + "\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zone" + + "B\r\n\013_request_id\"\240\002\n\"PatchInterconnectAtt" + + "achmentRequest\022(\n\027interconnect_attachmen" + + "t\030\364\212\367\222\001 \001(\tB\003\340A\002\022a\n interconnect_attachm" + + "ent_resource\030\371\244\240e \001(\0132/.google.cloud.com" + + "pute.v1.InterconnectAttachmentB\003\340A\002\022!\n\007p" + + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region" + "\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201" - + "\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\203\002\n\034PatchRegi" - + "onAutoscalerRequest\022\033\n\nautoscaler\030\327\375\322\366\001 " - + "\001(\tH\000\210\001\001\022H\n\023autoscaler_resource\030\366\360\377b \001(\013" - + "2#.google.cloud.compute.v1.AutoscalerB\003\340" - + "A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n" - + "\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreques" - + "t_id\030\313\201\331\021 \001(\tH\001\210\001\001B\r\n\013_autoscalerB\r\n\013_re" - + "quest_id\"\207\002\n PatchRegionBackendServiceRe" - + "quest\022 \n\017backend_service\030\212\300\256\222\001 \001(\tB\003\340A\002\022" - + "R\n\030backend_service_resource\030\243\201\337\245\001 \001(\0132\'." - + "google.cloud.compute.v1.BackendServiceB\003" - + "\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037" - + "\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreque" - + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\372\001\n\035P" - + "atchRegionHealthCheckRequest\022\035\n\014health_c" - + "heck\030\345\252\244\223\001 \001(\tB\003\340A\002\022K\n\025health_check_reso" - + "urce\030\250\303\244` \001(\0132$.google.cloud.compute.v1." - + "HealthCheckB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006re" - + "gion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_req" - + "uest_id\"\231\002\n$PatchRegionHealthCheckServic" - + "eRequest\022%\n\024health_check_service\030\333\233\335\302\001 \001" - + "(\tB\003\340A\002\022[\n\035health_check_service_resource" - + "\030\362\233\320\343\001 \001(\0132+.google.cloud.compute.v1.Hea" - + "lthCheckServiceB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" + + "\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\325\001\n\030PatchInte" + + "rconnectRequest\022\034\n\014interconnect\030\216\311\214k \001(\t" + + "B\003\340A\002\022M\n\025interconnect_resource\030\237\241\314\275\001 \001(\013" + + "2%.google.cloud.compute.v1.InterconnectB" + + "\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022" + + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_" + + "id\"\203\003\n&PatchNetworkEdgeSecurityServiceRe" + + "quest\022-\n\035network_edge_security_service\030\247" + + "\237\357J \001(\tB\003\340A\002\022l\n&network_edge_security_se" + + "rvice_resource\030\246\243\333\343\001 \001(\01323.google.cloud." + + "compute.v1.NetworkEdgeSecurityServiceB\003\340" + + "A\002\022\025\n\005paths\030\356\301\3402 \001(\tH\000\210\001\001\022!\n\007project\030\231\226\301" + + "l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB" + + "\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001" + + "\001\022\034\n\013update_mask\030\242\271\272\356\001 \001(\tH\002\210\001\001B\010\n\006_path" + + "sB\r\n\013_request_idB\016\n\014_update_mask\"\347\001\n!Pat" + + "chNetworkFirewallPolicyRequest\022 \n\017firewa" + + "ll_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022R\n\030firewall_pol" + + "icy_resource\030\274\266\207\354\001 \001(\0132\'.google.cloud.co" + + "mpute.v1.FirewallPolicyB\003\340A\002\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201" + + "\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\300\001\n\023PatchNetw" + + "orkRequest\022\027\n\007network\030\256\264\205o \001(\tB\003\340A\002\022B\n\020n" + + "etwork_resource\030\377\335\234: \001(\0132 .google.cloud." + + "compute.v1.NetworkB\003\340A\002\022!\n\007project\030\231\226\301l " + + "\001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(" + + "\tH\000\210\001\001B\r\n\013_request_id\"\351\001\n\025PatchNodeGroup" + + "Request\022\033\n\nnode_group\030\202\374\213\340\001 \001(\tB\003\340A\002\022H\n\023" + + "node_group_resource\030\253\263\372\360\001 \001(\0132\".google.c" + + "loud.compute.v1.NodeGroupB\003\340A\002\022!\n\007projec" + + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030" + + "\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zo" + + "neB\r\n\013_request_id\"\204\002\n\033PatchPacketMirrori" + + "ngRequest\022 \n\020packet_mirroring\030\314\271\321\n \001(\tB\003" + + "\340A\002\022T\n\031packet_mirroring_resource\030\241\374\250\353\001 \001" + + "(\0132(.google.cloud.compute.v1.PacketMirro" + + "ringB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" + + "ject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n" + + "\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id" + + "\"\344\002\n2PatchPerInstanceConfigsInstanceGrou" + + "pManagerRequest\022&\n\026instance_group_manage" + + "r\030\303\367\363v \001(\tB\003\340A\002\022\232\001\n?instance_group_manag" + + "ers_patch_per_instance_configs_req_resou" + + "rce\030\377\233\210\252\001 \001(\0132H.google.cloud.compute.v1." + + "InstanceGroupManagersPatchPerInstanceCon" + + "figsReqB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007" + + "project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004z" + + "one\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"" + + "\357\002\n8PatchPerInstanceConfigsRegionInstanc" + + "eGroupManagerRequest\022&\n\026instance_group_m" + + "anager\030\303\367\363v \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" + "B\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362" - + "G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013" - + "_request_id\"\237\002\n&PatchRegionInstanceGroup" - + "ManagerRequest\022&\n\026instance_group_manager" - + "\030\303\367\363v \001(\tB\003\340A\002\022^\n\037instance_group_manager" - + "_resource\030\212\212\276| \001(\0132-.google.cloud.comput" - + "e.v1.InstanceGroupManagerB\003\340A\002\022!\n\007projec" - + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B" - + " \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001B\r\n\013_request_id\"\216\002\n\'PatchRegionNet" - + "workFirewallPolicyRequest\022 \n\017firewall_po" - + "licy\030\321\212\306\355\001 \001(\tB\003\340A\002\022R\n\030firewall_policy_r" - + "esource\030\274\266\207\354\001 \001(\0132\'.google.cloud.compute" - + ".v1.FirewallPolicyB\003\340A\002\022!\n\007project\030\231\226\301l " - + "\001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340" - + "A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B" - + "\r\n\013_request_id\"\205\002\n PatchRegionSecurityPo" - + "licyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" - + "roject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022" - + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\037\n\017security_" - + "policy\030\221\206\312Q \001(\tB\003\340A\002\022Q\n\030security_policy_" - + "resource\030\374\252\211g \001(\0132\'.google.cloud.compute" - + ".v1.SecurityPolicyB\003\340A\002B\r\n\013_request_id\"\363" - + "\001\n\033PatchRegionSslPolicyRequest\022!\n\007projec" - + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B" - + " \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001\022\033\n\nssl_policy\030\305\375\340\214\001 \001(\tB\003\340A\002\022H\n\023s" - + "sl_policy_resource\030\310\210\212\203\001 \001(\0132\".google.cl" - + "oud.compute.v1.SslPolicyB\003\340A\002B\r\n\013_reques" - + "t_id\"\220\002\n\"PatchRegionTargetHttpsProxyRequ" - + "est\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037" - + "\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreque" - + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\"\n\022target_https_prox" - + "y\030\354\260\372\030 \001(\tB\003\340A\002\022W\n\033target_https_proxy_re" - + "source\030\201\255\344\316\001 \001(\0132).google.cloud.compute." - + "v1.TargetHttpsProxyB\003\340A\002B\r\n\013_request_id\"" - + "\346\001\n\030PatchRegionUrlMapRequest\022!\n\007project\030" + + "G\006region\022\233\001\n@region_instance_group_manag" + + "er_patch_instance_config_req_resource\030\312\315" + + "\241^ \001(\0132I.google.cloud.compute.v1.RegionI" + + "nstanceGroupManagerPatchInstanceConfigRe" + + "qB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_r" + + "equest_id\"\201\002\n#PatchPublicAdvertisedPrefi" + + "xeRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" + + "ject\022(\n\030public_advertised_prefix\030\236\367\3110 \001(" + + "\tB\003\340A\002\022b\n!public_advertised_prefix_resou" + + "rce\030\217\327\262o \001(\0132/.google.cloud.compute.v1.P" + + "ublicAdvertisedPrefixB\003\340A\002\022\032\n\nrequest_id" + + "\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\236\002\n\"PatchP" + + "ublicDelegatedPrefixeRequest\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\'\n\027public_delega" + + "ted_prefix\030\350\334\261a \001(\tB\003\340A\002\022`\n public_deleg" + + "ated_prefix_resource\030\205\370\330\026 \001(\0132..google.c" + + "loud.compute.v1.PublicDelegatedPrefixB\003\340" + + "A\002\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nr" + + "equest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\203" + + "\002\n\034PatchRegionAutoscalerRequest\022\033\n\nautos" + + "caler\030\327\375\322\366\001 \001(\tH\000\210\001\001\022H\n\023autoscaler_resou" + + "rce\030\366\360\377b \001(\0132#.google.cloud.compute.v1.A" + + "utoscalerB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" + + "G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006regi" + + "on\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\r\n\013_autos" + + "calerB\r\n\013_request_id\"\207\002\n PatchRegionBack" + + "endServiceRequest\022 \n\017backend_service\030\212\300\256" + + "\222\001 \001(\tB\003\340A\002\022R\n\030backend_service_resource\030" + + "\243\201\337\245\001 \001(\0132\'.google.cloud.compute.v1.Back" + + "endServiceB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" + + "\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006reg" + + "ion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_requ" + + "est_id\"\372\001\n\035PatchRegionHealthCheckRequest" + + "\022\035\n\014health_check\030\345\252\244\223\001 \001(\tB\003\340A\002\022K\n\025healt" + + "h_check_resource\030\250\303\244` \001(\0132$.google.cloud" + + ".compute.v1.HealthCheckB\003\340A\002\022!\n\007project\030" + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001" + "(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" - + "\000\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB\003\340A\002\022A\n\020url_ma" - + "p_resource\030\341\220\267P \001(\0132\037.google.cloud.compu" - + "te.v1.UrlMapB\003\340A\002B\r\n\013_request_id\"\335\001\n\022Pat" - + "chRouterRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" + + "\000\210\001\001B\r\n\013_request_id\"\231\002\n$PatchRegionHealt" + + "hCheckServiceRequest\022%\n\024health_check_ser" + + "vice\030\333\233\335\302\001 \001(\tB\003\340A\002\022[\n\035health_check_serv" + + "ice_resource\030\362\233\320\343\001 \001(\0132+.google.cloud.co" + + "mpute.v1.HealthCheckServiceB\003\340A\002\022!\n\007proj" + + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315" + + "\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 " + + "\001(\tH\000\210\001\001B\r\n\013_request_id\"\237\002\n&PatchRegionI" + + "nstanceGroupManagerRequest\022&\n\026instance_g" + + "roup_manager\030\303\367\363v \001(\tB\003\340A\002\022^\n\037instance_g" + + "roup_manager_resource\030\212\212\276| \001(\0132-.google." + + "cloud.compute.v1.InstanceGroupManagerB\003\340" + + "A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n" + + "\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreques" + + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\216\002\n\'Pa" + + "tchRegionNetworkFirewallPolicyRequest\022 \n" + + "\017firewall_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022R\n\030firew" + + "all_policy_resource\030\274\266\207\354\001 \001(\0132\'.google.c" + + "loud.compute.v1.FirewallPolicyB\003\340A\002\022!\n\007p" + + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region" + + "\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201" + + "\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\205\002\n PatchRegi" + + "onSecurityPolicyRequest\022!\n\007project\030\231\226\301l " + + "\001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340" + + "A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022" + + "\037\n\017security_policy\030\221\206\312Q \001(\tB\003\340A\002\022Q\n\030secu" + + "rity_policy_resource\030\374\252\211g \001(\0132\'.google.c" + + "loud.compute.v1.SecurityPolicyB\003\340A\002B\r\n\013_" + + "request_id\"\363\001\n\033PatchRegionSslPolicyReque" + + "st\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n" + + "\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreques" + + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\nssl_policy\030\305\375\340\214\001 \001" + + "(\tB\003\340A\002\022H\n\023ssl_policy_resource\030\310\210\212\203\001 \001(\013" + + "2\".google.cloud.compute.v1.SslPolicyB\003\340A" + + "\002B\r\n\013_request_id\"\220\002\n\"PatchRegionTargetHt" + + "tpsProxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" + "\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006reg" - + "ion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\026\n\006route" - + "r\030\311\256\356F \001(\tB\003\340A\002\022@\n\017router_resource\030\304\200\202J " - + "\001(\0132\037.google.cloud.compute.v1.RouterB\003\340A" - + "\002B\r\n\013_request_id\"\361\001\n\036PatchRuleFirewallPo" - + "licyRequest\022 \n\017firewall_policy\030\321\212\306\355\001 \001(\t" - + "B\003\340A\002\022Z\n\035firewall_policy_rule_resource\030\203" - + "\337\272w \001(\0132+.google.cloud.compute.v1.Firewa" - + "llPolicyRuleB\003\340A\002\022\031\n\010priority\030\244\363\241\324\001 \001(\005H" - + "\000\210\001\001\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\013\n\t_pri" - + "orityB\r\n\013_request_id\"\233\002\n%PatchRuleNetwor" - + "kFirewallPolicyRequest\022 \n\017firewall_polic" - + "y\030\321\212\306\355\001 \001(\tB\003\340A\002\022Z\n\035firewall_policy_rule" - + "_resource\030\203\337\272w \001(\0132+.google.cloud.comput" - + "e.v1.FirewallPolicyRuleB\003\340A\002\022\031\n\010priority" - + "\030\244\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" - + "\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\013" - + "\n\t_priorityB\r\n\013_request_id\"\302\002\n+PatchRule" - + "RegionNetworkFirewallPolicyRequest\022 \n\017fi" + + "ion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\"\n\022targe" + + "t_https_proxy\030\354\260\372\030 \001(\tB\003\340A\002\022W\n\033target_ht" + + "tps_proxy_resource\030\201\255\344\316\001 \001(\0132).google.cl" + + "oud.compute.v1.TargetHttpsProxyB\003\340A\002B\r\n\013" + + "_request_id\"\346\001\n\030PatchRegionUrlMapRequest" + + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006r" + + "egion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_" + + "id\030\313\201\331\021 \001(\tH\000\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB\003\340" + + "A\002\022A\n\020url_map_resource\030\341\220\267P \001(\0132\037.google" + + ".cloud.compute.v1.UrlMapB\003\340A\002B\r\n\013_reques" + + "t_id\"\335\001\n\022PatchRouterRequest\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(" + + "\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001\022\026\n\006router\030\311\256\356F \001(\tB\003\340A\002\022@\n\017router_re" + + "source\030\304\200\202J \001(\0132\037.google.cloud.compute.v" + + "1.RouterB\003\340A\002B\r\n\013_request_id\"\361\001\n\036PatchRu" + + "leFirewallPolicyRequest\022 \n\017firewall_poli" + + "cy\030\321\212\306\355\001 \001(\tB\003\340A\002\022Z\n\035firewall_policy_rul" + + "e_resource\030\203\337\272w \001(\0132+.google.cloud.compu" + + "te.v1.FirewallPolicyRuleB\003\340A\002\022\031\n\010priorit" + + "y\030\244\363\241\324\001 \001(\005H\000\210\001\001\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" + + "\001\210\001\001B\013\n\t_priorityB\r\n\013_request_id\"\233\002\n%Pat" + + "chRuleNetworkFirewallPolicyRequest\022 \n\017fi" + "rewall_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022Z\n\035firewall" + "_policy_rule_resource\030\203\337\272w \001(\0132+.google." + "cloud.compute.v1.FirewallPolicyRuleB\003\340A\002" + "\022\031\n\010priority\030\244\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007project\030\231" - + "\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(" - + "\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001" - + "\210\001\001B\013\n\t_priorityB\r\n\013_request_id\"\232\002\n\036Patc" - + "hRuleSecurityPolicyRequest\022\031\n\010priority\030\244" - + "\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G" - + "\007project\022\037\n\017security_policy\030\221\206\312Q \001(\tB\003\340A" - + "\002\022[\n\035security_policy_rule_resource\030\303\272\202\300\001" - + " \001(\0132+.google.cloud.compute.v1.SecurityP" - + "olicyRuleB\003\340A\002\022\035\n\rvalidate_only\030\265\372\337s \001(\010" - + "H\001\210\001\001B\013\n\t_priorityB\020\n\016_validate_only\"\336\001\n" - + "\032PatchSecurityPolicyRequest\022!\n\007project\030\231" + "\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331" - + "\021 \001(\tH\000\210\001\001\022\037\n\017security_policy\030\221\206\312Q \001(\tB\003" - + "\340A\002\022Q\n\030security_policy_resource\030\374\252\211g \001(\013" - + "2\'.google.cloud.compute.v1.SecurityPolic" - + "yB\003\340A\002B\r\n\013_request_id\"\215\002\n\035PatchServiceAt" - + "tachmentRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" - + "\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006reg" - + "ion\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022#\n\022servi" - + "ce_attachment\030\355\251\320\241\001 \001(\tB\003\340A\002\022X\n\033service_" - + "attachment_resource\030\240\266\304\341\001 \001(\0132*.google.c" - + "loud.compute.v1.ServiceAttachmentB\003\340A\002B\r" - + "\n\013_request_id\"\314\001\n\025PatchSslPolicyRequest\022" - + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" - + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\nssl_policy\030\305\375\340" - + "\214\001 \001(\tB\003\340A\002\022H\n\023ssl_policy_resource\030\310\210\212\203\001" - + " \001(\0132\".google.cloud.compute.v1.SslPolicy" - + "B\003\340A\002B\r\n\013_request_id\"\260\002\n\026PatchSubnetwork" - + "Request\022&\n\025drain_timeout_seconds\030\332\332\310\252\001 \001" - + "(\005H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proje" - + "ct\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nr" - + "equest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\033\n\nsubnetwork\030\356\247" - + "\344\222\001 \001(\tB\003\340A\002\022H\n\023subnetwork_resource\030\277\332\221\024" - + " \001(\0132#.google.cloud.compute.v1.Subnetwor" - + "kB\003\340A\002B\030\n\026_drain_timeout_secondsB\r\n\013_req" - + "uest_id\"\345\001\n\033PatchTargetGrpcProxyRequest\022" + + "\021 \001(\tH\001\210\001\001B\013\n\t_priorityB\r\n\013_request_id\"\302" + + "\002\n+PatchRuleRegionNetworkFirewallPolicyR" + + "equest\022 \n\017firewall_policy\030\321\212\306\355\001 \001(\tB\003\340A\002" + + "\022Z\n\035firewall_policy_rule_resource\030\203\337\272w \001" + + "(\0132+.google.cloud.compute.v1.FirewallPol" + + "icyRuleB\003\340A\002\022\031\n\010priority\030\244\363\241\324\001 \001(\005H\000\210\001\001\022" + + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006re" + + "gion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_i" + + "d\030\313\201\331\021 \001(\tH\001\210\001\001B\013\n\t_priorityB\r\n\013_request" + + "_id\"\232\002\n\036PatchRuleSecurityPolicyRequest\022\031" + + "\n\010priority\030\244\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007project\030\231\226\301" + + "l \001(\tB\r\340A\002\362G\007project\022\037\n\017security_policy\030" + + "\221\206\312Q \001(\tB\003\340A\002\022[\n\035security_policy_rule_re" + + "source\030\303\272\202\300\001 \001(\0132+.google.cloud.compute." + + "v1.SecurityPolicyRuleB\003\340A\002\022\035\n\rvalidate_o" + + "nly\030\265\372\337s \001(\010H\001\210\001\001B\013\n\t_priorityB\020\n\016_valid" + + "ate_only\"\336\001\n\032PatchSecurityPolicyRequest\022" + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" - + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022!\n\021target_grpc_pr" - + "oxy\030\373\264\262\002 \001(\tB\003\340A\002\022U\n\032target_grpc_proxy_r" - + "esource\030\322\352\353\234\001 \001(\0132(.google.cloud.compute" - + ".v1.TargetGrpcProxyB\003\340A\002B\r\n\013_request_id\"" - + "\344\001\n\033PatchTargetHttpProxyRequest\022!\n\007proje" - + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id" - + "\030\313\201\331\021 \001(\tH\000\210\001\001\022!\n\021target_http_proxy\030\345\276\322b" - + " \001(\tB\003\340A\002\022T\n\032target_http_proxy_resource\030" - + "\250\257\343\013 \001(\0132(.google.cloud.compute.v1.Targe" - + "tHttpProxyB\003\340A\002B\r\n\013_request_id\"\351\001\n\034Patch" - + "TargetHttpsProxyRequest\022!\n\007project\030\231\226\301l " - + "\001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001\022\"\n\022target_https_proxy\030\354\260\372\030 \001(\tB\003\340" - + "A\002\022W\n\033target_https_proxy_resource\030\201\255\344\316\001 " - + "\001(\0132).google.cloud.compute.v1.TargetHttp" - + "sProxyB\003\340A\002B\r\n\013_request_id\"\277\001\n\022PatchUrlM" - + "apRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" - + "ject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\030\n\007url_" - + "map\030\214\225\201\257\001 \001(\tB\003\340A\002\022A\n\020url_map_resource\030\341" - + "\220\267P \001(\0132\037.google.cloud.compute.v1.UrlMap" - + "B\003\340A\002B\r\n\013_request_id\"\277\004\n\013PathMatcher\022O\n\024" - + "default_route_action\030\252\264\327\264\001 \001(\0132(.google." - + "cloud.compute.v1.HttpRouteActionH\000\210\001\001\022 \n" - + "\017default_service\030\267\345\305\260\001 \001(\tH\001\210\001\001\022R\n\024defau" - + "lt_url_redirect\030\352\253\266\253\001 \001(\0132+.google.cloud" - + ".compute.v1.HttpRedirectActionH\002\210\001\001\022\034\n\013d" - + "escription\030\374\207\326\311\001 \001(\tH\003\210\001\001\022I\n\rheader_acti" - + "on\030\250\240\270\234\001 \001(\0132).google.cloud.compute.v1.H" - + "ttpHeaderActionH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210" - + "\001\001\0228\n\npath_rules\030\335\300\3461 \003(\0132!.google.cloud" - + ".compute.v1.PathRule\022?\n\013route_rules\030\201\207\267\263" - + "\001 \003(\0132&.google.cloud.compute.v1.HttpRout" - + "eRuleB\027\n\025_default_route_actionB\022\n\020_defau" - + "lt_serviceB\027\n\025_default_url_redirectB\016\n\014_" - + "descriptionB\020\n\016_header_actionB\007\n\005_name\"\371" - + "\001\n\010PathRule\022\020\n\005paths\030\356\301\3402 \003(\t\022G\n\014route_a" - + "ction\030\354\251\271\312\001 \001(\0132(.google.cloud.compute.v" - + "1.HttpRouteActionH\000\210\001\001\022\030\n\007service\030\265\215\217\262\001 " - + "\001(\tH\001\210\001\001\022J\n\014url_redirect\030\254\241\230\301\001 \001(\0132+.goo" - + "gle.cloud.compute.v1.HttpRedirectActionH" - + "\002\210\001\001B\017\n\r_route_actionB\n\n\010_serviceB\017\n\r_ur" - + "l_redirect\"\363\002\n\021PerInstanceConfig\022\033\n\013fing" - + "erprint\030\344\321\363o \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001" - + "\210\001\001\022H\n\017preserved_state\030\252\342\240\001 \001(\0132\'.google" - + ".cloud.compute.v1.PreservedStateH\002\210\001\001\022\026\n" - + "\006status\030\362\237\267V \001(\tH\003\210\001\001\"\220\001\n\006Status\022\024\n\020UNDE" - + "FINED_STATUS\020\000\022\020\n\010APPLYING\020\264\313\354\247\001\022\020\n\010DELE" - + "TING\020\250\247\207\374\001\022\020\n\tEFFECTIVE\020\207\363\270t\022\013\n\004NONE\020\270\316\222" - + "\001\022\021\n\tUNAPPLIED\020\244\207\341\346\001\022\032\n\022UNAPPLIED_DELETI" - + "ON\020\211\264\332\225\001B\016\n\014_fingerprintB\007\n\005_nameB\022\n\020_pr" - + "eserved_stateB\t\n\007_status\"\241\002\n\006Policy\022?\n\ra" - + "udit_configs\030\215\272\270\234\001 \003(\0132$.google.cloud.co" - + "mpute.v1.AuditConfig\0226\n\010bindings\030\216\305\244\300\001 \003" - + "(\0132 .google.cloud.compute.v1.Binding\022\024\n\004" - + "etag\030\225\322\276\001 \001(\tH\000\210\001\001\022\032\n\tiam_owned\030\273\260\354\326\001 \001(" - + "\010H\001\210\001\001\022/\n\005rules\030\367\221\3653 \003(\0132\035.google.cloud." - + "compute.v1.Rule\022\030\n\007version\030\330\271\324\247\001 \001(\005H\002\210\001" - + "\001B\007\n\005_etagB\014\n\n_iam_ownedB\n\n\010_version\"]\n\023" - + "PreconfiguredWafSet\022F\n\017expression_sets\030\230" - + "\253\203\342\001 \003(\0132).google.cloud.compute.v1.WafEx" - + "pressionSet\"\267\002\n\016PreservedState\022D\n\005disks\030" - + "\366\314\312- \003(\01322.google.cloud.compute.v1.Prese" - + "rvedState.DisksEntry\022J\n\010metadata\030\257\366\265) \003(" - + "\01325.google.cloud.compute.v1.PreservedSta", - "te.MetadataEntry\032b\n\nDisksEntry\022\013\n\003key\030\001 " - + "\001(\t\022C\n\005value\030\002 \001(\01324.google.cloud.comput" - + "e.v1.PreservedStatePreservedDisk:\0028\001\032/\n\r" - + "MetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001\"\254\002\n\033PreservedStatePreservedDisk\022\034\n" - + "\013auto_delete\030\273\344\316\335\001 \001(\tH\000\210\001\001\022\024\n\004mode\030\243\363\314\001" - + " \001(\tH\001\210\001\001\022\026\n\006source\030\233\320\301T \001(\tH\002\210\001\001\"\\\n\nAut" - + "oDelete\022\031\n\025UNDEFINED_AUTO_DELETE\020\000\022\014\n\005NE" - + "VER\020\354\244\257#\022%\n\036ON_PERMANENT_INSTANCE_DELETI" - + "ON\020\347\340\322-\"?\n\004Mode\022\022\n\016UNDEFINED_MODE\020\000\022\020\n\tR" - + "EAD_ONLY\020\265\231\354+\022\021\n\nREAD_WRITE\020\326\227\344RB\016\n\014_aut" - + "o_deleteB\007\n\005_modeB\t\n\007_source\"\241\001\n\024Preview" - + "RouterRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026" - + "\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\026\n\006router\030\311\256\356F \001(" - + "\tB\003\340A\002\022@\n\017router_resource\030\304\200\202J \001(\0132\037.goo" - + "gle.cloud.compute.v1.RouterB\003\340A\002\"\263\t\n\007Pro" - + "ject\022K\n\030common_instance_metadata\030\305\374\313X \001(" - + "\0132!.google.cloud.compute.v1.MetadataH\000\210\001" - + "\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022%\n" - + "\024default_network_tier\030\221\305\371\340\001 \001(\tH\002\210\001\001\022(\n\027" - + "default_service_account\030\245\371\267\216\001 \001(\tH\003\210\001\001\022\034" - + "\n\013description\030\374\207\326\311\001 \001(\tH\004\210\001\001\022\034\n\020enabled_" - + "features\030\373\306\322\337\001 \003(\t\022\020\n\002id\030\233\032 \001(\004H\005\210\001\001\022\024\n\004" - + "kind\030\224\367\310\001 \001(\tH\006\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001" - + "\0221\n\006quotas\030\373\241\342; \003(\0132\036.google.cloud.compu" - + "te.v1.Quota\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022" - + "T\n\025usage_export_location\030\302\262\334\245\001 \001(\0132,.goo" - + "gle.cloud.compute.v1.UsageExportLocation" - + "H\t\210\001\001\022\036\n\016vm_dns_setting\030\262\247\210\034 \001(\tH\n\210\001\001\022\"\n" - + "\022xpn_project_status\030\301\315\365l \001(\tH\013\210\001\001\"\236\001\n\022De" - + "faultNetworkTier\022\"\n\036UNDEFINED_DEFAULT_NE" - + "TWORK_TIER\020\000\022\026\n\016FIXED_STANDARD\020\310\236\205\224\001\022\017\n\007" - + "PREMIUM\020\267\264\301\276\001\022\020\n\010STANDARD\020\275\235\214\347\001\022)\n!STAND" - + "ARD_OVERRIDES_FIXED_STANDARD\020\302\207\221\336\001\"\222\001\n\014V" - + "mDnsSetting\022\034\n\030UNDEFINED_VM_DNS_SETTING\020" - + "\000\022\026\n\016GLOBAL_DEFAULT\020\205\333\332\244\001\022!\n\032UNSPECIFIED" - + "_VM_DNS_SETTING\020\232\273\202\021\022\025\n\rZONAL_DEFAULT\020\206\375" - + "\331\257\001\022\022\n\nZONAL_ONLY\020\347\272\303\370\001\"i\n\020XpnProjectSta" - + "tus\022 \n\034UNDEFINED_XPN_PROJECT_STATUS\020\000\022\013\n" - + "\004HOST\020\250\333\207\001\022&\n\036UNSPECIFIED_XPN_PROJECT_ST" - + "ATUS\020\251\372\247\242\001B\033\n\031_common_instance_metadataB" - + "\025\n\023_creation_timestampB\027\n\025_default_netwo" - + "rk_tierB\032\n\030_default_service_accountB\016\n\014_" - + "descriptionB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\014\n\n" - + "_self_linkB\030\n\026_usage_export_locationB\021\n\017" - + "_vm_dns_settingB\025\n\023_xpn_project_status\"z" - + "\n!ProjectsDisableXpnResourceRequest\022D\n\014x" - + "pn_resource\030\267\223\315? \001(\0132&.google.cloud.comp" - + "ute.v1.XpnResourceIdH\000\210\001\001B\017\n\r_xpn_resour" - + "ce\"y\n ProjectsEnableXpnResourceRequest\022D" - + "\n\014xpn_resource\030\267\223\315? \001(\0132&.google.cloud.c" - + "ompute.v1.XpnResourceIdH\000\210\001\001B\017\n\r_xpn_res" - + "ource\"\253\001\n\027ProjectsGetXpnResources\022\024\n\004kin" - + "d\030\224\367\310\001 \001(\tH\000\210\001\001\022\037\n\017next_page_token\030\225\272\206& " - + "\001(\tH\001\210\001\001\022<\n\tresources\030\245\374\262N \003(\0132&.google." - + "cloud.compute.v1.XpnResourceIdB\007\n\005_kindB" - + "\022\n\020_next_page_token\"L\n\033ProjectsListXpnHo" - + "stsRequest\022\034\n\014organization\030\263\332\2232 \001(\tH\000\210\001\001" - + "B\017\n\r_organization\"\350\001\n$ProjectsSetDefault" - + "NetworkTierRequest\022\035\n\014network_tier\030\323\272\333\366\001" - + " \001(\tH\000\210\001\001\"\217\001\n\013NetworkTier\022\032\n\026UNDEFINED_N" - + "ETWORK_TIER\020\000\022\026\n\016FIXED_STANDARD\020\310\236\205\224\001\022\017\n" - + "\007PREMIUM\020\267\264\301\276\001\022\020\n\010STANDARD\020\275\235\214\347\001\022)\n!STAN" - + "DARD_OVERRIDES_FIXED_STANDARD\020\302\207\221\336\001B\017\n\r_" - + "network_tier\"\322\006\n\026PublicAdvertisedPrefix\022" - + "\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013d" - + "escription\030\374\207\326\311\001 \001(\tH\001\210\001\001\022#\n\023dns_verific" - + "ation_ip\030\265\225\366r \001(\tH\002\210\001\001\022\033\n\013fingerprint\030\344\321" - + "\363o \001(\tH\003\210\001\001\022\020\n\002id\030\233\032 \001(\004H\004\210\001\001\022\035\n\rip_cidr" - + "_range\030\312\315\344. \001(\tH\005\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\006\210" - + "\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022j\n\030public_deleg" - + "ated_prefixs\030\213\276\205\313\001 \003(\0132D.google.cloud.co" - + "mpute.v1.PublicAdvertisedPrefixPublicDel" - + "egatedPrefix\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\010\210\001\001" - + "\022\036\n\rshared_secret\030\312\247\217\266\001 \001(\tH\t\210\001\001\022\026\n\006stat" - + "us\030\362\237\267V \001(\tH\n\210\001\001\"\361\001\n\006Status\022\024\n\020UNDEFINED" - + "_STATUS\020\000\022\017\n\007INITIAL\020\244\306\263\367\001\022%\n\035PREFIX_CON" - + "FIGURATION_COMPLETE\020\317\225\247\345\001\022(\n PREFIX_CONF" - + "IGURATION_IN_PROGRESS\020\261\365\300\264\001\022\"\n\032PREFIX_RE" - + "MOVAL_IN_PROGRESS\020\347\365\314\207\001\022\026\n\016PTR_CONFIGURE" - + "D\020\317\260\355\364\001\022!\n\031REVERSE_DNS_LOOKUP_FAILED\020\257\273\203" - + "\215\001\022\020\n\tVALIDATED\020\356\263\310\037B\025\n\023_creation_timest" - + "ampB\016\n\014_descriptionB\026\n\024_dns_verification" - + "_ipB\016\n\014_fingerprintB\005\n\003_idB\020\n\016_ip_cidr_r" - + "angeB\007\n\005_kindB\007\n\005_nameB\014\n\n_self_linkB\020\n\016" - + "_shared_secretB\t\n\007_status\"\275\002\n\032PublicAdve" - + "rtisedPrefixList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022A\n\005it" - + "ems\030\300\317\367/ \003(\0132/.google.cloud.compute.v1.P" - + "ublicAdvertisedPrefix\022\024\n\004kind\030\224\367\310\001 \001(\tH\001" + + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\037\n\017security_polic" + + "y\030\221\206\312Q \001(\tB\003\340A\002\022Q\n\030security_policy_resou" + + "rce\030\374\252\211g \001(\0132\'.google.cloud.compute.v1.S" + + "ecurityPolicyB\003\340A\002B\r\n\013_request_id\"\215\002\n\035Pa" + + "tchServiceAttachmentRequest\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(" + + "\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001\022#\n\022service_attachment\030\355\251\320\241\001 \001(\tB\003\340A\002" + + "\022X\n\033service_attachment_resource\030\240\266\304\341\001 \001(" + + "\0132*.google.cloud.compute.v1.ServiceAttac" + + "hmentB\003\340A\002B\r\n\013_request_id\"\314\001\n\025PatchSslPo" + + "licyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\nss" + + "l_policy\030\305\375\340\214\001 \001(\tB\003\340A\002\022H\n\023ssl_policy_re" + + "source\030\310\210\212\203\001 \001(\0132\".google.cloud.compute." + + "v1.SslPolicyB\003\340A\002B\r\n\013_request_id\"\260\002\n\026Pat" + + "chSubnetworkRequest\022&\n\025drain_timeout_sec" + + "onds\030\332\332\310\252\001 \001(\005H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB" + + "\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G" + + "\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\033\n\ns" + + "ubnetwork\030\356\247\344\222\001 \001(\tB\003\340A\002\022H\n\023subnetwork_r" + + "esource\030\277\332\221\024 \001(\0132#.google.cloud.compute." + + "v1.SubnetworkB\003\340A\002B\030\n\026_drain_timeout_sec" + + "ondsB\r\n\013_request_id\"\345\001\n\033PatchTargetGrpcP" + + "roxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022!\n\021ta" + + "rget_grpc_proxy\030\373\264\262\002 \001(\tB\003\340A\002\022U\n\032target_" + + "grpc_proxy_resource\030\322\352\353\234\001 \001(\0132(.google.c" + + "loud.compute.v1.TargetGrpcProxyB\003\340A\002B\r\n\013" + + "_request_id\"\344\001\n\033PatchTargetHttpProxyRequ" + + "est\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032" + + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022!\n\021target_htt" + + "p_proxy\030\345\276\322b \001(\tB\003\340A\002\022T\n\032target_http_pro" + + "xy_resource\030\250\257\343\013 \001(\0132(.google.cloud.comp" + + "ute.v1.TargetHttpProxyB\003\340A\002B\r\n\013_request_" + + "id\"\351\001\n\034PatchTargetHttpsProxyRequest\022!\n\007p" + + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreques" + + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\"\n\022target_https_proxy" + + "\030\354\260\372\030 \001(\tB\003\340A\002\022W\n\033target_https_proxy_res" + + "ource\030\201\255\344\316\001 \001(\0132).google.cloud.compute.v" + + "1.TargetHttpsProxyB\003\340A\002B\r\n\013_request_id\"\277" + + "\001\n\022PatchUrlMapRequest\022!\n\007project\030\231\226\301l \001(" + + "\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" + + "\000\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB\003\340A\002\022A\n\020url_ma" + + "p_resource\030\341\220\267P \001(\0132\037.google.cloud.compu" + + "te.v1.UrlMapB\003\340A\002B\r\n\013_request_id\"\277\004\n\013Pat" + + "hMatcher\022O\n\024default_route_action\030\252\264\327\264\001 \001" + + "(\0132(.google.cloud.compute.v1.HttpRouteAc" + + "tionH\000\210\001\001\022 \n\017default_service\030\267\345\305\260\001 \001(\tH\001" + + "\210\001\001\022R\n\024default_url_redirect\030\352\253\266\253\001 \001(\0132+." + + "google.cloud.compute.v1.HttpRedirectActi" + + "onH\002\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\003\210\001\001\022I\n" + + "\rheader_action\030\250\240\270\234\001 \001(\0132).google.cloud." + + "compute.v1.HttpHeaderActionH\004\210\001\001\022\024\n\004name" + + "\030\213\365\315\001 \001(\tH\005\210\001\001\0228\n\npath_rules\030\335\300\3461 \003(\0132!." + + "google.cloud.compute.v1.PathRule\022?\n\013rout" + + "e_rules\030\201\207\267\263\001 \003(\0132&.google.cloud.compute" + + ".v1.HttpRouteRuleB\027\n\025_default_route_acti" + + "onB\022\n\020_default_serviceB\027\n\025_default_url_r" + + "edirectB\016\n\014_descriptionB\020\n\016_header_actio" + + "nB\007\n\005_name\"\371\001\n\010PathRule\022\020\n\005paths\030\356\301\3402 \003(" + + "\t\022G\n\014route_action\030\354\251\271\312\001 \001(\0132(.google.clo" + + "ud.compute.v1.HttpRouteActionH\000\210\001\001\022\030\n\007se" + + "rvice\030\265\215\217\262\001 \001(\tH\001\210\001\001\022J\n\014url_redirect\030\254\241\230" + + "\301\001 \001(\0132+.google.cloud.compute.v1.HttpRed" + + "irectActionH\002\210\001\001B\017\n\r_route_actionB\n\n\010_se" + + "rviceB\017\n\r_url_redirect\"\363\002\n\021PerInstanceCo" + + "nfig\022\033\n\013fingerprint\030\344\321\363o \001(\tH\000\210\001\001\022\024\n\004nam" + + "e\030\213\365\315\001 \001(\tH\001\210\001\001\022H\n\017preserved_state\030\252\342\240\001 " + + "\001(\0132\'.google.cloud.compute.v1.PreservedS" + + "tateH\002\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\003\210\001\001\"\220\001\n\006St" + + "atus\022\024\n\020UNDEFINED_STATUS\020\000\022\020\n\010APPLYING\020\264" + + "\313\354\247\001\022\020\n\010DELETING\020\250\247\207\374\001\022\020\n\tEFFECTIVE\020\207\363\270t" + + "\022\013\n\004NONE\020\270\316\222\001\022\021\n\tUNAPPLIED\020\244\207\341\346\001\022\032\n\022UNAP" + + "PLIED_DELETION\020\211\264\332\225\001B\016\n\014_fingerprintB\007\n\005" + + "_nameB\022\n\020_preserved_stateB\t\n\007_status\"\241\002\n" + + "\006Policy\022?\n\raudit_configs\030\215\272\270\234\001 \003(\0132$.goo" + + "gle.cloud.compute.v1.AuditConfig\0226\n\010bind" + + "ings\030\216\305\244\300\001 \003(\0132 .google.cloud.compute.v1" + + ".Binding\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\022\032\n\tiam_ow" + + "ned\030\273\260\354\326\001 \001(\010H\001\210\001\001\022/\n\005rules\030\367\221\3653 \003(\0132\035.g" + + "oogle.cloud.compute.v1.Rule\022\030\n\007version\030\330" + + "\271\324\247\001 \001(\005H\002\210\001\001B\007\n\005_etagB\014\n\n_iam_ownedB\n\n\010" + + "_version\"]\n\023PreconfiguredWafSet\022F\n\017expre" + + "ssion_sets\030\230\253\203\342\001 \003(\0132).google.cloud.comp" + + "ute.v1.WafExpressionSet\"\267\002\n\016PreservedSta" + + "te\022D\n\005disks\030\366\314\312- \003(\01322.google.cloud.comp", + "ute.v1.PreservedState.DisksEntry\022J\n\010meta" + + "data\030\257\366\265) \003(\01325.google.cloud.compute.v1." + + "PreservedState.MetadataEntry\032b\n\nDisksEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022C\n\005value\030\002 \001(\01324.google." + + "cloud.compute.v1.PreservedStatePreserved" + + "Disk:\0028\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\"\254\002\n\033PreservedStatePres" + + "ervedDisk\022\034\n\013auto_delete\030\273\344\316\335\001 \001(\tH\000\210\001\001\022" + + "\024\n\004mode\030\243\363\314\001 \001(\tH\001\210\001\001\022\026\n\006source\030\233\320\301T \001(\t" + + "H\002\210\001\001\"\\\n\nAutoDelete\022\031\n\025UNDEFINED_AUTO_DE" + + "LETE\020\000\022\014\n\005NEVER\020\354\244\257#\022%\n\036ON_PERMANENT_INS" + + "TANCE_DELETION\020\347\340\322-\"?\n\004Mode\022\022\n\016UNDEFINED" + + "_MODE\020\000\022\020\n\tREAD_ONLY\020\265\231\354+\022\021\n\nREAD_WRITE\020" + + "\326\227\344RB\016\n\014_auto_deleteB\007\n\005_modeB\t\n\007_source" + + "\"\241\001\n\024PreviewRouterRequest\022\027\n\007project\030\231\226\301" + + "l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\026\n\006ro" + + "uter\030\311\256\356F \001(\tB\003\340A\002\022@\n\017router_resource\030\304\200" + + "\202J \001(\0132\037.google.cloud.compute.v1.RouterB" + + "\003\340A\002\"\263\t\n\007Project\022K\n\030common_instance_meta" + + "data\030\305\374\313X \001(\0132!.google.cloud.compute.v1." + + "MetadataH\000\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016" + + " \001(\tH\001\210\001\001\022%\n\024default_network_tier\030\221\305\371\340\001 " + + "\001(\tH\002\210\001\001\022(\n\027default_service_account\030\245\371\267\216" + + "\001 \001(\tH\003\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\004\210\001\001" + + "\022\034\n\020enabled_features\030\373\306\322\337\001 \003(\t\022\020\n\002id\030\233\032 " + + "\001(\004H\005\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\006\210\001\001\022\024\n\004name\030\213" + + "\365\315\001 \001(\tH\007\210\001\001\0221\n\006quotas\030\373\241\342; \003(\0132\036.google" + + ".cloud.compute.v1.Quota\022\032\n\tself_link\030\215\222\305" + + "\331\001 \001(\tH\010\210\001\001\022T\n\025usage_export_location\030\302\262\334" + + "\245\001 \001(\0132,.google.cloud.compute.v1.UsageEx" + + "portLocationH\t\210\001\001\022\036\n\016vm_dns_setting\030\262\247\210\034" + + " \001(\tH\n\210\001\001\022\"\n\022xpn_project_status\030\301\315\365l \001(\t" + + "H\013\210\001\001\"\236\001\n\022DefaultNetworkTier\022\"\n\036UNDEFINE" + + "D_DEFAULT_NETWORK_TIER\020\000\022\026\n\016FIXED_STANDA" + + "RD\020\310\236\205\224\001\022\017\n\007PREMIUM\020\267\264\301\276\001\022\020\n\010STANDARD\020\275\235" + + "\214\347\001\022)\n!STANDARD_OVERRIDES_FIXED_STANDARD" + + "\020\302\207\221\336\001\"\222\001\n\014VmDnsSetting\022\034\n\030UNDEFINED_VM_" + + "DNS_SETTING\020\000\022\026\n\016GLOBAL_DEFAULT\020\205\333\332\244\001\022!\n" + + "\032UNSPECIFIED_VM_DNS_SETTING\020\232\273\202\021\022\025\n\rZONA" + + "L_DEFAULT\020\206\375\331\257\001\022\022\n\nZONAL_ONLY\020\347\272\303\370\001\"i\n\020X" + + "pnProjectStatus\022 \n\034UNDEFINED_XPN_PROJECT" + + "_STATUS\020\000\022\013\n\004HOST\020\250\333\207\001\022&\n\036UNSPECIFIED_XP" + + "N_PROJECT_STATUS\020\251\372\247\242\001B\033\n\031_common_instan" + + "ce_metadataB\025\n\023_creation_timestampB\027\n\025_d" + + "efault_network_tierB\032\n\030_default_service_" + + "accountB\016\n\014_descriptionB\005\n\003_idB\007\n\005_kindB" + + "\007\n\005_nameB\014\n\n_self_linkB\030\n\026_usage_export_" + + "locationB\021\n\017_vm_dns_settingB\025\n\023_xpn_proj" + + "ect_status\"z\n!ProjectsDisableXpnResource" + + "Request\022D\n\014xpn_resource\030\267\223\315? \001(\0132&.googl" + + "e.cloud.compute.v1.XpnResourceIdH\000\210\001\001B\017\n" + + "\r_xpn_resource\"y\n ProjectsEnableXpnResou" + + "rceRequest\022D\n\014xpn_resource\030\267\223\315? \001(\0132&.go" + + "ogle.cloud.compute.v1.XpnResourceIdH\000\210\001\001" + + "B\017\n\r_xpn_resource\"\253\001\n\027ProjectsGetXpnReso" + + "urces\022\024\n\004kind\030\224\367\310\001 \001(\tH\000\210\001\001\022\037\n\017next_page" + + "_token\030\225\272\206& \001(\tH\001\210\001\001\022<\n\tresources\030\245\374\262N \003" + + "(\0132&.google.cloud.compute.v1.XpnResource" + + "IdB\007\n\005_kindB\022\n\020_next_page_token\"L\n\033Proje" + + "ctsListXpnHostsRequest\022\034\n\014organization\030\263" + + "\332\2232 \001(\tH\000\210\001\001B\017\n\r_organization\"\350\001\n$Projec" + + "tsSetDefaultNetworkTierRequest\022\035\n\014networ" + + "k_tier\030\323\272\333\366\001 \001(\tH\000\210\001\001\"\217\001\n\013NetworkTier\022\032\n" + + "\026UNDEFINED_NETWORK_TIER\020\000\022\026\n\016FIXED_STAND" + + "ARD\020\310\236\205\224\001\022\017\n\007PREMIUM\020\267\264\301\276\001\022\020\n\010STANDARD\020\275" + + "\235\214\347\001\022)\n!STANDARD_OVERRIDES_FIXED_STANDAR" + + "D\020\302\207\221\336\001B\017\n\r_network_tier\"\322\006\n\026PublicAdver" + + "tisedPrefix\022\"\n\022creation_timestamp\030\266\217\307\016 \001" + + "(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022#\n" + + "\023dns_verification_ip\030\265\225\366r \001(\tH\002\210\001\001\022\033\n\013fi" + + "ngerprint\030\344\321\363o \001(\tH\003\210\001\001\022\020\n\002id\030\233\032 \001(\004H\004\210\001" + + "\001\022\035\n\rip_cidr_range\030\312\315\344. \001(\tH\005\210\001\001\022\024\n\004kind" + + "\030\224\367\310\001 \001(\tH\006\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022j\n\030" + + "public_delegated_prefixs\030\213\276\205\313\001 \003(\0132D.goo" + + "gle.cloud.compute.v1.PublicAdvertisedPre" + + "fixPublicDelegatedPrefix\022\032\n\tself_link\030\215\222" + + "\305\331\001 \001(\tH\010\210\001\001\022\036\n\rshared_secret\030\312\247\217\266\001 \001(\tH" + + "\t\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\n\210\001\001\"\361\001\n\006Status\022" + + "\024\n\020UNDEFINED_STATUS\020\000\022\017\n\007INITIAL\020\244\306\263\367\001\022%" + + "\n\035PREFIX_CONFIGURATION_COMPLETE\020\317\225\247\345\001\022(\n" + + " PREFIX_CONFIGURATION_IN_PROGRESS\020\261\365\300\264\001\022" + + "\"\n\032PREFIX_REMOVAL_IN_PROGRESS\020\347\365\314\207\001\022\026\n\016P" + + "TR_CONFIGURED\020\317\260\355\364\001\022!\n\031REVERSE_DNS_LOOKU" + + "P_FAILED\020\257\273\203\215\001\022\020\n\tVALIDATED\020\356\263\310\037B\025\n\023_cre" + + "ation_timestampB\016\n\014_descriptionB\026\n\024_dns_" + + "verification_ipB\016\n\014_fingerprintB\005\n\003_idB\020" + + "\n\016_ip_cidr_rangeB\007\n\005_kindB\007\n\005_nameB\014\n\n_s" + + "elf_linkB\020\n\016_shared_secretB\t\n\007_status\"\275\002" + + "\n\032PublicAdvertisedPrefixList\022\020\n\002id\030\233\032 \001(" + + "\tH\000\210\001\001\022A\n\005items\030\300\317\367/ \003(\0132/.google.cloud." + + "compute.v1.PublicAdvertisedPrefix\022\024\n\004kin" + + "d\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& " + + "\001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007" + + "warning\030\234\337\226\030 \001(\0132 .google.cloud.compute." + + "v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next" + + "_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\336\001" + + "\n+PublicAdvertisedPrefixPublicDelegatedP" + + "refix\022\030\n\010ip_range\030\245\340\227E \001(\tH\000\210\001\001\022\024\n\004name\030" + + "\213\365\315\001 \001(\tH\001\210\001\001\022\027\n\007project\030\231\226\301l \001(\tH\002\210\001\001\022\026" + + "\n\006region\030\364\315\240B \001(\tH\003\210\001\001\022\026\n\006status\030\362\237\267V \001(" + + "\tH\004\210\001\001B\013\n\t_ip_rangeB\007\n\005_nameB\n\n\010_project" + + "B\t\n\007_regionB\t\n\007_status\"\366\005\n\025PublicDelegat" + + "edPrefix\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH" + + "\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\033\n\013fi" + + "ngerprint\030\344\321\363o \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001" + + "\001\022\035\n\rip_cidr_range\030\312\315\344. \001(\tH\004\210\001\001\022\"\n\021is_l" + + "ive_migration\030\360\237\207\364\001 \001(\010H\005\210\001\001\022\024\n\004kind\030\224\367\310" + + "\001 \001(\tH\006\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022\035\n\rpare" + + "nt_prefix\030\307\347\241\007 \001(\tH\010\210\001\001\022o\n\034public_delega" + + "ted_sub_prefixs\030\214\376\213Z \003(\0132F.google.cloud." + + "compute.v1.PublicDelegatedPrefixPublicDe" + + "legatedSubPrefix\022\026\n\006region\030\364\315\240B \001(\tH\t\210\001\001" + + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\n\210\001\001\022\026\n\006status\030\362" + + "\237\267V \001(\tH\013\210\001\001\"s\n\006Status\022\024\n\020UNDEFINED_STAT" + + "US\020\000\022\021\n\tANNOUNCED\020\373\221\214\256\001\022\020\n\010DELETING\020\250\247\207\374" + + "\001\022\024\n\014INITIALIZING\020\315\330\230\222\001\022\030\n\021READY_TO_ANNO" + + "UNCE\020\361\261\351\036B\025\n\023_creation_timestampB\016\n\014_des" + + "criptionB\016\n\014_fingerprintB\005\n\003_idB\020\n\016_ip_c" + + "idr_rangeB\024\n\022_is_live_migrationB\007\n\005_kind" + + "B\007\n\005_nameB\020\n\016_parent_prefixB\t\n\007_regionB\014" + + "\n\n_self_linkB\t\n\007_status\"\341\003\n#PublicDelega" + + "tedPrefixAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" + + "\001\022Y\n\005items\030\300\317\367/ \003(\0132G.google.cloud.compu" + + "te.v1.PublicDelegatedPrefixAggregatedLis" + + "t.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" + + "xt_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link" + + "\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t" + + "\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comp" + + "ute.v1.WarningH\004\210\001\001\032h\n\nItemsEntry\022\013\n\003key" + + "\030\001 \001(\t\022I\n\005value\030\002 \001(\0132:.google.cloud.com" + + "pute.v1.PublicDelegatedPrefixesScopedLis" + + "t:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_toke" + + "nB\014\n\n_self_linkB\n\n\010_warning\"\273\002\n\031PublicDe" + + "legatedPrefixList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022@\n\005i" + + "tems\030\300\317\367/ \003(\0132..google.cloud.compute.v1." + + "PublicDelegatedPrefix\022\024\n\004kind\030\224\367\310\001 \001(\tH\001" + "\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\t" + "self_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030" - + " \001(\0132 .google.cloud.compute.v1.WarningH\004" - + "\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB" - + "\014\n\n_self_linkB\n\n\010_warning\"\336\001\n+PublicAdve" - + "rtisedPrefixPublicDelegatedPrefix\022\030\n\010ip_" - + "range\030\245\340\227E \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001" - + "\001\022\027\n\007project\030\231\226\301l \001(\tH\002\210\001\001\022\026\n\006region\030\364\315\240" - + "B \001(\tH\003\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\004\210\001\001B\013\n\t_i" - + "p_rangeB\007\n\005_nameB\n\n\010_projectB\t\n\007_regionB" - + "\t\n\007_status\"\366\005\n\025PublicDelegatedPrefix\022\"\n\022" - + "creation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013desc" - + "ription\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\033\n\013fingerprint\030\344\321" - + "\363o \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\035\n\rip_cidr" - + "_range\030\312\315\344. \001(\tH\004\210\001\001\022\"\n\021is_live_migratio" - + "n\030\360\237\207\364\001 \001(\010H\005\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\006\210\001\001\022\024" - + "\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022\035\n\rparent_prefix\030\307\347" - + "\241\007 \001(\tH\010\210\001\001\022o\n\034public_delegated_sub_pref" - + "ixs\030\214\376\213Z \003(\0132F.google.cloud.compute.v1.P" - + "ublicDelegatedPrefixPublicDelegatedSubPr" - + "efix\022\026\n\006region\030\364\315\240B \001(\tH\t\210\001\001\022\032\n\tself_lin" - + "k\030\215\222\305\331\001 \001(\tH\n\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\013\210\001\001" - + "\"s\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\021\n\tANNO" - + "UNCED\020\373\221\214\256\001\022\020\n\010DELETING\020\250\247\207\374\001\022\024\n\014INITIAL" - + "IZING\020\315\330\230\222\001\022\030\n\021READY_TO_ANNOUNCE\020\361\261\351\036B\025\n" - + "\023_creation_timestampB\016\n\014_descriptionB\016\n\014" - + "_fingerprintB\005\n\003_idB\020\n\016_ip_cidr_rangeB\024\n" - + "\022_is_live_migrationB\007\n\005_kindB\007\n\005_nameB\020\n" - + "\016_parent_prefixB\t\n\007_regionB\014\n\n_self_link" - + "B\t\n\007_status\"\341\003\n#PublicDelegatedPrefixAgg" - + "regatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022Y\n\005items\030\300" - + "\317\367/ \003(\0132G.google.cloud.compute.v1.Public" - + "DelegatedPrefixAggregatedList.ItemsEntry" - + "\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_toke" - + "n\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003" - + "\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030" - + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" - + "ngH\004\210\001\001\032h\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022I\n\005va" - + "lue\030\002 \001(\0132:.google.cloud.compute.v1.Publ" - + "icDelegatedPrefixesScopedList:\0028\001B\005\n\003_id" - + "B\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_l" - + "inkB\n\n\010_warning\"\273\002\n\031PublicDelegatedPrefi" - + "xList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022@\n\005items\030\300\317\367/ \003(" - + "\0132..google.cloud.compute.v1.PublicDelega" - + "tedPrefix\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_" - + "page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222" - + "\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .googl" - + "e.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007" - + "\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_lin" - + "kB\n\n\010_warning\"\233\003\n-PublicDelegatedPrefixP" - + "ublicDelegatedSubPrefix\022\"\n\021delegatee_pro" - + "ject\030\332\212\351\305\001 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001" - + " \001(\tH\001\210\001\001\022\035\n\rip_cidr_range\030\312\315\344. \001(\tH\002\210\001\001" - + "\022\033\n\nis_address\030\337\213\222\250\001 \001(\010H\003\210\001\001\022\024\n\004name\030\213\365" - + "\315\001 \001(\tH\004\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\005\210\001\001\022\026\n\006s" - + "tatus\030\362\237\267V \001(\tH\006\210\001\001\"@\n\006Status\022\024\n\020UNDEFIN" - + "ED_STATUS\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\020\n\010INACTIVE\020" - + "\353\230\371\200\001B\024\n\022_delegatee_projectB\016\n\014_descript" - + "ionB\020\n\016_ip_cidr_rangeB\r\n\013_is_addressB\007\n\005" - + "_nameB\t\n\007_regionB\t\n\007_status\"\301\001\n!PublicDe" - + "legatedPrefixesScopedList\022U\n\031public_dele" - + "gated_prefixes\030\226\202\252\226\001 \003(\0132..google.cloud." - + "compute.v1.PublicDelegatedPrefix\0229\n\007warn" - + "ing\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.W" - + "arningH\000\210\001\001B\n\n\010_warning\"\310\"\n\005Quota\022\025\n\005lim" - + "it\030\273\227\2151 \001(\001H\000\210\001\001\022\027\n\006metric\030\260\353\227\376\001 \001(\tH\001\210\001" - + "\001\022\025\n\005owner\030\263\345\3172 \001(\tH\002\210\001\001\022\025\n\005usage\030\241\373\2315 \001" - + "(\001H\003\210\001\001\"\267!\n\006Metric\022\024\n\020UNDEFINED_METRIC\020\000" - + "\022\016\n\007A2_CPUS\020\271\376\206I\022\026\n\017AFFINITY_GROUPS\020\313\251\3223" - + "\022\023\n\013AUTOSCALERS\020\334\340\332\340\001\022\026\n\017BACKEND_BUCKETS" - + "\020\336\211\320A\022\030\n\020BACKEND_SERVICES\020\311\303\310\200\001\022\020\n\010C2D_C" - + "PUS\020\365\377\250\362\001\022\017\n\007C2_CPUS\020\273\353\270\227\001\022\017\n\007C3_CPUS\020\332\234" - + "\214\245\001\022\023\n\013COMMITMENTS\020\336\327\300\331\001\022\030\n\021COMMITTED_A2" - + "_CPUS\020\326\242\245\034\022\032\n\022COMMITTED_C2D_CPUS\020\370\342\323\206\001\022\030" - + "\n\021COMMITTED_C2_CPUS\020\330\217\327j\022\030\n\021COMMITTED_C3" - + "_CPUS\020\367\300\252x\022\026\n\016COMMITTED_CPUS\020\316\255\266\213\001\022\031\n\021CO" - + "MMITTED_E2_CPUS\020\332\374\210\271\001\022\032\n\022COMMITTED_LICEN" - + "SES\020\325\313\302\252\001\022$\n\034COMMITTED_LOCAL_SSD_TOTAL_G" - + "B\020\210\354\206\223\001\022\027\n\021COMMITTED_M3_CPUS\020\201\342#\022\'\n\037COMM" - + "ITTED_MEMORY_OPTIMIZED_CPUS\020\336\334\231\351\001\022\031\n\022COM" - + "MITTED_N2A_CPUS\020\260\252\215\023\022\031\n\022COMMITTED_N2D_CP" - + "US\020\215\276\207<\022\031\n\021COMMITTED_N2_CPUS\020\243\247\351\231\001\022\'\n\037CO" - + "MMITTED_NVIDIA_A100_80GB_GPUS\020\245\237\264\335\001\022\"\n\032C" - + "OMMITTED_NVIDIA_A100_GPUS\020\225\375\230\263\001\022 \n\031COMMI" - + "TTED_NVIDIA_K80_GPUS\020\244\266\353\001\022!\n\032COMMITTED_N" - + "VIDIA_P100_GPUS\020\244\377\2423\022 \n\030COMMITTED_NVIDIA" - + "_P4_GPUS\020\201\256\365\245\001\022\037\n\030COMMITTED_NVIDIA_T4_GP" - + "US\020\205\210\331B\022 \n\032COMMITTED_NVIDIA_V100_GPUS\020\252\263" - + "\r\022\032\n\022COMMITTED_T2A_CPUS\020\352\304\251\215\001\022\032\n\022COMMITT" - + "ED_T2D_CPUS\020\307\330\243\266\001\022\n\n\004CPUS\020\313\327~\022\030\n\020CPUS_AL" - + "L_REGIONS\020\255\221\306\340\001\022\026\n\016DISKS_TOTAL_GB\020\237\227\311\250\001\022" - + "\017\n\007E2_CPUS\020\275\330\352\345\001\022(\n!EXTERNAL_MANAGED_FOR" - + "WARDING_RULES\020\311\277\363G\022,\n$EXTERNAL_NETWORK_L" - + "B_FORWARDING_RULES\020\231\255\275\262\001\022)\n\"EXTERNAL_PRO" - + "TOCOL_FORWARDING_RULES\020\350\270\242\036\022\035\n\025EXTERNAL_" - + "VPN_GATEWAYS\020\256\273\365\201\001\022\021\n\tFIREWALLS\020\323\346\310\262\001\022\030\n" - + "\020FORWARDING_RULES\020\225\202\250\316\001\022/\n(GLOBAL_EXTERN" - + "AL_MANAGED_BACKEND_SERVICES\020\341\255\274N\0220\n(GLOB" - + "AL_EXTERNAL_MANAGED_FORWARDING_RULES\020\255\354\233" - + "\234\001\0221\n)GLOBAL_EXTERNAL_PROXY_LB_BACKEND_S" - + "ERVICES\020\251\331\355\276\001\022 \n\031GLOBAL_INTERNAL_ADDRESS" - + "ES\020\234\305\260\024\022/\n(GLOBAL_INTERNAL_MANAGED_BACKE" - + "ND_SERVICES\020\257\220\256z\0229\n1GLOBAL_INTERNAL_TRAF" - + "FIC_DIRECTOR_BACKEND_SERVICES\020\324\336\241\232\001\022\027\n\020G" - + "PUS_ALL_REGIONS\020\251\200\344\022\022\025\n\rHEALTH_CHECKS\020\256\257" - + "\374\211\001\022\r\n\006IMAGES\020\370\354\265\007\022\020\n\tINSTANCES\020\336\234\320>\022\027\n\017" - + "INSTANCE_GROUPS\020\276\311\333\251\001\022\036\n\027INSTANCE_GROUP_" - + "MANAGERS\020\260\242\3050\022\031\n\022INSTANCE_TEMPLATES\020\357\267\355k" - + "\022\025\n\rINTERCONNECTS\020\205\213\376\305\001\022*\n#INTERCONNECT_" - + "ATTACHMENTS_PER_REGION\020\326\326\243L\022+\n#INTERCONN" - + "ECT_ATTACHMENTS_TOTAL_MBPS\020\363\272\331\312\001\022\037\n\027INTE" - + "RCONNECT_TOTAL_GBPS\020\252\361\207\210\001\022\031\n\022INTERNAL_AD" - + "DRESSES\020\200\351\256^\0221\n*INTERNAL_TRAFFIC_DIRECTO" - + "R_FORWARDING_RULES\020\204\351\205\177\022\031\n\022IN_PLACE_SNAP" - + "SHOTS\020\235\235\226H\022\030\n\020IN_USE_ADDRESSES\020\220\342\337\277\001\022\036\n\027" - + "IN_USE_BACKUP_SCHEDULES\020\221\222\321\017\022!\n\031IN_USE_S" - + "NAPSHOT_SCHEDULES\020\223\314\254\334\001\022\032\n\022LOCAL_SSD_TOT" - + "AL_GB\020\305\230\343\235\001\022\016\n\007M1_CPUS\020\246\333\336\021\022\016\n\007M2_CPUS\020\305" - + "\214\262\037\022\016\n\007M3_CPUS\020\344\275\205-\022\026\n\016MACHINE_IMAGES\020\220\363" - + "\221\325\001\022\017\n\010N2A_CPUS\020\255\307\342~\022\020\n\010N2D_CPUS\020\212\333\334\247\001\022\017" - + "\n\007N2_CPUS\020\206\203\313\306\001\022\020\n\010NETWORKS\020\205\270\277\347\001\022\032\n\023NET" - + "WORK_ATTACHMENTS\020\337\375\207G\022\036\n\027NETWORK_ENDPOIN" - + "T_GROUPS\020\215\267\3320\022 \n\031NETWORK_FIREWALL_POLICI" - + "ES\020\276\333\2330\022\022\n\013NODE_GROUPS\020\261\375\336\013\022\026\n\016NODE_TEMP" - + "LATES\020\234\262\271\342\001\022\035\n\025NVIDIA_A100_80GB_GPUS\020\310\350\307" - + "\210\001\022\030\n\020NVIDIA_A100_GPUS\020\222\200\337\360\001\022\026\n\017NVIDIA_K" - + "80_GPUS\020\207\354\222N\022\027\n\020NVIDIA_P100_GPUS\020\241\202\351p\022\033\n" - + "\024NVIDIA_P100_VWS_GPUS\020\216\335\203f\022\026\n\016NVIDIA_P4_" - + "GPUS\020\276\247\254\207\001\022\032\n\022NVIDIA_P4_VWS_GPUS\020\253\325\364\373\001\022\025" - + "\n\016NVIDIA_T4_GPUS\020\302\201\220$\022\032\n\022NVIDIA_T4_VWS_G" - + "PUS\020\257\353\277\230\001\022\027\n\020NVIDIA_V100_GPUS\020\247\266\323=\022\030\n\021PA" - + "CKET_MIRRORINGS\020\247\352\266\007\022(\n!PD_EXTREME_TOTAL" - + "_PROVISIONED_IOPS\020\355\326\227!\022\027\n\020PREEMPTIBLE_CP" - + "US\020\311\215\343w\022\037\n\030PREEMPTIBLE_LOCAL_SSD_GB\020\210\223\257|" - + "\022(\n!PREEMPTIBLE_NVIDIA_A100_80GB_GPUS\020\212\352" - + "\271H\022#\n\034PREEMPTIBLE_NVIDIA_A100_GPUS\020\220\234\351 \022" - + "#\n\033PREEMPTIBLE_NVIDIA_K80_GPUS\020\311\340\345\262\001\022$\n\034" - + "PREEMPTIBLE_NVIDIA_P100_GPUS\020\237\236\363\240\001\022(\n PR" - + "EEMPTIBLE_NVIDIA_P100_VWS_GPUS\020\214\233\301\225\001\022\"\n\032" - + "PREEMPTIBLE_NVIDIA_P4_GPUS\020\274\222\324\314\001\022%\n\036PREE" - + "MPTIBLE_NVIDIA_P4_VWS_GPUS\020\251\342\320x\022!\n\032PREEM" - + "PTIBLE_NVIDIA_T4_GPUS\020\300\354\267i\022%\n\036PREEMPTIBL" - + "E_NVIDIA_T4_VWS_GPUS\020\255\370\233\025\022#\n\034PREEMPTIBLE" - + "_NVIDIA_V100_GPUS\020\245\322\335m\022=\n6PSC_ILB_CONSUM" - + "ER_FORWARDING_RULES_PER_PRODUCER_NETWORK" - + "\020\203\223\235n\022\'\n PSC_INTERNAL_LB_FORWARDING_RULE" - + "S\020\373\242\313P\022\"\n\032PUBLIC_ADVERTISED_PREFIXES\020\314\241\342" - + "\340\001\022!\n\031PUBLIC_DELEGATED_PREFIXES\020\266\222\363\375\001\022\033\n" - + "\024REGIONAL_AUTOSCALERS\020\274\234\200\016\0221\n*REGIONAL_E" - + "XTERNAL_MANAGED_BACKEND_SERVICES\020\335\354\202\002\0225\n" - + "-REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SE" - + "RVICES\020\355\352\245\303\001\022\'\n REGIONAL_INSTANCE_GROUP_" - + "MANAGERS\020\220\276\363\021\022,\n%REGIONAL_INTERNAL_LB_BA" - + "CKEND_SERVICES\020\220\356\345A\0221\n*REGIONAL_INTERNAL" - + "_MANAGED_BACKEND_SERVICES\020\253\317\364-\022\023\n\014RESERV" - + "ATIONS\020\247\274\310\017\022\030\n\021RESOURCE_POLICIES\020\341\234\204(\022\017\n" - + "\007ROUTERS\020\252\274\213\353\001\022\016\n\006ROUTES\020\312\226\272\203\001\022\030\n\021SECURI" - + "TY_POLICIES\020\357\246\257Z\022#\n\034SECURITY_POLICIES_PE" - + "R_REGION\020\306\246\340v\022#\n\033SECURITY_POLICY_CEVAL_R" - + "ULES\020\311\247\300\340\001\022\034\n\025SECURITY_POLICY_RULES\020\251\324\207a" - + "\022\'\n SECURITY_POLICY_RULES_PER_REGION\020\314\310\251" - + "<\022\033\n\023SERVICE_ATTACHMENTS\020\346\261\353\340\001\022\021\n\tSNAPSH" - + "OTS\020\217\346\337\243\001\022\023\n\014SSD_TOTAL_GB\020\321\257\217M\022\030\n\020SSL_CE" - + "RTIFICATES\020\257\202\266\264\001\022\027\n\020STATIC_ADDRESSES\020\361\255\322" - + ",\022\036\n\026STATIC_BYOIP_ADDRESSES\020\361\212\302\203\001\022+\n#STA" - + "TIC_EXTERNAL_IPV6_ADDRESS_RANGES\020\226\341\235\341\001\022\023" - + "\n\013SUBNETWORKS\020\245\374\363\310\001\022\020\n\010T2A_CPUS\020\347\341\376\370\001\022\017\n" - + "\010T2D_CPUS\020\304\365\370!\022\033\n\024TARGET_HTTPS_PROXIES\020\312" - + "\313\326h\022\032\n\023TARGET_HTTP_PROXIES\020\243\365\240N\022\030\n\020TARGE" - + "T_INSTANCES\020\260\332\325\207\001\022\024\n\014TARGET_POOLS\020\211\227\210\246\001\022" - + "\031\n\022TARGET_SSL_PROXIES\020\353\344\365K\022\031\n\022TARGET_TCP" - + "_PROXIES\020\300\236\363V\022\032\n\023TARGET_VPN_GATEWAYS\020\250\273\343" - + "#\022\020\n\010URL_MAPS\020\207\317\307\264\001\022\023\n\014VPN_GATEWAYS\020\272\213\376\020" - + "\022\022\n\013VPN_TUNNELS\020\200\321\3371\022\033\n\024XPN_SERVICE_PROJ" - + "ECTS\020\255\207\262-B\010\n\006_limitB\t\n\007_metricB\010\n\006_owner" - + "B\010\n\006_usage\"\225\002\n\021QuotaExceededInfo\022R\n\ndime" - + "nsions\030\315\377\310\305\001 \003(\0132:.google.cloud.compute." - + "v1.QuotaExceededInfo.DimensionsEntry\022\025\n\005" - + "limit\030\273\227\2151 \001(\001H\000\210\001\001\022\033\n\nlimit_name\030\217\211\360\275\001 " - + "\001(\tH\001\210\001\001\022\034\n\013metric_name\030\272\227\271\303\001 \001(\tH\002\210\001\001\0321" - + "\n\017DimensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - + "\002 \001(\t:\0028\001B\010\n\006_limitB\r\n\013_limit_nameB\016\n\014_m" - + "etric_name\"\314\001\n\007RawDisk\022\037\n\016container_type" - + "\030\270\310\202\230\001 \001(\tH\000\210\001\001\022\036\n\rsha1_checksum\030\275\224\370\225\001 \001" - + "(\tH\001\210\001\001\022\026\n\006source\030\233\320\301T \001(\tH\002\210\001\001\"8\n\rConta" - + "inerType\022\034\n\030UNDEFINED_CONTAINER_TYPE\020\000\022\t" - + "\n\003TAR\020\205\207\005B\021\n\017_container_typeB\020\n\016_sha1_ch" - + "ecksumB\t\n\007_source\"\327\002\n,RecreateInstancesI" - + "nstanceGroupManagerRequest\022&\n\026instance_g" - + "roup_manager\030\303\367\363v \001(\tB\003\340A\002\022\223\001\n;instance_" - + "group_managers_recreate_instances_reques" - + "t_resource\030\200\302\232\n \001(\0132F.google.cloud.compu" - + "te.v1.InstanceGroupManagersRecreateInsta" - + "ncesRequestB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022" - + "\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request" - + "_id\"\333\002\n2RecreateInstancesRegionInstanceG" - + "roupManagerRequest\022&\n\026instance_group_man" - + "ager\030\303\367\363v \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r" - + "\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006" - + "region\022\215\001\n8region_instance_group_manager" - + "s_recreate_request_resource\030\224\374\304Q \001(\0132C.g" - + "oogle.cloud.compute.v1.RegionInstanceGro" - + "upManagersRecreateRequestB\003\340A\002\022\032\n\nreques" - + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\250\001\n\tRe" - + "ference\022\024\n\004kind\030\224\367\310\001 \001(\tH\000\210\001\001\022\036\n\016referen" - + "ce_type\030\256\277\203v \001(\tH\001\210\001\001\022\031\n\010referrer\030\237\370\271\247\001 " - + "\001(\tH\002\210\001\001\022\026\n\006target\030\221\343\371[ \001(\tH\003\210\001\001B\007\n\005_kin" - + "dB\021\n\017_reference_typeB\013\n\t_referrerB\t\n\007_ta" - + "rget\"\227\004\n\006Region\022\"\n\022creation_timestamp\030\266\217" - + "\307\016 \001(\tH\000\210\001\001\022G\n\ndeprecated\030\263\313\321\365\001 \001(\0132*.go" - + "ogle.cloud.compute.v1.DeprecationStatusH" - + "\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\020\n\002id" - + "\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004na" - + "me\030\213\365\315\001 \001(\tH\005\210\001\001\0221\n\006quotas\030\373\241\342; \003(\0132\036.go" - + "ogle.cloud.compute.v1.Quota\022\032\n\tself_link" - + "\030\215\222\305\331\001 \001(\tH\006\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\007\210\001\001\022" - + "\034\n\014supports_pzs\030\356\366\205( \001(\010H\010\210\001\001\022\020\n\005zones\030\307" - + "\244\2557 \003(\t\"4\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022" - + "\013\n\004DOWN\020\242\271\200\001\022\007\n\002UP\020\233\025B\025\n\023_creation_times" - + "tampB\r\n\013_deprecatedB\016\n\014_descriptionB\005\n\003_" - + "idB\007\n\005_kindB\007\n\005_nameB\014\n\n_self_linkB\t\n\007_s" - + "tatusB\017\n\r_supports_pzs\"\253\002\n\024RegionAutosca" - + "lerList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0225\n\005items\030\300\317\367/ " - + "\003(\0132#.google.cloud.compute.v1.Autoscaler" - + "\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_toke" - + "n\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003" - + "\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.c" - + "ompute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022" - + "\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_war" - + "ning\"\247\002\n\022RegionDiskTypeList\022\020\n\002id\030\233\032 \001(\t" - + "H\000\210\001\001\0223\n\005items\030\300\317\367/ \003(\0132!.google.cloud.c" - + "ompute.v1.DiskType\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001" - + "\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tsel" - + "f_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(" - + "\0132 .google.cloud.compute.v1.WarningH\004\210\001\001" - + "B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n" - + "_self_linkB\n\n\010_warning\"E\n%RegionDisksAdd" - + "ResourcePoliciesRequest\022\034\n\021resource_poli" - + "cies\030\341\234\314\n \003(\t\"H\n(RegionDisksRemoveResour" - + "cePoliciesRequest\022\034\n\021resource_policies\030\341" - + "\234\314\n \003(\t\"@\n\030RegionDisksResizeRequest\022\030\n\007s" - + "ize_gb\030\331\213\200\354\001 \001(\003H\000\210\001\001B\n\n\010_size_gb\"\261\002\n\027Re" - + "gionInstanceGroupList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022" - + "8\n\005items\030\300\317\367/ \003(\0132&.google.cloud.compute" - + ".v1.InstanceGroup\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022" - + "\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself" - + "_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\013" - + "2 .google.cloud.compute.v1.WarningH\004\210\001\001B" - + "\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_" - + "self_linkB\n\n\010_warning\"E\n1RegionInstanceG" - + "roupManagerDeleteInstanceConfigReq\022\020\n\005na" - + "mes\030\310\256\3571 \003(\t\"\277\002\n\036RegionInstanceGroupMana" - + "gerList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022?\n\005items\030\300\317\367/ " - + "\003(\0132-.google.cloud.compute.v1.InstanceGr" - + "oupManager\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next" - + "_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215" - + "\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .goog" - + "le.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB" - + "\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_li" - + "nkB\n\n\010_warning\"\200\001\n0RegionInstanceGroupMa" - + "nagerPatchInstanceConfigReq\022L\n\024per_insta" - + "nce_configs\030\251\325\370\372\001 \003(\0132*.google.cloud.com" - + "pute.v1.PerInstanceConfig\"\201\001\n1RegionInst" - + "anceGroupManagerUpdateInstanceConfigReq\022" - + "L\n\024per_instance_configs\030\251\325\370\372\001 \003(\0132*.goog" - + "le.cloud.compute.v1.PerInstanceConfig\"J\n" - + "2RegionInstanceGroupManagersAbandonInsta" - + "ncesRequest\022\024\n\tinstances\030\376\374\357\r \003(\t\"\373\002\n.Re" - + "gionInstanceGroupManagersApplyUpdatesReq" - + "uest\022\036\n\rall_instances\030\340\272\276\300\001 \001(\010H\000\210\001\001\022\024\n\t" - + "instances\030\376\374\357\r \003(\t\022\037\n\016minimal_action\030\224\215\202" - + "\201\001 \001(\tH\001\210\001\001\022.\n\036most_disruptive_allowed_a" - + "ction\030\215\316\302\037 \001(\tH\002\210\001\001\"-\n\rMinimalAction\022\034\n\030" - + "UNDEFINED_MINIMAL_ACTION\020\000\"K\n\033MostDisrup" - + "tiveAllowedAction\022,\n(UNDEFINED_MOST_DISR" - + "UPTIVE_ALLOWED_ACTION\020\000B\020\n\016_all_instance" - + "sB\021\n\017_minimal_actionB!\n\037_most_disruptive" - + "_allowed_action\"u\n1RegionInstanceGroupMa" - + "nagersCreateInstancesRequest\022@\n\tinstance" - + "s\030\376\374\357\r \003(\0132*.google.cloud.compute.v1.Per" - + "InstanceConfig\"\244\001\n1RegionInstanceGroupMa" - + "nagersDeleteInstancesRequest\022\024\n\tinstance" - + "s\030\376\374\357\r \003(\t\0222\n\"skip_instances_on_validati" - + "on_error\030\241\366\257\023 \001(\010H\000\210\001\001B%\n#_skip_instance" - + "s_on_validation_error\"\252\001\n-RegionInstance" - + "GroupManagersListErrorsResponse\022D\n\005items" - + "\030\300\317\367/ \003(\01322.google.cloud.compute.v1.Inst" - + "anceManagedByIgmError\022\037\n\017next_page_token" - + "\030\225\272\206& \001(\tH\000\210\001\001B\022\n\020_next_page_token\"\356\001\n2R" - + "egionInstanceGroupManagersListInstanceCo" - + "nfigsResp\022<\n\005items\030\300\317\367/ \003(\0132*.google.clo" - + "ud.compute.v1.PerInstanceConfig\022\037\n\017next_" - + "page_token\030\225\272\206& \001(\tH\000\210\001\001\0229\n\007warning\030\234\337\226\030" - + " \001(\0132 .google.cloud.compute.v1.WarningH\001" - + "\210\001\001B\022\n\020_next_page_tokenB\n\n\010_warning\"\260\001\n0" - + "RegionInstanceGroupManagersListInstances" - + "Response\022G\n\021managed_instances\030\336\233\251\240\001 \003(\0132" - + "(.google.cloud.compute.v1.ManagedInstanc" - + "e\022\037\n\017next_page_token\030\225\272\206& \001(\tH\000\210\001\001B\022\n\020_n" - + "ext_page_token\"B\n*RegionInstanceGroupMan" - + "agersRecreateRequest\022\024\n\tinstances\030\376\374\357\r \003" - + "(\t\"y\n0RegionInstanceGroupManagersSetTarg" - + "etPoolsRequest\022\033\n\013fingerprint\030\344\321\363o \001(\tH\000" - + "\210\001\001\022\030\n\014target_pools\030\251\237\240\240\001 \003(\tB\016\n\014_finger" - + "print\"i\n-RegionInstanceGroupManagersSetT" - + "emplateRequest\022\"\n\021instance_template\030\344\201\273\223" - + "\001 \001(\tH\000\210\001\001B\024\n\022_instance_template\"\304\002\n!Reg" - + "ionInstanceGroupsListInstances\022\020\n\002id\030\233\032 " - + "\001(\tH\000\210\001\001\022A\n\005items\030\300\317\367/ \003(\0132/.google.clou" - + "d.compute.v1.InstanceWithNamedPorts\022\024\n\004k", - "ind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206" - + "& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229" - + "\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comput" - + "e.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_ne" - + "xt_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"" - + "\320\001\n(RegionInstanceGroupsListInstancesReq" - + "uest\022\036\n\016instance_state\030\347\360\374+ \001(\tH\000\210\001\001\022\031\n\t" - + "port_name\030\211\207\347\023 \001(\tH\001\210\001\001\"H\n\rInstanceState" - + "\022\034\n\030UNDEFINED_INSTANCE_STATE\020\000\022\t\n\003ALL\020\201\373" - + "\003\022\016\n\007RUNNING\020\237\303\3529B\021\n\017_instance_stateB\014\n\n" - + "_port_name\"\224\001\n(RegionInstanceGroupsSetNa" - + "medPortsRequest\022\033\n\013fingerprint\030\344\321\363o \001(\tH" - + "\000\210\001\001\022;\n\013named_ports\030\214\307\362\313\001 \003(\0132\".google.c" - + "loud.compute.v1.NamedPortB\016\n\014_fingerprin" - + "t\"\235\002\n\nRegionList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0221\n\005it" - + "ems\030\300\317\367/ \003(\0132\037.google.cloud.compute.v1.R" - + "egion\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page" - + "_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 " - + "\001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cl" - + "oud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_k" - + "indB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n" - + "\010_warning\"\201\002\n:RegionNetworkFirewallPolic" - + "iesGetEffectiveFirewallsResponse\022\210\001\n\020fir" - + "ewall_policys\030\302\312\374\303\001 \003(\0132j.google.cloud.c" - + "ompute.v1.RegionNetworkFirewallPoliciesG" - + "etEffectiveFirewallsResponseEffectiveFir" - + "ewallPolicy\0228\n\tfirewalls\030\363\306\350\201\001 \003(\0132!.goo" - + "gle.cloud.compute.v1.Firewall\"\354\002\nQRegion" - + "NetworkFirewallPoliciesGetEffectiveFirew" - + "allsResponseEffectiveFirewallPolicy\022\034\n\014d" - + "isplay_name\030\350\207\221\002 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001" - + "(\tH\001\210\001\001\022=\n\005rules\030\367\221\3653 \003(\0132+.google.cloud" - + ".compute.v1.FirewallPolicyRule\022\024\n\004type\030\272" - + "\236\332\001 \001(\tH\002\210\001\001\"k\n\004Type\022\022\n\016UNDEFINED_TYPE\020\000" - + "\022\020\n\tHIERARCHY\020\225\304\252!\022\017\n\007NETWORK\020\216\314\263\305\001\022\027\n\020N" - + "ETWORK_REGIONAL\020\260\342\375Z\022\023\n\013UNSPECIFIED\020\227\276\230\373" - + "\001B\017\n\r_display_nameB\007\n\005_nameB\007\n\005_type\"\321\001\n" - + "\026RegionSetLabelsRequest\022!\n\021label_fingerp" - + "rint\030\231\360\367T \001(\tH\000\210\001\001\022O\n\006labels\030\377\277\301\356\001 \003(\0132;" - + ".google.cloud.compute.v1.RegionSetLabels" - + "Request.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\024\n\022_label_fin" - + "gerprint\"\263\001\n\026RegionSetPolicyRequest\0226\n\010b" - + "indings\030\216\305\244\300\001 \003(\0132 .google.cloud.compute" - + ".v1.Binding\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\0227\n\006pol" - + "icy\030\262\312\266+ \001(\0132\037.google.cloud.compute.v1.P" - + "olicyH\001\210\001\001B\007\n\005_etagB\t\n\007_policy\"Q\n1Region" - + "TargetHttpsProxiesSetSslCertificatesRequ" - + "est\022\034\n\020ssl_certificates\030\217\242\303\256\001 \003(\t\"f\n\034Reg" - + "ionUrlMapsValidateRequest\0229\n\010resource\030\216\210" - + "\257] \001(\0132\037.google.cloud.compute.v1.UrlMapH" - + "\000\210\001\001B\013\n\t_resource\"\224\001\n&RemoveAssociationF" - + "irewallPolicyRequest\022 \n\017firewall_policy\030" - + "\321\212\306\355\001 \001(\tB\003\340A\002\022\024\n\004name\030\213\365\315\001 \001(\tH\000\210\001\001\022\032\n\n" - + "request_id\030\313\201\331\021 \001(\tH\001\210\001\001B\007\n\005_nameB\r\n\013_re" - + "quest_id\"\276\001\n-RemoveAssociationNetworkFir" - + "ewallPolicyRequest\022 \n\017firewall_policy\030\321\212" - + "\306\355\001 \001(\tB\003\340A\002\022\024\n\004name\030\213\365\315\001 \001(\tH\000\210\001\001\022!\n\007pr" - + "oject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest" - + "_id\030\313\201\331\021 \001(\tH\001\210\001\001B\007\n\005_nameB\r\n\013_request_i" - + "d\"\345\001\n3RemoveAssociationRegionNetworkFire" - + "wallPolicyRequest\022 \n\017firewall_policy\030\321\212\306" - + "\355\001 \001(\tB\003\340A\002\022\024\n\004name\030\213\365\315\001 \001(\tH\000\210\001\001\022!\n\007pro" - + "ject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364" - + "\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021" - + " \001(\tH\001\210\001\001B\007\n\005_nameB\r\n\013_request_id\"\263\002\n\"Re" - + "moveHealthCheckTargetPoolRequest\022!\n\007proj" - + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315" - + "\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 " - + "\001(\tH\000\210\001\001\022\033\n\013target_pool\030\212\344\370\035 \001(\tB\003\340A\002\022\200\001" - + "\n1target_pools_remove_health_check_reque" - + "st_resource\030\263\347\266\221\001 \001(\0132<.google.cloud.com" - + "pute.v1.TargetPoolsRemoveHealthCheckRequ" - + "estB\003\340A\002B\r\n\013_request_id\"\247\002\n\037RemoveInstan" - + "ceTargetPoolRequest\022!\n\007project\030\231\226\301l \001(\tB" - + "\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G" - + "\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\013t" - + "arget_pool\030\212\344\370\035 \001(\tB\003\340A\002\022x\n-target_pools" - + "_remove_instance_request_resource\030\203\300\213\016 \001" - + "(\01329.google.cloud.compute.v1.TargetPools" - + "RemoveInstanceRequestB\003\340A\002B\r\n\013_request_i" - + "d\"\264\002\n#RemoveInstancesInstanceGroupReques" - + "t\022\036\n\016instance_group\030\325\324\325& \001(\tB\003\340A\002\022\201\001\n1in" - + "stance_groups_remove_instances_request_r" - + "esource\030\271\321\267\272\001 \001(\0132=.google.cloud.compute" - + ".v1.InstanceGroupsRemoveInstancesRequest" - + "B\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project" - + "\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344" - + "\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\366\001\n\033Rem" - + "ovePeeringNetworkRequest\022\027\n\007network\030\256\264\205o" - + " \001(\tB\003\340A\002\022p\n(networks_remove_peering_req" - + "uest_resource\030\376\333\351\310\001 \001(\01325.google.cloud.c" - + "ompute.v1.NetworksRemovePeeringRequestB\003" - + "\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032" - + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_i" - + "d\"\243\002\n!RemoveResourcePoliciesDiskRequest\022" - + "\024\n\004disk\030\235\233\274\001 \001(\tB\003\340A\002\022}\n/disks_remove_re" - + "source_policies_request_resource\030\356\301\241\320\001 \001" - + "(\0132;.google.cloud.compute.v1.DisksRemove" - + "ResourcePoliciesRequestB\003\340A\002\022!\n\007project\030" + + " \001(\0132 .google.cloud.compute.v1.WarningH\004" + + "\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB" + + "\014\n\n_self_linkB\n\n\010_warning\"\233\003\n-PublicDele" + + "gatedPrefixPublicDelegatedSubPrefix\022\"\n\021d" + + "elegatee_project\030\332\212\351\305\001 \001(\tH\000\210\001\001\022\034\n\013descr" + + "iption\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\035\n\rip_cidr_range\030\312" + + "\315\344. \001(\tH\002\210\001\001\022\033\n\nis_address\030\337\213\222\250\001 \001(\010H\003\210\001" + + "\001\022\024\n\004name\030\213\365\315\001 \001(\tH\004\210\001\001\022\026\n\006region\030\364\315\240B \001" + + "(\tH\005\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\006\210\001\001\"@\n\006Statu" + + "s\022\024\n\020UNDEFINED_STATUS\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022" + + "\020\n\010INACTIVE\020\353\230\371\200\001B\024\n\022_delegatee_projectB" + + "\016\n\014_descriptionB\020\n\016_ip_cidr_rangeB\r\n\013_is" + + "_addressB\007\n\005_nameB\t\n\007_regionB\t\n\007_status\"" + + "\301\001\n!PublicDelegatedPrefixesScopedList\022U\n" + + "\031public_delegated_prefixes\030\226\202\252\226\001 \003(\0132..g" + + "oogle.cloud.compute.v1.PublicDelegatedPr" + + "efix\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud." + + "compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\310\"\n\005" + + "Quota\022\025\n\005limit\030\273\227\2151 \001(\001H\000\210\001\001\022\027\n\006metric\030\260" + + "\353\227\376\001 \001(\tH\001\210\001\001\022\025\n\005owner\030\263\345\3172 \001(\tH\002\210\001\001\022\025\n\005" + + "usage\030\241\373\2315 \001(\001H\003\210\001\001\"\267!\n\006Metric\022\024\n\020UNDEFI" + + "NED_METRIC\020\000\022\016\n\007A2_CPUS\020\271\376\206I\022\026\n\017AFFINITY" + + "_GROUPS\020\313\251\3223\022\023\n\013AUTOSCALERS\020\334\340\332\340\001\022\026\n\017BAC" + + "KEND_BUCKETS\020\336\211\320A\022\030\n\020BACKEND_SERVICES\020\311\303" + + "\310\200\001\022\020\n\010C2D_CPUS\020\365\377\250\362\001\022\017\n\007C2_CPUS\020\273\353\270\227\001\022\017" + + "\n\007C3_CPUS\020\332\234\214\245\001\022\023\n\013COMMITMENTS\020\336\327\300\331\001\022\030\n\021" + + "COMMITTED_A2_CPUS\020\326\242\245\034\022\032\n\022COMMITTED_C2D_" + + "CPUS\020\370\342\323\206\001\022\030\n\021COMMITTED_C2_CPUS\020\330\217\327j\022\030\n\021" + + "COMMITTED_C3_CPUS\020\367\300\252x\022\026\n\016COMMITTED_CPUS" + + "\020\316\255\266\213\001\022\031\n\021COMMITTED_E2_CPUS\020\332\374\210\271\001\022\032\n\022COM" + + "MITTED_LICENSES\020\325\313\302\252\001\022$\n\034COMMITTED_LOCAL" + + "_SSD_TOTAL_GB\020\210\354\206\223\001\022\027\n\021COMMITTED_M3_CPUS" + + "\020\201\342#\022\'\n\037COMMITTED_MEMORY_OPTIMIZED_CPUS\020" + + "\336\334\231\351\001\022\031\n\022COMMITTED_N2A_CPUS\020\260\252\215\023\022\031\n\022COMM" + + "ITTED_N2D_CPUS\020\215\276\207<\022\031\n\021COMMITTED_N2_CPUS" + + "\020\243\247\351\231\001\022\'\n\037COMMITTED_NVIDIA_A100_80GB_GPU" + + "S\020\245\237\264\335\001\022\"\n\032COMMITTED_NVIDIA_A100_GPUS\020\225\375" + + "\230\263\001\022 \n\031COMMITTED_NVIDIA_K80_GPUS\020\244\266\353\001\022!\n" + + "\032COMMITTED_NVIDIA_P100_GPUS\020\244\377\2423\022 \n\030COMM" + + "ITTED_NVIDIA_P4_GPUS\020\201\256\365\245\001\022\037\n\030COMMITTED_" + + "NVIDIA_T4_GPUS\020\205\210\331B\022 \n\032COMMITTED_NVIDIA_" + + "V100_GPUS\020\252\263\r\022\032\n\022COMMITTED_T2A_CPUS\020\352\304\251\215" + + "\001\022\032\n\022COMMITTED_T2D_CPUS\020\307\330\243\266\001\022\n\n\004CPUS\020\313\327" + + "~\022\030\n\020CPUS_ALL_REGIONS\020\255\221\306\340\001\022\026\n\016DISKS_TOT" + + "AL_GB\020\237\227\311\250\001\022\017\n\007E2_CPUS\020\275\330\352\345\001\022(\n!EXTERNAL" + + "_MANAGED_FORWARDING_RULES\020\311\277\363G\022,\n$EXTERN" + + "AL_NETWORK_LB_FORWARDING_RULES\020\231\255\275\262\001\022)\n\"" + + "EXTERNAL_PROTOCOL_FORWARDING_RULES\020\350\270\242\036\022" + + "\035\n\025EXTERNAL_VPN_GATEWAYS\020\256\273\365\201\001\022\021\n\tFIREWA" + + "LLS\020\323\346\310\262\001\022\030\n\020FORWARDING_RULES\020\225\202\250\316\001\022/\n(G" + + "LOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES\020" + + "\341\255\274N\0220\n(GLOBAL_EXTERNAL_MANAGED_FORWARDI" + + "NG_RULES\020\255\354\233\234\001\0221\n)GLOBAL_EXTERNAL_PROXY_" + + "LB_BACKEND_SERVICES\020\251\331\355\276\001\022 \n\031GLOBAL_INTE" + + "RNAL_ADDRESSES\020\234\305\260\024\022/\n(GLOBAL_INTERNAL_M" + + "ANAGED_BACKEND_SERVICES\020\257\220\256z\0229\n1GLOBAL_I" + + "NTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICE" + + "S\020\324\336\241\232\001\022\027\n\020GPUS_ALL_REGIONS\020\251\200\344\022\022\025\n\rHEAL" + + "TH_CHECKS\020\256\257\374\211\001\022\r\n\006IMAGES\020\370\354\265\007\022\020\n\tINSTAN" + + "CES\020\336\234\320>\022\027\n\017INSTANCE_GROUPS\020\276\311\333\251\001\022\036\n\027INS" + + "TANCE_GROUP_MANAGERS\020\260\242\3050\022\031\n\022INSTANCE_TE" + + "MPLATES\020\357\267\355k\022\025\n\rINTERCONNECTS\020\205\213\376\305\001\022*\n#I" + + "NTERCONNECT_ATTACHMENTS_PER_REGION\020\326\326\243L\022" + + "+\n#INTERCONNECT_ATTACHMENTS_TOTAL_MBPS\020\363" + + "\272\331\312\001\022\037\n\027INTERCONNECT_TOTAL_GBPS\020\252\361\207\210\001\022\031\n" + + "\022INTERNAL_ADDRESSES\020\200\351\256^\0221\n*INTERNAL_TRA" + + "FFIC_DIRECTOR_FORWARDING_RULES\020\204\351\205\177\022\031\n\022I" + + "N_PLACE_SNAPSHOTS\020\235\235\226H\022\030\n\020IN_USE_ADDRESS" + + "ES\020\220\342\337\277\001\022\036\n\027IN_USE_BACKUP_SCHEDULES\020\221\222\321\017" + + "\022!\n\031IN_USE_SNAPSHOT_SCHEDULES\020\223\314\254\334\001\022\032\n\022L" + + "OCAL_SSD_TOTAL_GB\020\305\230\343\235\001\022\016\n\007M1_CPUS\020\246\333\336\021\022" + + "\016\n\007M2_CPUS\020\305\214\262\037\022\016\n\007M3_CPUS\020\344\275\205-\022\026\n\016MACHI" + + "NE_IMAGES\020\220\363\221\325\001\022\017\n\010N2A_CPUS\020\255\307\342~\022\020\n\010N2D_" + + "CPUS\020\212\333\334\247\001\022\017\n\007N2_CPUS\020\206\203\313\306\001\022\020\n\010NETWORKS\020" + + "\205\270\277\347\001\022\032\n\023NETWORK_ATTACHMENTS\020\337\375\207G\022\036\n\027NET" + + "WORK_ENDPOINT_GROUPS\020\215\267\3320\022 \n\031NETWORK_FIR" + + "EWALL_POLICIES\020\276\333\2330\022\022\n\013NODE_GROUPS\020\261\375\336\013\022" + + "\026\n\016NODE_TEMPLATES\020\234\262\271\342\001\022\035\n\025NVIDIA_A100_8" + + "0GB_GPUS\020\310\350\307\210\001\022\030\n\020NVIDIA_A100_GPUS\020\222\200\337\360\001" + + "\022\026\n\017NVIDIA_K80_GPUS\020\207\354\222N\022\027\n\020NVIDIA_P100_" + + "GPUS\020\241\202\351p\022\033\n\024NVIDIA_P100_VWS_GPUS\020\216\335\203f\022\026" + + "\n\016NVIDIA_P4_GPUS\020\276\247\254\207\001\022\032\n\022NVIDIA_P4_VWS_" + + "GPUS\020\253\325\364\373\001\022\025\n\016NVIDIA_T4_GPUS\020\302\201\220$\022\032\n\022NVI" + + "DIA_T4_VWS_GPUS\020\257\353\277\230\001\022\027\n\020NVIDIA_V100_GPU" + + "S\020\247\266\323=\022\030\n\021PACKET_MIRRORINGS\020\247\352\266\007\022(\n!PD_E" + + "XTREME_TOTAL_PROVISIONED_IOPS\020\355\326\227!\022\027\n\020PR" + + "EEMPTIBLE_CPUS\020\311\215\343w\022\037\n\030PREEMPTIBLE_LOCAL" + + "_SSD_GB\020\210\223\257|\022(\n!PREEMPTIBLE_NVIDIA_A100_" + + "80GB_GPUS\020\212\352\271H\022#\n\034PREEMPTIBLE_NVIDIA_A10" + + "0_GPUS\020\220\234\351 \022#\n\033PREEMPTIBLE_NVIDIA_K80_GP" + + "US\020\311\340\345\262\001\022$\n\034PREEMPTIBLE_NVIDIA_P100_GPUS" + + "\020\237\236\363\240\001\022(\n PREEMPTIBLE_NVIDIA_P100_VWS_GP" + + "US\020\214\233\301\225\001\022\"\n\032PREEMPTIBLE_NVIDIA_P4_GPUS\020\274" + + "\222\324\314\001\022%\n\036PREEMPTIBLE_NVIDIA_P4_VWS_GPUS\020\251" + + "\342\320x\022!\n\032PREEMPTIBLE_NVIDIA_T4_GPUS\020\300\354\267i\022%" + + "\n\036PREEMPTIBLE_NVIDIA_T4_VWS_GPUS\020\255\370\233\025\022#\n" + + "\034PREEMPTIBLE_NVIDIA_V100_GPUS\020\245\322\335m\022=\n6PS" + + "C_ILB_CONSUMER_FORWARDING_RULES_PER_PROD" + + "UCER_NETWORK\020\203\223\235n\022\'\n PSC_INTERNAL_LB_FOR" + + "WARDING_RULES\020\373\242\313P\022\"\n\032PUBLIC_ADVERTISED_" + + "PREFIXES\020\314\241\342\340\001\022!\n\031PUBLIC_DELEGATED_PREFI" + + "XES\020\266\222\363\375\001\022\033\n\024REGIONAL_AUTOSCALERS\020\274\234\200\016\0221" + + "\n*REGIONAL_EXTERNAL_MANAGED_BACKEND_SERV" + + "ICES\020\335\354\202\002\0225\n-REGIONAL_EXTERNAL_NETWORK_L" + + "B_BACKEND_SERVICES\020\355\352\245\303\001\022\'\n REGIONAL_INS" + + "TANCE_GROUP_MANAGERS\020\220\276\363\021\022,\n%REGIONAL_IN" + + "TERNAL_LB_BACKEND_SERVICES\020\220\356\345A\0221\n*REGIO" + + "NAL_INTERNAL_MANAGED_BACKEND_SERVICES\020\253\317" + + "\364-\022\023\n\014RESERVATIONS\020\247\274\310\017\022\030\n\021RESOURCE_POLI" + + "CIES\020\341\234\204(\022\017\n\007ROUTERS\020\252\274\213\353\001\022\016\n\006ROUTES\020\312\226\272" + + "\203\001\022\030\n\021SECURITY_POLICIES\020\357\246\257Z\022#\n\034SECURITY" + + "_POLICIES_PER_REGION\020\306\246\340v\022#\n\033SECURITY_PO" + + "LICY_CEVAL_RULES\020\311\247\300\340\001\022\034\n\025SECURITY_POLIC" + + "Y_RULES\020\251\324\207a\022\'\n SECURITY_POLICY_RULES_PE" + + "R_REGION\020\314\310\251<\022\033\n\023SERVICE_ATTACHMENTS\020\346\261\353" + + "\340\001\022\021\n\tSNAPSHOTS\020\217\346\337\243\001\022\023\n\014SSD_TOTAL_GB\020\321\257" + + "\217M\022\030\n\020SSL_CERTIFICATES\020\257\202\266\264\001\022\027\n\020STATIC_A" + + "DDRESSES\020\361\255\322,\022\036\n\026STATIC_BYOIP_ADDRESSES\020" + + "\361\212\302\203\001\022+\n#STATIC_EXTERNAL_IPV6_ADDRESS_RA" + + "NGES\020\226\341\235\341\001\022\023\n\013SUBNETWORKS\020\245\374\363\310\001\022\020\n\010T2A_C" + + "PUS\020\347\341\376\370\001\022\017\n\010T2D_CPUS\020\304\365\370!\022\033\n\024TARGET_HTT" + + "PS_PROXIES\020\312\313\326h\022\032\n\023TARGET_HTTP_PROXIES\020\243" + + "\365\240N\022\030\n\020TARGET_INSTANCES\020\260\332\325\207\001\022\024\n\014TARGET_" + + "POOLS\020\211\227\210\246\001\022\031\n\022TARGET_SSL_PROXIES\020\353\344\365K\022\031" + + "\n\022TARGET_TCP_PROXIES\020\300\236\363V\022\032\n\023TARGET_VPN_" + + "GATEWAYS\020\250\273\343#\022\020\n\010URL_MAPS\020\207\317\307\264\001\022\023\n\014VPN_G" + + "ATEWAYS\020\272\213\376\020\022\022\n\013VPN_TUNNELS\020\200\321\3371\022\033\n\024XPN_" + + "SERVICE_PROJECTS\020\255\207\262-B\010\n\006_limitB\t\n\007_metr" + + "icB\010\n\006_ownerB\010\n\006_usage\"\225\002\n\021QuotaExceeded" + + "Info\022R\n\ndimensions\030\315\377\310\305\001 \003(\0132:.google.cl" + + "oud.compute.v1.QuotaExceededInfo.Dimensi" + + "onsEntry\022\025\n\005limit\030\273\227\2151 \001(\001H\000\210\001\001\022\033\n\nlimit" + + "_name\030\217\211\360\275\001 \001(\tH\001\210\001\001\022\034\n\013metric_name\030\272\227\271\303" + + "\001 \001(\tH\002\210\001\001\0321\n\017DimensionsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\010\n\006_limitB\r\n\013_limi" + + "t_nameB\016\n\014_metric_name\"\314\001\n\007RawDisk\022\037\n\016co" + + "ntainer_type\030\270\310\202\230\001 \001(\tH\000\210\001\001\022\036\n\rsha1_chec" + + "ksum\030\275\224\370\225\001 \001(\tH\001\210\001\001\022\026\n\006source\030\233\320\301T \001(\tH\002" + + "\210\001\001\"8\n\rContainerType\022\034\n\030UNDEFINED_CONTAI" + + "NER_TYPE\020\000\022\t\n\003TAR\020\205\207\005B\021\n\017_container_type" + + "B\020\n\016_sha1_checksumB\t\n\007_source\"\327\002\n,Recrea" + + "teInstancesInstanceGroupManagerRequest\022&" + + "\n\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022\223" + + "\001\n;instance_group_managers_recreate_inst" + + "ances_request_resource\030\200\302\232\n \001(\0132F.google" + + ".cloud.compute.v1.InstanceGroupManagersR" + + "ecreateInstancesRequestB\003\340A\002\022!\n\007project\030" + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201" + "\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zone" - + "B\r\n\013_request_id\"\263\002\n%RemoveResourcePolici" - + "esInstanceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003" - + "\340A\002\022\204\001\n3instances_remove_resource_polici" - + "es_request_resource\030\366\335\274\027 \001(\0132?.google.cl" - + "oud.compute.v1.InstancesRemoveResourcePo" - + "liciesRequestB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r" - + "\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001" - + "\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_reque" - + "st_id\"\272\002\n\'RemoveResourcePoliciesRegionDi" - + "skRequest\022\024\n\004disk\030\235\233\274\001 \001(\tB\003\340A\002\022!\n\007proje" - + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240" - + "B \001(\tB\014\340A\002\362G\006region\022\211\001\n6region_disks_rem" - + "ove_resource_policies_request_resource\030\243" - + "\303\225\004 \001(\0132A.google.cloud.compute.v1.Region" - + "DisksRemoveResourcePoliciesRequestB\003\340A\002\022" - + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_" - + "id\"\226\001\n\037RemoveRuleFirewallPolicyRequest\022 " - + "\n\017firewall_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022\031\n\010prio" - + "rity\030\244\363\241\324\001 \001(\005H\000\210\001\001\022\032\n\nrequest_id\030\313\201\331\021 \001" - + "(\tH\001\210\001\001B\013\n\t_priorityB\r\n\013_request_id\"\300\001\n&" - + "RemoveRuleNetworkFirewallPolicyRequest\022 " - + "\n\017firewall_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022\031\n\010prio" - + "rity\030\244\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB" - + "\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210" - + "\001\001B\013\n\t_priorityB\r\n\013_request_id\"\347\001\n,Remov" - + "eRuleRegionNetworkFirewallPolicyRequest\022" - + " \n\017firewall_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022\031\n\010pri" - + "ority\030\244\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\t" - + "B\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362" - + "G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\013\n\t" - + "_priorityB\r\n\013_request_id\"\215\001\n\037RemoveRuleS" - + "ecurityPolicyRequest\022\031\n\010priority\030\244\363\241\324\001 \001" - + "(\005H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proje" - + "ct\022\037\n\017security_policy\030\221\206\312Q \001(\tB\003\340A\002B\013\n\t_" - + "priority\"K\n\023RequestMirrorPolicy\022 \n\017backe" - + "nd_service\030\212\300\256\222\001 \001(\tH\000\210\001\001B\022\n\020_backend_se" - + "rvice\"\256\010\n\013Reservation\022\033\n\ncommitment\030\225\226\363\345" - + "\001 \001(\tH\000\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(" - + "\tH\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\020\n\002" - + "id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004" - + "name\030\213\365\315\001 \001(\tH\005\210\001\001\022X\n\021resource_policies\030" - + "\341\234\314\n \003(\0132:.google.cloud.compute.v1.Reser" - + "vation.ResourcePoliciesEntry\022R\n\017resource" - + "_status\030\303\372\367v \001(\01321.google.cloud.compute." - + "v1.AllocationResourceStatusH\006\210\001\001\022\036\n\rsati" - + "sfies_pzs\030\253\335\253\345\001 \001(\010H\007\210\001\001\022\032\n\tself_link\030\215\222" - + "\305\331\001 \001(\tH\010\210\001\001\022F\n\016share_settings\030\203\221\224\177 \001(\0132" - + "&.google.cloud.compute.v1.ShareSettingsH" - + "\t\210\001\001\022`\n\024specific_reservation\030\277\240\211\301\001 \001(\01329" - + ".google.cloud.compute.v1.AllocationSpeci" - + "ficSKUReservationH\n\210\001\001\022-\n\035specific_reser" - + "vation_required\030\237\307\203l \001(\010H\013\210\001\001\022\026\n\006status\030" - + "\362\237\267V \001(\tH\014\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH\r\210\001\001\0327\n\025R" - + "esourcePoliciesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001\"s\n\006Status\022\024\n\020UNDEFINED_STAT" - + "US\020\000\022\020\n\010CREATING\020\271\275\235\331\001\022\020\n\010DELETING\020\250\247\207\374\001" - + "\022\017\n\007INVALID\020\327\373\355\374\001\022\014\n\005READY\020\203\303\217%\022\020\n\010UPDAT" - + "ING\020\306\356\354\353\001B\r\n\013_commitmentB\025\n\023_creation_ti" - + "mestampB\016\n\014_descriptionB\005\n\003_idB\007\n\005_kindB" - + "\007\n\005_nameB\022\n\020_resource_statusB\020\n\016_satisfi" - + "es_pzsB\014\n\n_self_linkB\021\n\017_share_settingsB" - + "\027\n\025_specific_reservationB \n\036_specific_re" - + "servation_requiredB\t\n\007_statusB\007\n\005_zone\"\260" - + "\002\n\023ReservationAffinity\022)\n\030consume_reserv" - + "ation_type\030\260\303\263\217\001 \001(\tH\000\210\001\001\022\022\n\003key\030\337\274\006 \001(\t" - + "H\001\210\001\001\022\021\n\006values\030\242\272\226w \003(\t\"\241\001\n\026ConsumeRese" - + "rvationType\022&\n\"UNDEFINED_CONSUME_RESERVA" - + "TION_TYPE\020\000\022\026\n\017ANY_RESERVATION\020\271\303\257_\022\025\n\016N" - + "O_RESERVATION\020\256\314\336P\022\033\n\024SPECIFIC_RESERVATI" - + "ON\020\237\250\317m\022\023\n\013UNSPECIFIED\020\227\276\230\373\001B\033\n\031_consume" - + "_reservation_typeB\006\n\004_key\"\302\003\n\031Reservatio" - + "nAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022O\n\005ite" - + "ms\030\300\317\367/ \003(\0132=.google.cloud.compute.v1.Re" - + "servationAggregatedList.ItemsEntry\022\024\n\004ki" - + "nd\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206&" - + " \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n" - + "\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001" - + "(\0132 .google.cloud.compute.v1.WarningH\004\210\001" - + "\001\032]\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022>\n\005value\030\002 " - + "\001(\0132/.google.cloud.compute.v1.Reservatio" - + "nsScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_nex" - + "t_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\247" - + "\002\n\017ReservationList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0226\n\005" - + "items\030\300\317\367/ \003(\0132$.google.cloud.compute.v1" - + ".Reservation\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" + + "B\r\n\013_request_id\"\333\002\n2RecreateInstancesReg" + + "ionInstanceGroupManagerRequest\022&\n\026instan" + + "ce_group_manager\030\303\367\363v \001(\tB\003\340A\002\022!\n\007projec" + + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B" + + " \001(\tB\014\340A\002\362G\006region\022\215\001\n8region_instance_g" + + "roup_managers_recreate_request_resource\030" + + "\224\374\304Q \001(\0132C.google.cloud.compute.v1.Regio" + + "nInstanceGroupManagersRecreateRequestB\003\340" + + "A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_reque" + + "st_id\"\250\001\n\tReference\022\024\n\004kind\030\224\367\310\001 \001(\tH\000\210\001" + + "\001\022\036\n\016reference_type\030\256\277\203v \001(\tH\001\210\001\001\022\031\n\010ref" + + "errer\030\237\370\271\247\001 \001(\tH\002\210\001\001\022\026\n\006target\030\221\343\371[ \001(\tH" + + "\003\210\001\001B\007\n\005_kindB\021\n\017_reference_typeB\013\n\t_ref" + + "errerB\t\n\007_target\"\227\004\n\006Region\022\"\n\022creation_" + + "timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022G\n\ndeprecated\030\263\313" + + "\321\365\001 \001(\0132*.google.cloud.compute.v1.Deprec" + + "ationStatusH\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(" + + "\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(" + + "\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\0221\n\006quotas\030\373" + + "\241\342; \003(\0132\036.google.cloud.compute.v1.Quota\022" + + "\032\n\tself_link\030\215\222\305\331\001 \001(\tH\006\210\001\001\022\026\n\006status\030\362\237" + + "\267V \001(\tH\007\210\001\001\022\034\n\014supports_pzs\030\356\366\205( \001(\010H\010\210\001" + + "\001\022\020\n\005zones\030\307\244\2557 \003(\t\"4\n\006Status\022\024\n\020UNDEFIN" + + "ED_STATUS\020\000\022\013\n\004DOWN\020\242\271\200\001\022\007\n\002UP\020\233\025B\025\n\023_cr" + + "eation_timestampB\r\n\013_deprecatedB\016\n\014_desc" + + "riptionB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\014\n\n_sel" + + "f_linkB\t\n\007_statusB\017\n\r_supports_pzs\"\253\002\n\024R" + + "egionAutoscalerList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0225\n" + + "\005items\030\300\317\367/ \003(\0132#.google.cloud.compute.v" + + "1.Autoscaler\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" + "xt_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link" + "\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .go" + "ogle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_i" + "dB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_" - + "linkB\n\n\010_warning\"V\n\031ReservationsResizeRe" - + "quest\022\"\n\022specific_sku_count\030\240\351\317\006 \001(\003H\000\210\001" - + "\001B\025\n\023_specific_sku_count\"\237\001\n\026Reservation" - + "sScopedList\022>\n\014reservations\030\247\354\314\276\001 \003(\0132$." - + "google.cloud.compute.v1.Reservation\0229\n\007w" - + "arning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v" - + "1.WarningH\000\210\001\001B\n\n\010_warning\"\233\001\n\024ResetInst" - + "anceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n" - + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequ" - + "est_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340" - + "A\002\362G\004zoneB\r\n\013_request_id\"\360\001\n\021ResizeDiskR" - + "equest\022\024\n\004disk\030\235\233\274\001 \001(\tB\003\340A\002\022Z\n\035disks_re" - + "size_request_resource\030\240\302\253% \001(\0132+.google." - + "cloud.compute.v1.DisksResizeRequestB\003\340A\002" + + "linkB\n\n\010_warning\"\247\002\n\022RegionDiskTypeList\022" + + "\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0223\n\005items\030\300\317\367/ \003(\0132!.go" + + "ogle.cloud.compute.v1.DiskType\022\024\n\004kind\030\224" + + "\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\t" + + "H\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007war" + + "ning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1." + + "WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_pa" + + "ge_tokenB\014\n\n_self_linkB\n\n\010_warning\"E\n%Re" + + "gionDisksAddResourcePoliciesRequest\022\034\n\021r" + + "esource_policies\030\341\234\314\n \003(\t\"H\n(RegionDisks" + + "RemoveResourcePoliciesRequest\022\034\n\021resourc" + + "e_policies\030\341\234\314\n \003(\t\"@\n\030RegionDisksResize" + + "Request\022\030\n\007size_gb\030\331\213\200\354\001 \001(\003H\000\210\001\001B\n\n\010_si" + + "ze_gb\"\261\002\n\027RegionInstanceGroupList\022\020\n\002id\030" + + "\233\032 \001(\tH\000\210\001\001\0228\n\005items\030\300\317\367/ \003(\0132&.google.c" + + "loud.compute.v1.InstanceGroup\022\024\n\004kind\030\224\367" + + "\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH" + + "\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warn" + + "ing\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.W" + + "arningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_pag" + + "e_tokenB\014\n\n_self_linkB\n\n\010_warning\"E\n1Reg" + + "ionInstanceGroupManagerDeleteInstanceCon" + + "figReq\022\020\n\005names\030\310\256\3571 \003(\t\"\277\002\n\036RegionInsta" + + "nceGroupManagerList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022?\n" + + "\005items\030\300\317\367/ \003(\0132-.google.cloud.compute.v" + + "1.InstanceGroupManager\022\024\n\004kind\030\224\367\310\001 \001(\tH" + + "\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n" + + "\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226" + + "\030 \001(\0132 .google.cloud.compute.v1.WarningH" + + "\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_token" + + "B\014\n\n_self_linkB\n\n\010_warning\"\200\001\n0RegionIns" + + "tanceGroupManagerPatchInstanceConfigReq\022" + + "L\n\024per_instance_configs\030\251\325\370\372\001 \003(\0132*.goog" + + "le.cloud.compute.v1.PerInstanceConfig\"\201\001" + + "\n1RegionInstanceGroupManagerUpdateInstan" + + "ceConfigReq\022L\n\024per_instance_configs\030\251\325\370\372" + + "\001 \003(\0132*.google.cloud.compute.v1.PerInsta" + + "nceConfig\"J\n2RegionInstanceGroupManagers" + + "AbandonInstancesRequest\022\024\n\tinstances\030\376\374\357" + + "\r \003(\t\"\373\002\n.RegionInstanceGroupManagersApp" + + "lyUpdatesRequest\022\036\n\rall_instances\030\340\272\276\300\001 " + + "\001(\010H\000\210\001\001\022\024\n\tinstances\030\376\374\357\r \003(\t\022\037\n\016minima" + + "l_action\030\224\215\202\201\001 \001(\tH\001\210\001\001\022.\n\036most_disrupti" + + "ve_allowed_action\030\215\316\302\037 \001(\tH\002\210\001\001\"-\n\rMinim" + + "alAction\022\034\n\030UNDEFINED_MINIMAL_ACTION\020\000\"K" + + "\n\033MostDisruptiveAllowedAction\022,\n(UNDEFIN" + + "ED_MOST_DISRUPTIVE_ALLOWED_ACTION\020\000B\020\n\016_" + + "all_instancesB\021\n\017_minimal_actionB!\n\037_mos" + + "t_disruptive_allowed_action\"u\n1RegionIns" + + "tanceGroupManagersCreateInstancesRequest" + + "\022@\n\tinstances\030\376\374\357\r \003(\0132*.google.cloud.co" + + "mpute.v1.PerInstanceConfig\"\244\001\n1RegionIns" + + "tanceGroupManagersDeleteInstancesRequest" + + "\022\024\n\tinstances\030\376\374\357\r \003(\t\0222\n\"skip_instances" + + "_on_validation_error\030\241\366\257\023 \001(\010H\000\210\001\001B%\n#_s" + + "kip_instances_on_validation_error\"\252\001\n-Re" + + "gionInstanceGroupManagersListErrorsRespo" + + "nse\022D\n\005items\030\300\317\367/ \003(\01322.google.cloud.com" + + "pute.v1.InstanceManagedByIgmError\022\037\n\017nex" + + "t_page_token\030\225\272\206& \001(\tH\000\210\001\001B\022\n\020_next_page" + + "_token\"\356\001\n2RegionInstanceGroupManagersLi" + + "stInstanceConfigsResp\022<\n\005items\030\300\317\367/ \003(\0132" + + "*.google.cloud.compute.v1.PerInstanceCon" + + "fig\022\037\n\017next_page_token\030\225\272\206& \001(\tH\000\210\001\001\0229\n\007" + + "warning\030\234\337\226\030 \001(\0132 .google.cloud.compute." + + "v1.WarningH\001\210\001\001B\022\n\020_next_page_tokenB\n\n\010_" + + "warning\"\260\001\n0RegionInstanceGroupManagersL" + + "istInstancesResponse\022G\n\021managed_instance" + + "s\030\336\233\251\240\001 \003(\0132(.google.cloud.compute.v1.Ma" + + "nagedInstance\022\037\n\017next_page_token\030\225\272\206& \001(" + + "\tH\000\210\001\001B\022\n\020_next_page_token\"B\n*RegionInst" + + "anceGroupManagersRecreateRequest\022\024\n\tinst" + + "ances\030\376\374\357\r \003(\t\"y\n0RegionInstanceGroupMan" + + "agersSetTargetPoolsRequest\022\033\n\013fingerprin" + + "t\030\344\321\363o \001(\tH\000\210\001\001\022\030\n\014target_pools\030\251\237\240\240\001 \003(" + + "\tB\016\n\014_fingerprint\"i\n-RegionInstanceGroup" + + "ManagersSetTemplateRequest\022\"\n\021instance_t" + + "emplate\030\344\201\273\223\001 \001(\tH\000\210\001\001B\024\n\022_instance_temp" + + "late\"\304\002\n!RegionInstanceGroupsListInstanc", + "es\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022A\n\005items\030\300\317\367/ \003(\0132/" + + ".google.cloud.compute.v1.InstanceWithNam" + + "edPorts\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_pa" + + "ge_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331" + + "\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google." + + "cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005" + + "_kindB\022\n\020_next_page_tokenB\014\n\n_self_linkB" + + "\n\n\010_warning\"\320\001\n(RegionInstanceGroupsList" + + "InstancesRequest\022\036\n\016instance_state\030\347\360\374+ " + + "\001(\tH\000\210\001\001\022\031\n\tport_name\030\211\207\347\023 \001(\tH\001\210\001\001\"H\n\rI" + + "nstanceState\022\034\n\030UNDEFINED_INSTANCE_STATE" + + "\020\000\022\t\n\003ALL\020\201\373\003\022\016\n\007RUNNING\020\237\303\3529B\021\n\017_instan" + + "ce_stateB\014\n\n_port_name\"\224\001\n(RegionInstanc" + + "eGroupsSetNamedPortsRequest\022\033\n\013fingerpri" + + "nt\030\344\321\363o \001(\tH\000\210\001\001\022;\n\013named_ports\030\214\307\362\313\001 \003(" + + "\0132\".google.cloud.compute.v1.NamedPortB\016\n" + + "\014_fingerprint\"\235\002\n\nRegionList\022\020\n\002id\030\233\032 \001(" + + "\tH\000\210\001\001\0221\n\005items\030\300\317\367/ \003(\0132\037.google.cloud." + + "compute.v1.Region\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022" + + "\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself" + + "_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\013" + + "2 .google.cloud.compute.v1.WarningH\004\210\001\001B" + + "\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_" + + "self_linkB\n\n\010_warning\"\201\002\n:RegionNetworkF" + + "irewallPoliciesGetEffectiveFirewallsResp" + + "onse\022\210\001\n\020firewall_policys\030\302\312\374\303\001 \003(\0132j.go" + + "ogle.cloud.compute.v1.RegionNetworkFirew" + + "allPoliciesGetEffectiveFirewallsResponse" + + "EffectiveFirewallPolicy\0228\n\tfirewalls\030\363\306\350" + + "\201\001 \003(\0132!.google.cloud.compute.v1.Firewal" + + "l\"\354\002\nQRegionNetworkFirewallPoliciesGetEf" + + "fectiveFirewallsResponseEffectiveFirewal" + + "lPolicy\022\034\n\014display_name\030\350\207\221\002 \001(\tH\000\210\001\001\022\024\n" + + "\004name\030\213\365\315\001 \001(\tH\001\210\001\001\022=\n\005rules\030\367\221\3653 \003(\0132+." + + "google.cloud.compute.v1.FirewallPolicyRu" + + "le\022\024\n\004type\030\272\236\332\001 \001(\tH\002\210\001\001\"k\n\004Type\022\022\n\016UNDE" + + "FINED_TYPE\020\000\022\020\n\tHIERARCHY\020\225\304\252!\022\017\n\007NETWOR" + + "K\020\216\314\263\305\001\022\027\n\020NETWORK_REGIONAL\020\260\342\375Z\022\023\n\013UNSP" + + "ECIFIED\020\227\276\230\373\001B\017\n\r_display_nameB\007\n\005_nameB" + + "\007\n\005_type\"\321\001\n\026RegionSetLabelsRequest\022!\n\021l" + + "abel_fingerprint\030\231\360\367T \001(\tH\000\210\001\001\022O\n\006labels" + + "\030\377\277\301\356\001 \003(\0132;.google.cloud.compute.v1.Reg" + + "ionSetLabelsRequest.LabelsEntry\032-\n\013Label" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\024" + + "\n\022_label_fingerprint\"\263\001\n\026RegionSetPolicy" + + "Request\0226\n\010bindings\030\216\305\244\300\001 \003(\0132 .google.c" + + "loud.compute.v1.Binding\022\024\n\004etag\030\225\322\276\001 \001(\t" + + "H\000\210\001\001\0227\n\006policy\030\262\312\266+ \001(\0132\037.google.cloud." + + "compute.v1.PolicyH\001\210\001\001B\007\n\005_etagB\t\n\007_poli" + + "cy\"Q\n1RegionTargetHttpsProxiesSetSslCert" + + "ificatesRequest\022\034\n\020ssl_certificates\030\217\242\303\256" + + "\001 \003(\t\"f\n\034RegionUrlMapsValidateRequest\0229\n" + + "\010resource\030\216\210\257] \001(\0132\037.google.cloud.comput" + + "e.v1.UrlMapH\000\210\001\001B\013\n\t_resource\"\224\001\n&Remove" + + "AssociationFirewallPolicyRequest\022 \n\017fire" + + "wall_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022\024\n\004name\030\213\365\315\001 " + + "\001(\tH\000\210\001\001\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\007\n\005" + + "_nameB\r\n\013_request_id\"\276\001\n-RemoveAssociati" + + "onNetworkFirewallPolicyRequest\022 \n\017firewa" + + "ll_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022\024\n\004name\030\213\365\315\001 \001(" + + "\tH\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007projec" + + "t\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\007\n\005_nameB\r" + + "\n\013_request_id\"\345\001\n3RemoveAssociationRegio" + + "nNetworkFirewallPolicyRequest\022 \n\017firewal" + + "l_policy\030\321\212\306\355\001 \001(\tB\003\340A\002\022\024\n\004name\030\213\365\315\001 \001(\t" + + "H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project" + + "\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreq" + + "uest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\007\n\005_nameB\r\n\013_reque" + + "st_id\"\263\002\n\"RemoveHealthCheckTargetPoolReq" + + "uest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022" + + "\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequ" + + "est_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\013target_pool\030\212\344\370\035" + + " \001(\tB\003\340A\002\022\200\001\n1target_pools_remove_health" + + "_check_request_resource\030\263\347\266\221\001 \001(\0132<.goog" + + "le.cloud.compute.v1.TargetPoolsRemoveHea" + + "lthCheckRequestB\003\340A\002B\r\n\013_request_id\"\247\002\n\037" + + "RemoveInstanceTargetPoolRequest\022!\n\007proje" + + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240" + + "B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001" + + "(\tH\000\210\001\001\022\033\n\013target_pool\030\212\344\370\035 \001(\tB\003\340A\002\022x\n-" + + "target_pools_remove_instance_request_res" + + "ource\030\203\300\213\016 \001(\01329.google.cloud.compute.v1" + + ".TargetPoolsRemoveInstanceRequestB\003\340A\002B\r" + + "\n\013_request_id\"\264\002\n#RemoveInstancesInstanc" + + "eGroupRequest\022\036\n\016instance_group\030\325\324\325& \001(\t" + + "B\003\340A\002\022\201\001\n1instance_groups_remove_instanc" + + "es_request_resource\030\271\321\267\272\001 \001(\0132=.google.c" + + "loud.compute.v1.InstanceGroupsRemoveInst" + + "ancesRequestB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340" + + "A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001" + + "\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_reques" + + "t_id\"\366\001\n\033RemovePeeringNetworkRequest\022\027\n\007" + + "network\030\256\264\205o \001(\tB\003\340A\002\022p\n(networks_remove" + + "_peering_request_resource\030\376\333\351\310\001 \001(\01325.go" + + "ogle.cloud.compute.v1.NetworksRemovePeer" + + "ingRequestB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" + + "\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r" + + "\n\013_request_id\"\243\002\n!RemoveResourcePolicies" + + "DiskRequest\022\024\n\004disk\030\235\233\274\001 \001(\tB\003\340A\002\022}\n/dis" + + "ks_remove_resource_policies_request_reso" + + "urce\030\356\301\241\320\001 \001(\0132;.google.cloud.compute.v1" + + ".DisksRemoveResourcePoliciesRequestB\003\340A\002" + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nr" + "equest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\t" - + "B\n\340A\002\362G\004zoneB\r\n\013_request_id\"\314\001\n!ResizeIn" - + "stanceGroupManagerRequest\022&\n\026instance_gr" - + "oup_manager\030\303\367\363v \001(\tB\003\340A\002\022!\n\007project\030\231\226\301" - + "l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 " - + "\001(\tH\000\210\001\001\022\024\n\004size\030\201\300\327\001 \001(\005B\003\340A\002\022\033\n\004zone\030\254" - + "\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\210\002\n\027R" - + "esizeRegionDiskRequest\022\024\n\004disk\030\235\233\274\001 \001(\tB" - + "\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022" - + "\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022h\n$regi" - + "on_disks_resize_request_resource\030\225\252\374\324\001 \001" - + "(\01321.google.cloud.compute.v1.RegionDisks" - + "ResizeRequestB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001B\r\n\013_request_id\"\326\001\n\'ResizeRegionIn" - + "stanceGroupManagerRequest\022&\n\026instance_gr" - + "oup_manager\030\303\367\363v \001(\tB\003\340A\002\022!\n\007project\030\231\226\301" - + "l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB" - + "\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001" - + "\001\022\024\n\004size\030\201\300\327\001 \001(\005B\003\340A\002B\r\n\013_request_id\"\215" - + "\002\n\030ResizeReservationRequest\022!\n\007project\030\231" - + "\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331" - + "\021 \001(\tH\000\210\001\001\022\033\n\013reservation\030\314\207\325\026 \001(\tB\003\340A\002\022" - + "i\n$reservations_resize_request_resource\030" - + "\321\333\316\271\001 \001(\01322.google.cloud.compute.v1.Rese" - + "rvationsResizeRequestB\003\340A\002\022\033\n\004zone\030\254\307\344\001 " - + "\001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\202\002\n\022Resou" - + "rceCommitment\022 \n\020accelerator_type\030\216\341\350A \001" - + "(\tH\000\210\001\001\022\026\n\006amount\030\330\240\351] \001(\003H\001\210\001\001\022\024\n\004type\030" - + "\272\236\332\001 \001(\tH\002\210\001\001\"s\n\004Type\022\022\n\016UNDEFINED_TYPE\020" - + "\000\022\023\n\013ACCELERATOR\020\313\354\371\314\001\022\021\n\tLOCAL_SSD\020\360\365\326\362" - + "\001\022\r\n\006MEMORY\020\201\342\326:\022\023\n\013UNSPECIFIED\020\227\276\230\373\001\022\013\n" - + "\004VCPU\020\362\272\240\001B\023\n\021_accelerator_typeB\t\n\007_amou" - + "ntB\007\n\005_type\"9\n\026ResourceGroupReference\022\025\n" - + "\005group\030\377\354\203/ \001(\tH\000\210\001\001B\010\n\006_group\"\252\001\n\032Resou" - + "rcePoliciesScopedList\022E\n\021resource_polici" - + "es\030\341\234\314\n \003(\0132\'.google.cloud.compute.v1.Re" - + "sourcePolicy\0229\n\007warning\030\234\337\226\030 \001(\0132 .googl" - + "e.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_warn" - + "ing\"\255\007\n\016ResourcePolicy\022\"\n\022creation_times" - + "tamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 " - + "\001(\tH\001\210\001\001\022c\n\026group_placement_policy\030\214\233\233\005 " - + "\001(\0132;.google.cloud.compute.v1.ResourcePo" - + "licyGroupPlacementPolicyH\002\210\001\001\022\020\n\002id\030\233\032 \001" - + "(\004H\003\210\001\001\022h\n\030instance_schedule_policy\030\260\320\271\244" - + "\001 \001(\0132=.google.cloud.compute.v1.Resource" - + "PolicyInstanceSchedulePolicyH\004\210\001\001\022\024\n\004kin" - + "d\030\224\367\310\001 \001(\tH\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001\022\026\n" - + "\006region\030\364\315\240B \001(\tH\007\210\001\001\022V\n\017resource_status" - + "\030\303\372\367v \001(\01325.google.cloud.compute.v1.Reso" - + "urcePolicyResourceStatusH\010\210\001\001\022\032\n\tself_li" - + "nk\030\215\222\305\331\001 \001(\tH\t\210\001\001\022g\n\030snapshot_schedule_p" - + "olicy\030\337\326\201h \001(\0132=.google.cloud.compute.v1" - + ".ResourcePolicySnapshotSchedulePolicyH\n\210" - + "\001\001\022\026\n\006status\030\362\237\267V \001(\tH\013\210\001\001\"r\n\006Status\022\024\n\020" - + "UNDEFINED_STATUS\020\000\022\020\n\010CREATING\020\271\275\235\331\001\022\020\n\010" - + "DELETING\020\250\247\207\374\001\022\017\n\007EXPIRED\020\205\346\210\346\001\022\017\n\007INVAL" - + "ID\020\327\373\355\374\001\022\014\n\005READY\020\203\303\217%B\025\n\023_creation_time" - + "stampB\016\n\014_descriptionB\031\n\027_group_placemen" - + "t_policyB\005\n\003_idB\033\n\031_instance_schedule_po" - + "licyB\007\n\005_kindB\007\n\005_nameB\t\n\007_regionB\022\n\020_re" - + "source_statusB\014\n\n_self_linkB\033\n\031_snapshot" - + "_schedule_policyB\t\n\007_status\"\353\003\n\034Resource" - + "PolicyAggregatedList\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210" - + "\001\001\022\020\n\002id\030\233\032 \001(\tH\001\210\001\001\022R\n\005items\030\300\317\367/ \003(\0132@" - + ".google.cloud.compute.v1.ResourcePolicyA" - + "ggregatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(" - + "\tH\002\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\003\210\001\001\022" - + "\032\n\tself_link\030\215\222\305\331\001 \001(\tH\004\210\001\001\022\027\n\014unreachab" - + "les\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .googl" - + "e.cloud.compute.v1.WarningH\005\210\001\001\032a\n\nItems" - + "Entry\022\013\n\003key\030\001 \001(\t\022B\n\005value\030\002 \001(\01323.goog" - + "le.cloud.compute.v1.ResourcePoliciesScop" - + "edList:\0028\001B\007\n\005_etagB\005\n\003_idB\007\n\005_kindB\022\n\020_" - + "next_page_tokenB\014\n\n_self_linkB\n\n\010_warnin" - + "g\"\236\001\n\030ResourcePolicyDailyCycle\022\036\n\rdays_i" - + "n_cycle\030\264\230\252\260\001 \001(\005H\000\210\001\001\022\030\n\010duration\030\224\233\221J " - + "\001(\tH\001\210\001\001\022\032\n\nstart_time\030\212\351\356\021 \001(\tH\002\210\001\001B\020\n\016" - + "_days_in_cycleB\013\n\t_durationB\r\n\013_start_ti" - + "me\"\240\002\n\"ResourcePolicyGroupPlacementPolic" - + "y\022)\n\031availability_domain_count\030\270\214\370\005 \001(\005H" - + "\000\210\001\001\022\034\n\013collocation\030\265\302\336\363\001 \001(\tH\001\210\001\001\022\030\n\010vm" - + "_count\030\207\273\326| \001(\005H\002\210\001\001\"\\\n\013Collocation\022\031\n\025U" - + "NDEFINED_COLLOCATION\020\000\022\021\n\nCOLLOCATED\020\322\253\236" - + "1\022\037\n\027UNSPECIFIED_COLLOCATION\020\355\217\263\335\001B\034\n\032_a" - + "vailability_domain_countB\016\n\014_collocation" - + "B\013\n\t_vm_count\"\241\001\n\031ResourcePolicyHourlyCy" - + "cle\022\030\n\010duration\030\224\233\221J \001(\tH\000\210\001\001\022\037\n\016hours_i" - + "n_cycle\030\374\210\227\373\001 \001(\005H\001\210\001\001\022\032\n\nstart_time\030\212\351\356" - + "\021 \001(\tH\002\210\001\001B\013\n\t_durationB\021\n\017_hours_in_cyc" - + "leB\r\n\013_start_time\"\256\003\n$ResourcePolicyInst" - + "anceSchedulePolicy\022\037\n\017expiration_time\030\335\254" - + "\350m \001(\tH\000\210\001\001\022\032\n\nstart_time\030\212\351\356\021 \001(\tH\001\210\001\001\022" - + "\031\n\ttime_zone\030\336\203\311\021 \001(\tH\002\210\001\001\022h\n\021vm_start_s" - + "chedule\030\334\220\274\010 \001(\0132E.google.cloud.compute." - + "v1.ResourcePolicyInstanceSchedulePolicyS" - + "cheduleH\003\210\001\001\022h\n\020vm_stop_schedule\030\254\345\237\313\001 \001" - + "(\0132E.google.cloud.compute.v1.ResourcePol" - + "icyInstanceSchedulePolicyScheduleH\004\210\001\001B\022" - + "\n\020_expiration_timeB\r\n\013_start_timeB\014\n\n_ti" - + "me_zoneB\024\n\022_vm_start_scheduleB\023\n\021_vm_sto" - + "p_schedule\"V\n,ResourcePolicyInstanceSche" - + "dulePolicySchedule\022\031\n\010schedule\030\227\245\232\263\001 \001(\t" - + "H\000\210\001\001B\013\n\t_schedule\"\314\002\n\022ResourcePolicyLis" - + "t\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\022\020\n\002id\030\233\032 \001(\tH\001\210\001" - + "\001\0229\n\005items\030\300\317\367/ \003(\0132\'.google.cloud.compu" - + "te.v1.ResourcePolicy\022\024\n\004kind\030\224\367\310\001 \001(\tH\002\210" - + "\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\003\210\001\001\022\032\n\ts" - + "elf_link\030\215\222\305\331\001 \001(\tH\004\210\001\001\0229\n\007warning\030\234\337\226\030 " - + "\001(\0132 .google.cloud.compute.v1.WarningH\005\210" - + "\001\001B\007\n\005_etagB\005\n\003_idB\007\n\005_kindB\022\n\020_next_pag" - + "e_tokenB\014\n\n_self_linkB\n\n\010_warning\"\271\001\n\034Re" - + "sourcePolicyResourceStatus\022|\n\030instance_s" - + "chedule_policy\030\260\320\271\244\001 \001(\0132Q.google.cloud." - + "compute.v1.ResourcePolicyResourceStatusI" - + "nstanceSchedulePolicyStatusH\000\210\001\001B\033\n\031_ins" - + "tance_schedule_policy\"\266\001\n8ResourcePolicy" - + "ResourceStatusInstanceSchedulePolicyStat" - + "us\022$\n\023last_run_start_time\030\207\357\301\220\001 \001(\tH\000\210\001\001" - + "\022$\n\023next_run_start_time\030\212\263\370\227\001 \001(\tH\001\210\001\001B\026" - + "\n\024_last_run_start_timeB\026\n\024_next_run_star" - + "t_time\"\250\003\n$ResourcePolicySnapshotSchedul" - + "ePolicy\022n\n\020retention_policy\030\363\312\334 \001(\0132L.g" - + "oogle.cloud.compute.v1.ResourcePolicySna" - + "pshotSchedulePolicyRetentionPolicyH\000\210\001\001\022" - + "`\n\010schedule\030\227\245\232\263\001 \001(\0132E.google.cloud.com" - + "pute.v1.ResourcePolicySnapshotSchedulePo" - + "licyScheduleH\001\210\001\001\022t\n\023snapshot_properties" - + "\030\216\225\262X \001(\0132O.google.cloud.compute.v1.Reso" - + "urcePolicySnapshotSchedulePolicySnapshot" - + "PropertiesH\002\210\001\001B\023\n\021_retention_policyB\013\n\t" - + "_scheduleB\026\n\024_snapshot_properties\"\325\002\n3Re" - + "sourcePolicySnapshotSchedulePolicyRetent" - + "ionPolicy\022#\n\022max_retention_days\030\223\302\321\232\001 \001(" - + "\005H\000\210\001\001\022&\n\025on_source_disk_delete\030\311\315\302\231\001 \001(" - + "\tH\001\210\001\001\"\237\001\n\022OnSourceDiskDelete\022#\n\037UNDEFIN" - + "ED_ON_SOURCE_DISK_DELETE\020\000\022\036\n\026APPLY_RETE" - + "NTION_POLICY\020\344\224\222\377\001\022\032\n\023KEEP_AUTO_SNAPSHOT" - + "S\020\371\310\273{\022(\n!UNSPECIFIED_ON_SOURCE_DISK_DEL" - + "ETE\020\241\377\203rB\025\n\023_max_retention_daysB\030\n\026_on_s" - + "ource_disk_delete\"\347\002\n,ResourcePolicySnap" - + "shotSchedulePolicySchedule\022Q\n\016daily_sche" - + "dule\030\375\343\212) \001(\01321.google.cloud.compute.v1." - + "ResourcePolicyDailyCycleH\000\210\001\001\022S\n\017hourly_" - + "schedule\030\245\261\243\022 \001(\01322.google.cloud.compute" - + ".v1.ResourcePolicyHourlyCycleH\001\210\001\001\022T\n\017we" - + "ekly_schedule\030\225\211\271\253\001 \001(\01322.google.cloud.c" - + "ompute.v1.ResourcePolicyWeeklyCycleH\002\210\001\001" - + "B\021\n\017_daily_scheduleB\022\n\020_hourly_scheduleB" - + "\022\n\020_weekly_schedule\"\320\002\n6ResourcePolicySn" - + "apshotSchedulePolicySnapshotProperties\022\032" - + "\n\nchain_name\030\311\332\335 \001(\tH\000\210\001\001\022\034\n\013guest_flus" - + "h\030\335\223\354\267\001 \001(\010H\001\210\001\001\022o\n\006labels\030\377\277\301\356\001 \003(\0132[.g" - + "oogle.cloud.compute.v1.ResourcePolicySna" - + "pshotSchedulePolicySnapshotProperties.La" - + "belsEntry\022\035\n\021storage_locations\030\232\355\263\234\001 \003(\t" - + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\t:\0028\001B\r\n\013_chain_nameB\016\n\014_guest_flush\"q" - + "\n\031ResourcePolicyWeeklyCycle\022T\n\014day_of_we" - + "eks\030\332\237\373z \003(\0132;.google.cloud.compute.v1.R" - + "esourcePolicyWeeklyCycleDayOfWeek\"\264\002\n\"Re" - + "sourcePolicyWeeklyCycleDayOfWeek\022\022\n\003day\030" - + "\234\207\006 \001(\tH\000\210\001\001\022\030\n\010duration\030\224\233\221J \001(\tH\001\210\001\001\022\032" - + "\n\nstart_time\030\212\351\356\021 \001(\tH\002\210\001\001\"\237\001\n\003Day\022\021\n\rUN" - + "DEFINED_DAY\020\000\022\016\n\006FRIDAY\020\337\362\343\340\001\022\017\n\007INVALID" - + "\020\327\373\355\374\001\022\r\n\006MONDAY\020\220\312\213?\022\020\n\010SATURDAY\020\271\217\207\205\001\022" - + "\016\n\006SUNDAY\020\320\213\322\223\001\022\017\n\010THURSDAY\020\332\263\346b\022\017\n\007TUES" - + "DAY\020\255\354\251\204\001\022\021\n\tWEDNESDAY\020\266\316\236\311\001B\006\n\004_dayB\013\n\t" - + "_durationB\r\n\013_start_time\"B\n\016ResourceStat" - + "us\022\036\n\rphysical_host\030\220\370\266\335\001 \001(\tH\000\210\001\001B\020\n\016_p" - + "hysical_host\"\234\001\n\025ResumeInstanceRequest\022\030" - + "\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l" - + " \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001" - + "(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013" - + "_request_id\"\226\t\n\005Route\0229\n\010as_paths\030\241\305\314A \003" - + "(\0132$.google.cloud.compute.v1.RouteAsPath" - + "\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013" - + "description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\033\n\ndest_range" - + "\030\340\262\352\265\001 \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kin" - + "d\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\027\n" - + "\007network\030\256\264\205o \001(\tH\006\210\001\001\022!\n\020next_hop_gatew" - + "ay\030\202\372\354\263\001 \001(\tH\007\210\001\001\022\034\n\014next_hop_ilb\030\335\272\336^ \001" - + "(\tH\010\210\001\001\022\"\n\021next_hop_instance\030\227\353\321\273\001 \001(\tH\t" - + "\210\001\001\022\033\n\013next_hop_ip\030\251\257\3154 \001(\tH\n\210\001\001\022 \n\020next" - + "_hop_network\030\354\241\211} \001(\tH\013\210\001\001\022!\n\020next_hop_p" - + "eering\030\376\223\344\304\001 \001(\tH\014\210\001\001\022$\n\023next_hop_vpn_tu" - + "nnel\030\225\345\360\367\001 \001(\tH\r\210\001\001\022\031\n\010priority\030\244\363\241\324\001 \001(" - + "\rH\016\210\001\001\022\035\n\014route_status\030\250\315\262\307\001 \001(\tH\017\210\001\001\022\033\n" - + "\nroute_type\030\360\266\236\263\001 \001(\tH\020\210\001\001\022\032\n\tself_link\030" - + "\215\222\305\331\001 \001(\tH\021\210\001\001\022\017\n\004tags\030\231\350\330\001 \003(\t\0227\n\010warni" - + "ngs\030\327\210\301\355\001 \003(\0132!.google.cloud.compute.v1." - + "Warnings\"l\n\013RouteStatus\022\032\n\026UNDEFINED_ROU" - + "TE_STATUS\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\017\n\007DROPPED\020\240" - + "\347\317\354\001\022\020\n\010INACTIVE\020\353\230\371\200\001\022\016\n\007PENDING\020\367\252\360\020\"`" - + "\n\tRouteType\022\030\n\024UNDEFINED_ROUTE_TYPE\020\000\022\t\n", - "\003BGP\020\253\201\004\022\016\n\006STATIC\020\356\204\203\223\001\022\016\n\006SUBNET\020\335\356\274\223\001" - + "\022\016\n\007TRANSIT\020\263\203\306YB\025\n\023_creation_timestampB" - + "\016\n\014_descriptionB\r\n\013_dest_rangeB\005\n\003_idB\007\n" - + "\005_kindB\007\n\005_nameB\n\n\010_networkB\023\n\021_next_hop" - + "_gatewayB\017\n\r_next_hop_ilbB\024\n\022_next_hop_i" - + "nstanceB\016\n\014_next_hop_ipB\023\n\021_next_hop_net" - + "workB\023\n\021_next_hop_peeringB\026\n\024_next_hop_v" - + "pn_tunnelB\013\n\t_priorityB\017\n\r_route_statusB" - + "\r\n\013_route_typeB\014\n\n_self_link\"\347\001\n\013RouteAs" - + "Path\022\023\n\010as_lists\030\310\312\371? \003(\r\022\"\n\021path_segmen" - + "t_type\030\240\265\353\364\001 \001(\tH\000\210\001\001\"\210\001\n\017PathSegmentTyp" - + "e\022\037\n\033UNDEFINED_PATH_SEGMENT_TYPE\020\000\022\031\n\022AS" - + "_CONFED_SEQUENCE\020\260\217\367i\022\025\n\rAS_CONFED_SET\020\363" - + "\315\255\262\001\022\022\n\013AS_SEQUENCE\020\256\322\3622\022\016\n\006AS_SET\020\265\235\244\235\001" - + "B\024\n\022_path_segment_type\"\233\002\n\tRouteList\022\020\n\002" - + "id\030\233\032 \001(\tH\000\210\001\001\0220\n\005items\030\300\317\367/ \003(\0132\036.googl" - + "e.cloud.compute.v1.Route\022\024\n\004kind\030\224\367\310\001 \001(" + + "B\n\340A\002\362G\004zoneB\r\n\013_request_id\"\263\002\n%RemoveRe" + + "sourcePoliciesInstanceRequest\022\030\n\010instanc" + + "e\030\225\251\332\010 \001(\tB\003\340A\002\022\204\001\n3instances_remove_res" + + "ource_policies_request_resource\030\366\335\274\027 \001(\013" + + "2?.google.cloud.compute.v1.InstancesRemo" + + "veResourcePoliciesRequestB\003\340A\002\022!\n\007projec" + + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030" + + "\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zo" + + "neB\r\n\013_request_id\"\272\002\n\'RemoveResourcePoli" + + "ciesRegionDiskRequest\022\024\n\004disk\030\235\233\274\001 \001(\tB\003" + + "\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037" + + "\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\211\001\n6regi" + + "on_disks_remove_resource_policies_reques" + + "t_resource\030\243\303\225\004 \001(\0132A.google.cloud.compu" + + "te.v1.RegionDisksRemoveResourcePoliciesR" + + "equestB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B" + + "\r\n\013_request_id\"\226\001\n\037RemoveRuleFirewallPol" + + "icyRequest\022 \n\017firewall_policy\030\321\212\306\355\001 \001(\tB" + + "\003\340A\002\022\031\n\010priority\030\244\363\241\324\001 \001(\005H\000\210\001\001\022\032\n\nreque" + + "st_id\030\313\201\331\021 \001(\tH\001\210\001\001B\013\n\t_priorityB\r\n\013_req" + + "uest_id\"\300\001\n&RemoveRuleNetworkFirewallPol" + + "icyRequest\022 \n\017firewall_policy\030\321\212\306\355\001 \001(\tB" + + "\003\340A\002\022\031\n\010priority\030\244\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007proje" + + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id" + + "\030\313\201\331\021 \001(\tH\001\210\001\001B\013\n\t_priorityB\r\n\013_request_" + + "id\"\347\001\n,RemoveRuleRegionNetworkFirewallPo" + + "licyRequest\022 \n\017firewall_policy\030\321\212\306\355\001 \001(\t" + + "B\003\340A\002\022\031\n\010priority\030\244\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007proj" + + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315" + + "\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 " + + "\001(\tH\001\210\001\001B\013\n\t_priorityB\r\n\013_request_id\"\215\001\n" + + "\037RemoveRuleSecurityPolicyRequest\022\031\n\010prio" + + "rity\030\244\363\241\324\001 \001(\005H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB" + + "\r\340A\002\362G\007project\022\037\n\017security_policy\030\221\206\312Q \001" + + "(\tB\003\340A\002B\013\n\t_priority\"K\n\023RequestMirrorPol" + + "icy\022 \n\017backend_service\030\212\300\256\222\001 \001(\tH\000\210\001\001B\022\n" + + "\020_backend_service\"\256\010\n\013Reservation\022\033\n\ncom" + + "mitment\030\225\226\363\345\001 \001(\tH\000\210\001\001\022\"\n\022creation_times" + + "tamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 " + + "\001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 " + + "\001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022X\n\021resour" + + "ce_policies\030\341\234\314\n \003(\0132:.google.cloud.comp" + + "ute.v1.Reservation.ResourcePoliciesEntry" + + "\022R\n\017resource_status\030\303\372\367v \001(\01321.google.cl" + + "oud.compute.v1.AllocationResourceStatusH" + + "\006\210\001\001\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001(\010H\007\210\001\001\022\032\n\t" + + "self_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022F\n\016share_settin" + + "gs\030\203\221\224\177 \001(\0132&.google.cloud.compute.v1.Sh" + + "areSettingsH\t\210\001\001\022`\n\024specific_reservation" + + "\030\277\240\211\301\001 \001(\01329.google.cloud.compute.v1.All" + + "ocationSpecificSKUReservationH\n\210\001\001\022-\n\035sp" + + "ecific_reservation_required\030\237\307\203l \001(\010H\013\210\001" + + "\001\022\026\n\006status\030\362\237\267V \001(\tH\014\210\001\001\022\024\n\004zone\030\254\307\344\001 \001" + + "(\tH\r\210\001\001\0327\n\025ResourcePoliciesEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"s\n\006Status\022\024\n\020UN" + + "DEFINED_STATUS\020\000\022\020\n\010CREATING\020\271\275\235\331\001\022\020\n\010DE" + + "LETING\020\250\247\207\374\001\022\017\n\007INVALID\020\327\373\355\374\001\022\014\n\005READY\020\203" + + "\303\217%\022\020\n\010UPDATING\020\306\356\354\353\001B\r\n\013_commitmentB\025\n\023" + + "_creation_timestampB\016\n\014_descriptionB\005\n\003_" + + "idB\007\n\005_kindB\007\n\005_nameB\022\n\020_resource_status" + + "B\020\n\016_satisfies_pzsB\014\n\n_self_linkB\021\n\017_sha" + + "re_settingsB\027\n\025_specific_reservationB \n\036" + + "_specific_reservation_requiredB\t\n\007_statu" + + "sB\007\n\005_zone\"\260\002\n\023ReservationAffinity\022)\n\030co" + + "nsume_reservation_type\030\260\303\263\217\001 \001(\tH\000\210\001\001\022\022\n" + + "\003key\030\337\274\006 \001(\tH\001\210\001\001\022\021\n\006values\030\242\272\226w \003(\t\"\241\001\n" + + "\026ConsumeReservationType\022&\n\"UNDEFINED_CON" + + "SUME_RESERVATION_TYPE\020\000\022\026\n\017ANY_RESERVATI" + + "ON\020\271\303\257_\022\025\n\016NO_RESERVATION\020\256\314\336P\022\033\n\024SPECIF" + + "IC_RESERVATION\020\237\250\317m\022\023\n\013UNSPECIFIED\020\227\276\230\373\001" + + "B\033\n\031_consume_reservation_typeB\006\n\004_key\"\302\003" + + "\n\031ReservationAggregatedList\022\020\n\002id\030\233\032 \001(\t" + + "H\000\210\001\001\022O\n\005items\030\300\317\367/ \003(\0132=.google.cloud.c" + + "ompute.v1.ReservationAggregatedList.Item" + + "sEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_pag" + + "e_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" + + " \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007wa" + + "rning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1" + + ".WarningH\004\210\001\001\032]\n\nItemsEntry\022\013\n\003key\030\001 \001(\t" + + "\022>\n\005value\030\002 \001(\0132/.google.cloud.compute.v" + + "1.ReservationsScopedList:\0028\001B\005\n\003_idB\007\n\005_" + + "kindB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n" + + "\n\010_warning\"\247\002\n\017ReservationList\022\020\n\002id\030\233\032 " + + "\001(\tH\000\210\001\001\0226\n\005items\030\300\317\367/ \003(\0132$.google.clou" + + "d.compute.v1.Reservation\022\024\n\004kind\030\224\367\310\001 \001(" + "\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022" + "\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234" + "\337\226\030 \001(\0132 .google.cloud.compute.v1.Warnin" + "gH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tok" - + "enB\014\n\n_self_linkB\n\n\010_warning\"\332\005\n\006Router\022" - + "6\n\003bgp\030\313\371\005 \001(\0132\".google.cloud.compute.v1" - + ".RouterBgpH\000\210\001\001\022=\n\tbgp_peers\030\335\255\356\327\001 \003(\0132&" - + ".google.cloud.compute.v1.RouterBgpPeer\022\"" - + "\n\022creation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013de" - + "scription\030\374\207\326\311\001 \001(\tH\002\210\001\001\022.\n\035encrypted_in" - + "terconnect_router\030\237\242\214\216\001 \001(\010H\003\210\001\001\022\020\n\002id\030\233" - + "\032 \001(\004H\004\210\001\001\022?\n\ninterfaces\030\332\364\340\005 \003(\0132(.goog" - + "le.cloud.compute.v1.RouterInterface\022\024\n\004k" - + "ind\030\224\367\310\001 \001(\tH\005\210\001\001\022W\n\027md5_authentication_" - + "keys\030\232\256\361! \003(\01323.google.cloud.compute.v1." - + "RouterMd5AuthenticationKey\022\024\n\004name\030\213\365\315\001 " - + "\001(\tH\006\210\001\001\0223\n\004nats\030\362\366\315\001 \003(\0132\".google.cloud" - + ".compute.v1.RouterNat\022\027\n\007network\030\256\264\205o \001(" - + "\tH\007\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\010\210\001\001\022\032\n\tself_l" - + "ink\030\215\222\305\331\001 \001(\tH\t\210\001\001B\006\n\004_bgpB\025\n\023_creation_" - + "timestampB\016\n\014_descriptionB \n\036_encrypted_" - + "interconnect_routerB\005\n\003_idB\007\n\005_kindB\007\n\005_" - + "nameB\n\n\010_networkB\t\n\007_regionB\014\n\n_self_lin" - + "k\"h\n\027RouterAdvertisedIpRange\022\034\n\013descript" - + "ion\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\025\n\005range\030\275\362\3203 \001(\tH\001\210\001" - + "\001B\016\n\014_descriptionB\010\n\006_range\"\263\003\n\024RouterAg" - + "gregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022J\n\005items\030" - + "\300\317\367/ \003(\01328.google.cloud.compute.v1.Route" - + "rAggregatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 " - + "\001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001" - + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreach" - + "ables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .goo" - + "gle.cloud.compute.v1.WarningH\004\210\001\001\032X\n\nIte" - + "msEntry\022\013\n\003key\030\001 \001(\t\0229\n\005value\030\002 \001(\0132*.go" - + "ogle.cloud.compute.v1.RoutersScopedList:" - + "\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB" - + "\014\n\n_self_linkB\n\n\010_warning\"\240\003\n\tRouterBgp\022" - + "\037\n\016advertise_mode\030\273\225\353\224\001 \001(\tH\000\210\001\001\022\034\n\021adve" - + "rtised_groups\030\266\336\205\n \003(\t\022Q\n\024advertised_ip_" - + "ranges\030\314\330\363\020 \003(\01320.google.cloud.compute.v" - + "1.RouterAdvertisedIpRange\022\022\n\003asn\030\374\364\005 \001(\r" - + "H\001\210\001\001\022#\n\022keepalive_interval\030\274\345\374\203\001 \001(\rH\002\210" - + "\001\001\"M\n\rAdvertiseMode\022\034\n\030UNDEFINED_ADVERTI" - + "SE_MODE\020\000\022\016\n\006CUSTOM\020\361\376\245\271\001\022\016\n\007DEFAULT\020\241\304\375" - + "6\"G\n\020AdvertisedGroups\022\037\n\033UNDEFINED_ADVER" - + "TISED_GROUPS\020\000\022\022\n\013ALL_SUBNETS\020\330\217\335\001B\021\n\017_a" - + "dvertise_modeB\006\n\004_asnB\025\n\023_keepalive_inte" - + "rval\"\202\n\n\rRouterBgpPeer\022\037\n\016advertise_mode" - + "\030\273\225\353\224\001 \001(\tH\000\210\001\001\022\034\n\021advertised_groups\030\266\336\205" - + "\n \003(\t\022Q\n\024advertised_ip_ranges\030\314\330\363\020 \003(\01320" - + ".google.cloud.compute.v1.RouterAdvertise" - + "dIpRange\022)\n\031advertised_route_priority\030\274\234" - + "\366X \001(\rH\001\210\001\001\022=\n\003bfd\030\240\371\005 \001(\0132).google.clou" - + "d.compute.v1.RouterBgpPeerBfdH\002\210\001\001\022\027\n\006en" - + "able\030\203\313\324\224\001 \001(\tH\003\210\001\001\022\033\n\013enable_ipv6\030\243\366\303V " - + "\001(\010H\004\210\001\001\022\037\n\016interface_name\030\321\303\344\320\001 \001(\tH\005\210\001" - + "\001\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH\006\210\001\001\022$\n\024ipv6_n" - + "exthop_address\030\323\205\253\r \001(\tH\007\210\001\001\022\037\n\017manageme" - + "nt_type\030\266\203\352R \001(\tH\010\210\001\001\022,\n\033md5_authenticat" - + "ion_key_name\030\221\275\203\206\001 \001(\tH\t\210\001\001\022\024\n\004name\030\213\365\315\001" - + " \001(\tH\n\210\001\001\022\030\n\010peer_asn\030\237\264\226! \001(\rH\013\210\001\001\022\037\n\017p" - + "eer_ip_address\030\331\227\207c \001(\tH\014\210\001\001\022*\n\031peer_ipv" - + "6_nexthop_address\030\220\373\255\352\001 \001(\tH\r\210\001\001\022*\n\031rout" - + "er_appliance_instance\030\235\307\247\337\001 \001(\tH\016\210\001\001\"M\n\r" - + "AdvertiseMode\022\034\n\030UNDEFINED_ADVERTISE_MOD" - + "E\020\000\022\016\n\006CUSTOM\020\361\376\245\271\001\022\016\n\007DEFAULT\020\241\304\3756\"G\n\020A" - + "dvertisedGroups\022\037\n\033UNDEFINED_ADVERTISED_" - + "GROUPS\020\000\022\022\n\013ALL_SUBNETS\020\330\217\335\001\"9\n\006Enable\022\024" - + "\n\020UNDEFINED_ENABLE\020\000\022\014\n\005FALSE\020\203\302\344\037\022\013\n\004TR" - + "UE\020\216\333\235\001\"g\n\016ManagementType\022\035\n\031UNDEFINED_M" - + "ANAGEMENT_TYPE\020\000\022\035\n\025MANAGED_BY_ATTACHMEN" - + "T\020\313\322\352\332\001\022\027\n\017MANAGED_BY_USER\020\363\213\246\227\001B\021\n\017_adv" - + "ertise_modeB\034\n\032_advertised_route_priorit" - + "yB\006\n\004_bfdB\t\n\007_enableB\016\n\014_enable_ipv6B\021\n\017" - + "_interface_nameB\r\n\013_ip_addressB\027\n\025_ipv6_" - + "nexthop_addressB\022\n\020_management_typeB\036\n\034_" - + "md5_authentication_key_nameB\007\n\005_nameB\013\n\t" - + "_peer_asnB\022\n\020_peer_ip_addressB\034\n\032_peer_i" - + "pv6_nexthop_addressB\034\n\032_router_appliance" - + "_instance\"\206\003\n\020RouterBgpPeerBfd\022$\n\024min_re" - + "ceive_interval\030\356\271\224Y \001(\rH\000\210\001\001\022&\n\025min_tran" - + "smit_interval\030\307\321\302\371\001 \001(\rH\001\210\001\001\022\032\n\nmultipli" - + "er\030\301\373\235[ \001(\rH\002\210\001\001\022+\n\033session_initializati" - + "on_mode\030\271\215\3032 \001(\tH\003\210\001\001\"y\n\031SessionInitiali" - + "zationMode\022)\n%UNDEFINED_SESSION_INITIALI" - + "ZATION_MODE\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\020\n\010DISABLE" - + "D\020\374\324\260\366\001\022\017\n\007PASSIVE\020\207\366\327\334\001B\027\n\025_min_receive" - + "_intervalB\030\n\026_min_transmit_intervalB\r\n\013_" - + "multiplierB\036\n\034_session_initialization_mo" - + "de\"\250\004\n\017RouterInterface\022\030\n\010ip_range\030\245\340\227E " - + "\001(\tH\000\210\001\001\022/\n\036linked_interconnect_attachme" - + "nt\030\316\352\367\356\001 \001(\tH\001\210\001\001\022\"\n\021linked_vpn_tunnel\030\371" - + "\277\376\247\001 \001(\tH\002\210\001\001\022\037\n\017management_type\030\266\203\352R \001(" - + "\tH\003\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\004\210\001\001\022\"\n\022private_" - + "ip_address\030\230\322\2130 \001(\tH\005\210\001\001\022$\n\023redundant_in" - + "terface\030\347\350\274\371\001 \001(\tH\006\210\001\001\022\033\n\nsubnetwork\030\356\247\344" - + "\222\001 \001(\tH\007\210\001\001\"g\n\016ManagementType\022\035\n\031UNDEFIN" - + "ED_MANAGEMENT_TYPE\020\000\022\035\n\025MANAGED_BY_ATTAC" - + "HMENT\020\313\322\352\332\001\022\027\n\017MANAGED_BY_USER\020\363\213\246\227\001B\013\n\t" - + "_ip_rangeB!\n\037_linked_interconnect_attach" - + "mentB\024\n\022_linked_vpn_tunnelB\022\n\020_managemen" - + "t_typeB\007\n\005_nameB\025\n\023_private_ip_addressB\026" - + "\n\024_redundant_interfaceB\r\n\013_subnetwork\"\235\002" - + "\n\nRouterList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0221\n\005items\030" - + "\300\317\367/ \003(\0132\037.google.cloud.compute.v1.Route" - + "r\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_tok" - + "en\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH" - + "\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud." - + "compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB" + + "enB\014\n\n_self_linkB\n\n\010_warning\"V\n\031Reservat" + + "ionsResizeRequest\022\"\n\022specific_sku_count\030" + + "\240\351\317\006 \001(\003H\000\210\001\001B\025\n\023_specific_sku_count\"\237\001\n" + + "\026ReservationsScopedList\022>\n\014reservations\030" + + "\247\354\314\276\001 \003(\0132$.google.cloud.compute.v1.Rese" + + "rvation\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clo" + + "ud.compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\233" + + "\001\n\024ResetInstanceRequest\022\030\n\010instance\030\225\251\332\010" + + " \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" + + "ject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone" + + "\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\360\001\n" + + "\021ResizeDiskRequest\022\024\n\004disk\030\235\233\274\001 \001(\tB\003\340A\002" + + "\022Z\n\035disks_resize_request_resource\030\240\302\253% \001" + + "(\0132+.google.cloud.compute.v1.DisksResize" + + "RequestB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007" + + "project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004z" + + "one\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"" + + "\314\001\n!ResizeInstanceGroupManagerRequest\022&\n" + + "\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022!\n" + + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequ" + + "est_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\024\n\004size\030\201\300\327\001 \001(\005B\003\340" + + "A\002\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_requ" + + "est_id\"\210\002\n\027ResizeRegionDiskRequest\022\024\n\004di" + + "sk\030\235\233\274\001 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" + + "\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006re" + + "gion\022h\n$region_disks_resize_request_reso" + + "urce\030\225\252\374\324\001 \001(\01321.google.cloud.compute.v1" + + ".RegionDisksResizeRequestB\003\340A\002\022\032\n\nreques" + + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\326\001\n\'Re" + + "sizeRegionInstanceGroupManagerRequest\022&\n" + + "\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022!\n" + + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006regi" + + "on\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030" + + "\313\201\331\021 \001(\tH\000\210\001\001\022\024\n\004size\030\201\300\327\001 \001(\005B\003\340A\002B\r\n\013_" + + "request_id\"\215\002\n\030ResizeReservationRequest\022" + + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" + + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\013reservation\030\314\207" + + "\325\026 \001(\tB\003\340A\002\022i\n$reservations_resize_reque" + + "st_resource\030\321\333\316\271\001 \001(\01322.google.cloud.com" + + "pute.v1.ReservationsResizeRequestB\003\340A\002\022\033" + + "\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_" + + "id\"\202\002\n\022ResourceCommitment\022 \n\020accelerator" + + "_type\030\216\341\350A \001(\tH\000\210\001\001\022\026\n\006amount\030\330\240\351] \001(\003H\001" + + "\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\tH\002\210\001\001\"s\n\004Type\022\022\n\016UND" + + "EFINED_TYPE\020\000\022\023\n\013ACCELERATOR\020\313\354\371\314\001\022\021\n\tLO" + + "CAL_SSD\020\360\365\326\362\001\022\r\n\006MEMORY\020\201\342\326:\022\023\n\013UNSPECIF" + + "IED\020\227\276\230\373\001\022\013\n\004VCPU\020\362\272\240\001B\023\n\021_accelerator_t" + + "ypeB\t\n\007_amountB\007\n\005_type\"9\n\026ResourceGroup" + + "Reference\022\025\n\005group\030\377\354\203/ \001(\tH\000\210\001\001B\010\n\006_gro" + + "up\"\252\001\n\032ResourcePoliciesScopedList\022E\n\021res" + + "ource_policies\030\341\234\314\n \003(\0132\'.google.cloud.c" + + "ompute.v1.ResourcePolicy\0229\n\007warning\030\234\337\226\030" + + " \001(\0132 .google.cloud.compute.v1.WarningH\000" + + "\210\001\001B\n\n\010_warning\"\255\007\n\016ResourcePolicy\022\"\n\022cr" + + "eation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013descri" + + "ption\030\374\207\326\311\001 \001(\tH\001\210\001\001\022c\n\026group_placement_" + + "policy\030\214\233\233\005 \001(\0132;.google.cloud.compute.v" + + "1.ResourcePolicyGroupPlacementPolicyH\002\210\001" + + "\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022h\n\030instance_schedule" + + "_policy\030\260\320\271\244\001 \001(\0132=.google.cloud.compute" + + ".v1.ResourcePolicyInstanceSchedulePolicy" + + "H\004\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022\024\n\004name\030\213\365\315\001" + + " \001(\tH\006\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022V\n\017res" + + "ource_status\030\303\372\367v \001(\01325.google.cloud.com" + + "pute.v1.ResourcePolicyResourceStatusH\010\210\001" + + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\t\210\001\001\022g\n\030snapsho" + + "t_schedule_policy\030\337\326\201h \001(\0132=.google.clou" + + "d.compute.v1.ResourcePolicySnapshotSched" + + "ulePolicyH\n\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\013\210\001\001\"r" + + "\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\020\n\010CREATI" + + "NG\020\271\275\235\331\001\022\020\n\010DELETING\020\250\247\207\374\001\022\017\n\007EXPIRED\020\205\346" + + "\210\346\001\022\017\n\007INVALID\020\327\373\355\374\001\022\014\n\005READY\020\203\303\217%B\025\n\023_c" + + "reation_timestampB\016\n\014_descriptionB\031\n\027_gr" + + "oup_placement_policyB\005\n\003_idB\033\n\031_instance" + + "_schedule_policyB\007\n\005_kindB\007\n\005_nameB\t\n\007_r" + + "egionB\022\n\020_resource_statusB\014\n\n_self_linkB" + + "\033\n\031_snapshot_schedule_policyB\t\n\007_status\"" + + "\353\003\n\034ResourcePolicyAggregatedList\022\024\n\004etag" + + "\030\225\322\276\001 \001(\tH\000\210\001\001\022\020\n\002id\030\233\032 \001(\tH\001\210\001\001\022R\n\005item" + + "s\030\300\317\367/ \003(\0132@.google.cloud.compute.v1.Res" + + "ourcePolicyAggregatedList.ItemsEntry\022\024\n\004" + + "kind\030\224\367\310\001 \001(\tH\002\210\001\001\022\037\n\017next_page_token\030\225\272" + + "\206& \001(\tH\003\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\004\210\001\001\022" + + "\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030" + + " \001(\0132 .google.cloud.compute.v1.WarningH\005" + + "\210\001\001\032a\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022B\n\005value\030" + + "\002 \001(\01323.google.cloud.compute.v1.Resource" + + "PoliciesScopedList:\0028\001B\007\n\005_etagB\005\n\003_idB\007" + + "\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_lin" + + "kB\n\n\010_warning\"\236\001\n\030ResourcePolicyDailyCyc" + + "le\022\036\n\rdays_in_cycle\030\264\230\252\260\001 \001(\005H\000\210\001\001\022\030\n\010du" + + "ration\030\224\233\221J \001(\tH\001\210\001\001\022\032\n\nstart_time\030\212\351\356\021 " + + "\001(\tH\002\210\001\001B\020\n\016_days_in_cycleB\013\n\t_durationB" + + "\r\n\013_start_time\"\240\002\n\"ResourcePolicyGroupPl" + + "acementPolicy\022)\n\031availability_domain_cou" + + "nt\030\270\214\370\005 \001(\005H\000\210\001\001\022\034\n\013collocation\030\265\302\336\363\001 \001(" + + "\tH\001\210\001\001\022\030\n\010vm_count\030\207\273\326| \001(\005H\002\210\001\001\"\\\n\013Coll" + + "ocation\022\031\n\025UNDEFINED_COLLOCATION\020\000\022\021\n\nCO" + + "LLOCATED\020\322\253\2361\022\037\n\027UNSPECIFIED_COLLOCATION" + + "\020\355\217\263\335\001B\034\n\032_availability_domain_countB\016\n\014" + + "_collocationB\013\n\t_vm_count\"\241\001\n\031ResourcePo" + + "licyHourlyCycle\022\030\n\010duration\030\224\233\221J \001(\tH\000\210\001" + + "\001\022\037\n\016hours_in_cycle\030\374\210\227\373\001 \001(\005H\001\210\001\001\022\032\n\nst" + + "art_time\030\212\351\356\021 \001(\tH\002\210\001\001B\013\n\t_durationB\021\n\017_" + + "hours_in_cycleB\r\n\013_start_time\"\256\003\n$Resour" + + "cePolicyInstanceSchedulePolicy\022\037\n\017expira" + + "tion_time\030\335\254\350m \001(\tH\000\210\001\001\022\032\n\nstart_time\030\212\351" + + "\356\021 \001(\tH\001\210\001\001\022\031\n\ttime_zone\030\336\203\311\021 \001(\tH\002\210\001\001\022h" + + "\n\021vm_start_schedule\030\334\220\274\010 \001(\0132E.google.cl" + + "oud.compute.v1.ResourcePolicyInstanceSch" + + "edulePolicyScheduleH\003\210\001\001\022h\n\020vm_stop_sche" + + "dule\030\254\345\237\313\001 \001(\0132E.google.cloud.compute.v1" + + ".ResourcePolicyInstanceSchedulePolicySch" + + "eduleH\004\210\001\001B\022\n\020_expiration_timeB\r\n\013_start" + + "_timeB\014\n\n_time_zoneB\024\n\022_vm_start_schedul" + + "eB\023\n\021_vm_stop_schedule\"V\n,ResourcePolicy" + + "InstanceSchedulePolicySchedule\022\031\n\010schedu" + + "le\030\227\245\232\263\001 \001(\tH\000\210\001\001B\013\n\t_schedule\"\314\002\n\022Resou" + + "rcePolicyList\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\022\020\n\002i" + + "d\030\233\032 \001(\tH\001\210\001\001\0229\n\005items\030\300\317\367/ \003(\0132\'.google" + + ".cloud.compute.v1.ResourcePolicy\022\024\n\004kind" + + "\030\224\367\310\001 \001(\tH\002\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001" + + "(\tH\003\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\004\210\001\001\0229\n\007w" + + "arning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v" + + "1.WarningH\005\210\001\001B\007\n\005_etagB\005\n\003_idB\007\n\005_kindB" + "\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_wa" - + "rning\"W\n\032RouterMd5AuthenticationKey\022\022\n\003k" - + "ey\030\337\274\006 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001\001B\006\n" - + "\004_keyB\007\n\005_name\"\222\014\n\tRouterNat\022\031\n\rdrain_na" - + "t_ips\030\307\301\256\360\001 \003(\t\022/\n\036enable_dynamic_port_a" - + "llocation\030\242\231\335\375\001 \001(\010H\000\210\001\001\0223\n#enable_endpo" - + "int_independent_mapping\030\233\211\333{ \001(\010H\001\210\001\001\022\032\n" - + "\016endpoint_types\030\317\252\326\357\001 \003(\t\022%\n\025icmp_idle_t" - + "imeout_sec\030\312\320\336\001 \001(\005H\002\210\001\001\022H\n\nlog_config\030\235" - + "\321\301\247\001 \001(\0132+.google.cloud.compute.v1.Route" - + "rNatLogConfigH\003\210\001\001\022 \n\020max_ports_per_vm\030\341" - + "\311\236w \001(\005H\004\210\001\001\022 \n\020min_ports_per_vm\030\263\255\344X \001(" - + "\005H\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001\022\'\n\026nat_ip_a" - + "llocate_option\030\375\270\364\314\001 \001(\tH\007\210\001\001\022\022\n\007nat_ips" - + "\030\216\360\2138 \003(\t\0228\n\005rules\030\367\221\3653 \003(\0132&.google.clo" - + "ud.compute.v1.RouterNatRule\0222\n\"source_su" - + "bnetwork_ip_ranges_to_nat\030\333\357\241x \001(\tH\010\210\001\001\022" - + "J\n\013subnetworks\030\305\324\245\306\001 \003(\01321.google.cloud." - + "compute.v1.RouterNatSubnetworkToNat\0220\n t" - + "cp_established_idle_timeout_sec\030\355\353\260j \001(\005" - + "H\t\210\001\001\022*\n\031tcp_time_wait_timeout_sec\030\375\273\363\364\001" - + " \001(\005H\n\210\001\001\022/\n\037tcp_transitory_idle_timeout" - + "_sec\030\246\373\341a \001(\005H\013\210\001\001\022$\n\024udp_idle_timeout_s" - + "ec\030\306\262\372\036 \001(\005H\014\210\001\001\"`\n\rEndpointTypes\022\034\n\030UND" - + "EFINED_ENDPOINT_TYPES\020\000\022\030\n\021ENDPOINT_TYPE" - + "_SWG\020\310\316\375K\022\027\n\020ENDPOINT_TYPE_VM\020\262\352\234\033\"a\n\023Na" - + "tIpAllocateOption\022$\n UNDEFINED_NAT_IP_AL" - + "LOCATE_OPTION\020\000\022\020\n\tAUTO_ONLY\020\274\340\370V\022\022\n\013MAN" - + "UAL_ONLY\020\205\301\311|\"\302\001\n\035SourceSubnetworkIpRang" - + "esToNat\0220\n,UNDEFINED_SOURCE_SUBNETWORK_I" - + "P_RANGES_TO_NAT\020\000\022$\n\035ALL_SUBNETWORKS_ALL" - + "_IP_RANGES\020\330\223\350U\022,\n%ALL_SUBNETWORKS_ALL_P" - + "RIMARY_IP_RANGES\020\273\303\276X\022\033\n\023LIST_OF_SUBNETW" - + "ORKS\020\376\242\344\366\001B!\n\037_enable_dynamic_port_alloc" - + "ationB&\n$_enable_endpoint_independent_ma" - + "ppingB\030\n\026_icmp_idle_timeout_secB\r\n\013_log_" - + "configB\023\n\021_max_ports_per_vmB\023\n\021_min_port" - + "s_per_vmB\007\n\005_nameB\031\n\027_nat_ip_allocate_op" - + "tionB%\n#_source_subnetwork_ip_ranges_to_" - + "natB#\n!_tcp_established_idle_timeout_sec" - + "B\034\n\032_tcp_time_wait_timeout_secB\"\n _tcp_t" - + "ransitory_idle_timeout_secB\027\n\025_udp_idle_" - + "timeout_sec\"\267\001\n\022RouterNatLogConfig\022\027\n\006en" - + "able\030\203\313\324\224\001 \001(\010H\000\210\001\001\022\027\n\006filter\030\370\226\243\240\001 \001(\tH" - + "\001\210\001\001\"Y\n\006Filter\022\024\n\020UNDEFINED_FILTER\020\000\022\t\n\003" - + "ALL\020\201\373\003\022\023\n\013ERRORS_ONLY\020\200\260\317\222\001\022\031\n\021TRANSLAT" - + "IONS_ONLY\020\351\303\252\252\001B\t\n\007_enableB\t\n\007_filter\"\335\001" - + "\n\rRouterNatRule\022D\n\006action\030\266\374\275Y \001(\0132,.goo" - + "gle.cloud.compute.v1.RouterNatRuleAction" - + "H\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\025\n\005m" - + "atch\030\305\263\2671 \001(\tH\002\210\001\001\022\034\n\013rule_number\030\354\333\232\377\001 " - + "\001(\rH\003\210\001\001B\t\n\007_actionB\016\n\014_descriptionB\010\n\006_" - + "matchB\016\n\014_rule_number\"Y\n\023RouterNatRuleAc" - + "tion\022 \n\025source_nat_active_ips\030\365\273\250d \003(\t\022 " - + "\n\024source_nat_drain_ips\030\243\305\301\242\001 \003(\t\"\226\002\n\030Rou" - + "terNatSubnetworkToNat\022\024\n\004name\030\213\365\315\001 \001(\tH\000" - + "\210\001\001\022#\n\030secondary_ip_range_names\030\331\301\204~ \003(\t" - + "\022#\n\027source_ip_ranges_to_nat\030\362\312\224\271\001 \003(\t\"\220\001" - + "\n\023SourceIpRangesToNat\022%\n!UNDEFINED_SOURC" - + "E_IP_RANGES_TO_NAT\020\000\022\024\n\rALL_IP_RANGES\020\260\257" - + "\375\020\022\"\n\033LIST_OF_SECONDARY_IP_RANGES\020\234\264\330[\022\030" - + "\n\020PRIMARY_IP_RANGE\020\302\223\326\215\001B\007\n\005_name\"\306\002\n\014Ro" - + "uterStatus\0227\n\013best_routes\030\205\254\337\274\001 \003(\0132\036.go" - + "ogle.cloud.compute.v1.Route\022A\n\026best_rout" - + "es_for_router\030\371\373\3668 \003(\0132\036.google.cloud.co" - + "mpute.v1.Route\022N\n\017bgp_peer_status\030\373\327\225h \003" - + "(\01322.google.cloud.compute.v1.RouterStatu" - + "sBgpPeerStatus\022E\n\nnat_status\030\320\231\213\036 \003(\0132.." - + "google.cloud.compute.v1.RouterStatusNatS" - + "tatus\022\027\n\007network\030\256\264\205o \001(\tH\000\210\001\001B\n\n\010_netwo" - + "rk\"\334\010\n\031RouterStatusBgpPeerStatus\022=\n\021adve" - + "rtised_routes\030\254\331\374\236\001 \003(\0132\036.google.cloud.c" - + "ompute.v1.Route\022?\n\nbfd_status\030\361\270\323\274\001 \001(\0132" - + "\".google.cloud.compute.v1.BfdStatusH\000\210\001\001" - + "\022\033\n\013enable_ipv6\030\243\366\303V \001(\010H\001\210\001\001\022\033\n\nip_addr" - + "ess\030\334\361\334\301\001 \001(\tH\002\210\001\001\022$\n\024ipv6_nexthop_addre" - + "ss\030\323\205\253\r \001(\tH\003\210\001\001\022\"\n\021linked_vpn_tunnel\030\371\277" - + "\376\247\001 \001(\tH\004\210\001\001\022!\n\020md5_auth_enabled\030\313\221\220\327\001 \001" - + "(\010H\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001\022\"\n\022num_lea" - + "rned_routes\030\377\325\313@ \001(\rH\007\210\001\001\022\037\n\017peer_ip_add" - + "ress\030\331\227\207c \001(\tH\010\210\001\001\022*\n\031peer_ipv6_nexthop_" - + "address\030\220\373\255\352\001 \001(\tH\t\210\001\001\022*\n\031router_applian" - + "ce_instance\030\235\307\247\337\001 \001(\tH\n\210\001\001\022\025\n\005state\030\221\211\2534" - + " \001(\tH\013\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\014\210\001\001\022\036\n\rsta" - + "tus_reason\030\261\226\265\243\001 \001(\tH\r\210\001\001\022\026\n\006uptime\030\350\267\236p" - + " \001(\tH\016\210\001\001\022\036\n\016uptime_seconds\030\250\312\3701 \001(\tH\017\210\001" - + "\001\"E\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\013\n\004DOW" - + "N\020\242\271\200\001\022\017\n\007UNKNOWN\020\252\360\304\316\001\022\007\n\002UP\020\233\025\"p\n\014Stat" - + "usReason\022\033\n\027UNDEFINED_STATUS_REASON\020\000\022 \n" - + "\031MD5_AUTH_INTERNAL_PROBLEM\020\263\221\375B\022!\n\031STATU" - + "S_REASON_UNSPECIFIED\020\211\216\204\274\001B\r\n\013_bfd_statu" - + "sB\016\n\014_enable_ipv6B\r\n\013_ip_addressB\027\n\025_ipv" - + "6_nexthop_addressB\024\n\022_linked_vpn_tunnelB" - + "\023\n\021_md5_auth_enabledB\007\n\005_nameB\025\n\023_num_le" - + "arned_routesB\022\n\020_peer_ip_addressB\034\n\032_pee" - + "r_ipv6_nexthop_addressB\034\n\032_router_applia" - + "nce_instanceB\010\n\006_stateB\t\n\007_statusB\020\n\016_st" - + "atus_reasonB\t\n\007_uptimeB\021\n\017_uptime_second" - + "s\"\367\003\n\025RouterStatusNatStatus\022\"\n\026auto_allo" - + "cated_nat_ips\030\206\264\310\363\001 \003(\t\022(\n\034drain_auto_al" - + "located_nat_ips\030\255\220\267\223\001 \003(\t\022(\n\034drain_user_" - + "allocated_nat_ips\030\311\216\310\221\001 \003(\t\022)\n\030min_extra" - + "_nat_ips_needed\030\342\351\265\256\001 \001(\005H\000\210\001\001\022\024\n\004name\030\213" - + "\365\315\001 \001(\tH\001\210\001\001\0223\n\"num_vm_endpoints_with_na" - + "t_mappings\030\354\266\250\364\001 \001(\005H\002\210\001\001\022S\n\013rule_status" - + "\030\225\305\356B \003(\0132;.google.cloud.compute.v1.Rout" - + "erStatusNatStatusNatRuleStatus\022*\n\037user_a" - + "llocated_nat_ip_resources\030\327\351\272e \003(\t\022\"\n\026us" - + "er_allocated_nat_ips\030\242\262\331\361\001 \003(\tB\033\n\031_min_e" - + "xtra_nat_ips_neededB\007\n\005_nameB%\n#_num_vm_" - + "endpoints_with_nat_mappings\"\244\002\n\"RouterSt" - + "atusNatStatusNatRuleStatus\022\031\n\016active_nat" - + "_ips\030\325\357\266c \003(\t\022\031\n\rdrain_nat_ips\030\307\301\256\360\001 \003(\t" - + "\022%\n\024min_extra_ips_needed\030\204\312\251\250\001 \001(\005H\000\210\001\001\022" - + "3\n\"num_vm_endpoints_with_nat_mappings\030\354\266" - + "\250\364\001 \001(\005H\001\210\001\001\022\034\n\013rule_number\030\354\333\232\377\001 \001(\005H\002\210" - + "\001\001B\027\n\025_min_extra_ips_neededB%\n#_num_vm_e" - + "ndpoints_with_nat_mappingsB\016\n\014_rule_numb" - + "er\"\177\n\024RouterStatusResponse\022\024\n\004kind\030\224\367\310\001 " - + "\001(\tH\000\210\001\001\022=\n\006result\030\235\220\267B \001(\0132%.google.clo" - + "ud.compute.v1.RouterStatusH\001\210\001\001B\007\n\005_kind" - + "B\t\n\007_result\"`\n\026RoutersPreviewResponse\0229\n" - + "\010resource\030\216\210\257] \001(\0132\037.google.cloud.comput" - + "e.v1.RouterH\000\210\001\001B\013\n\t_resource\"\220\001\n\021Router" - + "sScopedList\0224\n\007routers\030\312\244\335\224\001 \003(\0132\037.googl" - + "e.cloud.compute.v1.Router\0229\n\007warning\030\234\337\226" - + "\030 \001(\0132 .google.cloud.compute.v1.WarningH" - + "\000\210\001\001B\n\n\010_warning\"\220\003\n\004Rule\022\026\n\006action\030\266\374\275Y" - + " \001(\tH\000\210\001\001\0229\n\nconditions\030\270\355\220D \003(\0132\".googl" - + "e.cloud.compute.v1.Condition\022\034\n\013descript" - + "ion\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\r\n\003ins\030\356\257\006 \003(\t\022:\n\013log" - + "_configs\030\366\326\362H \003(\0132\".google.cloud.compute" - + ".v1.LogConfig\022\023\n\007not_ins\030\202\241\233\367\001 \003(\t\022\026\n\013pe" - + "rmissions\030\204\351\313\034 \003(\t\"\203\001\n\006Action\022\024\n\020UNDEFIN" - + "ED_ACTION\020\000\022\014\n\005ALLOW\020\251\326\336\035\022\025\n\016ALLOW_WITH_" - + "LOG\020\201\341\240$\022\n\n\004DENY\020\214\354\177\022\025\n\rDENY_WITH_LOG\020\376\351" - + "\311\247\001\022\t\n\003LOG\020\244\316\004\022\020\n\tNO_ACTION\020\364\264\244|B\t\n\007_act" - + "ionB\016\n\014_description\"\330\003\n\016SSLHealthCheck\022\024" - + "\n\004port\030\201\261\322\001 \001(\005H\000\210\001\001\022\031\n\tport_name\030\211\207\347\023 \001" - + "(\tH\001\210\001\001\022\"\n\022port_specification\030\305\353\314\030 \001(\tH\002" - + "\210\001\001\022\034\n\014proxy_header\030\376\272\274L \001(\tH\003\210\001\001\022\027\n\007req" - + "uest\030\217\345\273\n \001(\tH\004\210\001\001\022\030\n\010response\030\301\250\334] \001(\tH" - + "\005\210\001\001\"~\n\021PortSpecification\022 \n\034UNDEFINED_P" - + "ORT_SPECIFICATION\020\000\022\025\n\016USE_FIXED_PORT\020\344\210" - + "\333Z\022\026\n\016USE_NAMED_PORT\020\277\317\307\246\001\022\030\n\020USE_SERVIN" - + "G_PORT\020\314\321\365\254\001\"H\n\013ProxyHeader\022\032\n\026UNDEFINED" - + "_PROXY_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1" - + "\020\254\244\267\237\001B\007\n\005_portB\014\n\n_port_nameB\025\n\023_port_s" - + "pecificationB\017\n\r_proxy_headerB\n\n\010_reques" - + "tB\013\n\t_response\"\217\010\n\021SavedAttachedDisk\022\034\n\013" - + "auto_delete\030\273\344\316\335\001 \001(\010H\000\210\001\001\022\024\n\004boot\030\362\365\270\001 " - + "\001(\010H\001\210\001\001\022\033\n\013device_name\030\324\265\232 \001(\tH\002\210\001\001\022T\n" - + "\023disk_encryption_key\030\205\355\304\201\001 \001(\0132..google." - + "cloud.compute.v1.CustomerEncryptionKeyH\003" - + "\210\001\001\022\035\n\014disk_size_gb\030\267\232\347\226\001 \001(\003H\004\210\001\001\022\031\n\tdi" - + "sk_type\030\234\351\254, \001(\tH\005\210\001\001\022E\n\021guest_os_featur" - + "es\030\321\340\347% \003(\0132\'.google.cloud.compute.v1.Gu" - + "estOsFeature\022\025\n\005index\030\322\321\354/ \001(\005H\006\210\001\001\022\032\n\ti" - + "nterface\030\271\332\325\357\001 \001(\tH\007\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\t" - + "H\010\210\001\001\022\024\n\010licenses\030\322\210\200\241\001 \003(\t\022\024\n\004mode\030\243\363\314\001" - + " \001(\tH\t\210\001\001\022\026\n\006source\030\233\320\301T \001(\tH\n\210\001\001\022\036\n\rsto" - + "rage_bytes\030\247\273\275\312\001 \001(\003H\013\210\001\001\022%\n\024storage_byt" - + "es_status\030\212\253\200\352\001 \001(\tH\014\210\001\001\022\024\n\004type\030\272\236\332\001 \001(" - + "\tH\r\210\001\001\">\n\tInterface\022\027\n\023UNDEFINED_INTERFA" - + "CE\020\000\022\013\n\004NVME\020\340\202\223\001\022\013\n\004SCSI\020\246\201\233\001\"?\n\004Mode\022\022" - + "\n\016UNDEFINED_MODE\020\000\022\020\n\tREAD_ONLY\020\265\231\354+\022\021\n\n" - + "READ_WRITE\020\326\227\344R\"]\n\022StorageBytesStatus\022\"\n" - + "\036UNDEFINED_STORAGE_BYTES_STATUS\020\000\022\020\n\010UPD" - + "ATING\020\306\356\354\353\001\022\021\n\nUP_TO_DATE\020\316\242\2470\"?\n\004Type\022\022" - + "\n\016UNDEFINED_TYPE\020\000\022\022\n\nPERSISTENT\020\227\365\325\333\001\022\017" - + "\n\007SCRATCH\020\332\375\360\354\001B\016\n\014_auto_deleteB\007\n\005_boot" - + "B\016\n\014_device_nameB\026\n\024_disk_encryption_key" - + "B\017\n\r_disk_size_gbB\014\n\n_disk_typeB\010\n\006_inde" - + "xB\014\n\n_interfaceB\007\n\005_kindB\007\n\005_modeB\t\n\007_so" - + "urceB\020\n\016_storage_bytesB\027\n\025_storage_bytes" - + "_statusB\007\n\005_type\"\305\003\n\tSavedDisk\022\035\n\014archit" - + "ecture\030\323\322\261\220\001 \001(\tH\000\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\001" - + "\210\001\001\022\034\n\013source_disk\030\301\356\264\327\001 \001(\tH\002\210\001\001\022\036\n\rsto" - + "rage_bytes\030\247\273\275\312\001 \001(\003H\003\210\001\001\022%\n\024storage_byt" - + "es_status\030\212\253\200\352\001 \001(\tH\004\210\001\001\"j\n\014Architecture" - + "\022\032\n\026UNDEFINED_ARCHITECTURE\020\000\022 \n\030ARCHITEC" - + "TURE_UNSPECIFIED\020\253\324\235\274\001\022\014\n\005ARM64\020\372\313\351\035\022\016\n\006" - + "X86_64\020\307\244\346\312\001\"]\n\022StorageBytesStatus\022\"\n\036UN" - + "DEFINED_STORAGE_BYTES_STATUS\020\000\022\020\n\010UPDATI" - + "NG\020\306\356\354\353\001\022\021\n\nUP_TO_DATE\020\316\242\2470B\017\n\r_architec" - + "tureB\007\n\005_kindB\016\n\014_source_diskB\020\n\016_storag" - + "e_bytesB\027\n\025_storage_bytes_status\"\201\002\n\025Sca" - + "lingScheduleStatus\022\037\n\017last_start_time\030\323\273" - + "\274\020 \001(\tH\000\210\001\001\022\037\n\017next_start_time\030\326\362\260. \001(\tH" - + "\001\210\001\001\022\025\n\005state\030\221\211\2534 \001(\tH\002\210\001\001\"]\n\005State\022\023\n\017" - + "UNDEFINED_STATE\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\020\n\010DIS" - + "ABLED\020\374\324\260\366\001\022\017\n\010OBSOLETE\020\231\353\334\037\022\014\n\005READY\020\203\303" - + "\217%B\022\n\020_last_start_timeB\022\n\020_next_start_ti" - + "meB\010\n\006_state\"\261\006\n\nScheduling\022\"\n\021automatic" - + "_restart\030\373\267\244\247\001 \001(\010H\000\210\001\001\022+\n\033instance_term" - + "ination_action\030\273\377\2313 \001(\tH\001\210\001\001\022\036\n\rlocation" - + "_hint\030\321\201\222\247\001 \001(\tH\002\210\001\001\022\036\n\rmin_node_cpus\030\273\244" - + "\242\227\001 \001(\005H\003\210\001\001\022L\n\017node_affinities\030\243\204\232\334\001 \003(" - + "\0132/.google.cloud.compute.v1.SchedulingNo" - + "deAffinity\022#\n\023on_host_maintenance\030\334\362\347\036 \001" - + "(\tH\004\210\001\001\022\034\n\013preemptible\030\241\345\313\232\001 \001(\010H\005\210\001\001\022!\n" - + "\022provisioning_model\030\327\226\036 \001(\tH\006\210\001\001\"\223\001\n\031Ins" - + "tanceTerminationAction\022)\n%UNDEFINED_INST" - + "ANCE_TERMINATION_ACTION\020\000\022\016\n\006DELETE\020\253\363\345\277" - + "\001\022.\n\'INSTANCE_TERMINATION_ACTION_UNSPECI" - + "FIED\020\263\301\251,\022\013\n\004STOP\020\202\200\234\001\"Y\n\021OnHostMaintena" - + "nce\022!\n\035UNDEFINED_ON_HOST_MAINTENANCE\020\000\022\016" - + "\n\007MIGRATE\020\213\303\201O\022\021\n\tTERMINATE\020\301\234\313\373\001\"T\n\021Pro" - + "visioningModel\022 \n\034UNDEFINED_PROVISIONING" - + "_MODEL\020\000\022\013\n\004SPOT\020\202\342\233\001\022\020\n\010STANDARD\020\275\235\214\347\001B" - + "\024\n\022_automatic_restartB\036\n\034_instance_termi" - + "nation_actionB\020\n\016_location_hintB\020\n\016_min_" - + "node_cpusB\026\n\024_on_host_maintenanceB\016\n\014_pr" - + "eemptibleB\025\n\023_provisioning_model\"\307\001\n\026Sch" - + "edulingNodeAffinity\022\022\n\003key\030\337\274\006 \001(\tH\000\210\001\001\022" - + "\030\n\010operator\030\244\321\250\021 \001(\tH\001\210\001\001\022\021\n\006values\030\242\272\226w" - + " \003(\t\"W\n\010Operator\022\026\n\022UNDEFINED_OPERATOR\020\000" - + "\022\007\n\002IN\020\245\022\022\r\n\006NOT_IN\020\261\274\353L\022\033\n\024OPERATOR_UNS" - + "PECIFIED\020\374\377\272=B\006\n\004_keyB\013\n\t_operator\"3\n\014Sc" - + "ratchDisks\022\027\n\007disk_gb\030\275\305\212\035 \001(\005H\000\210\001\001B\n\n\010_" - + "disk_gb\"S\n\nScreenshot\022\031\n\010contents\030\232\266\275\361\001 " - + "\001(\tH\000\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001B\013\n\t_conte" - + "ntsB\007\n\005_kind\"\357\003\n\036SecurityPoliciesAggrega" - + "tedList\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\022\020\n\002id\030\233\032 \001" - + "(\tH\001\210\001\001\022T\n\005items\030\300\317\367/ \003(\0132B.google.cloud" - + ".compute.v1.SecurityPoliciesAggregatedLi" - + "st.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\002\210\001\001\022\037\n\017n" - + "ext_page_token\030\225\272\206& \001(\tH\003\210\001\001\022\032\n\tself_lin" - + "k\030\215\222\305\331\001 \001(\tH\004\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(" - + "\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.com" - + "pute.v1.WarningH\005\210\001\001\032a\n\nItemsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022B\n\005value\030\002 \001(\01323.google.cloud.co" - + "mpute.v1.SecurityPoliciesScopedList:\0028\001B" - + "\007\n\005_etagB\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_t" - + "okenB\014\n\n_self_linkB\n\n\010_warning\"\277\001\n7Secur" - + "ityPoliciesListPreconfiguredExpressionSe" - + "tsResponse\022b\n\035preconfigured_expression_s" - + "ets\030\372\214\327\377\001 \001(\01322.google.cloud.compute.v1." - + "SecurityPoliciesWafConfigH\000\210\001\001B \n\036_preco" - + "nfigured_expression_sets\"\252\001\n\032SecurityPol" - + "iciesScopedList\022E\n\021security_policies\030\357\246\367" - + "< \003(\0132\'.google.cloud.compute.v1.Security" - + "Policy\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clou" - + "d.compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"r\n" - + "\031SecurityPoliciesWafConfig\022G\n\twaf_rules\030" - + "\324\303\333# \001(\0132,.google.cloud.compute.v1.Preco" - + "nfiguredWafSetH\000\210\001\001B\014\n\n_waf_rules\"\245\010\n\016Se" - + "curityPolicy\022k\n\032adaptive_protection_conf" - + "ig\030\337\373\321G \001(\0132?.google.cloud.compute.v1.Se" - + "curityPolicyAdaptiveProtectionConfigH\000\210\001" - + "\001\022f\n\027advanced_options_config\030\300\323\235\326\001 \001(\0132<" - + ".google.cloud.compute.v1.SecurityPolicyA" - + "dvancedOptionsConfigH\001\210\001\001\022\"\n\022creation_ti" - + "mestamp\030\266\217\307\016 \001(\tH\002\210\001\001\022c\n\026ddos_protection" - + "_config\030\315\204\377\027 \001(\0132;.google.cloud.compute." - + "v1.SecurityPolicyDdosProtectionConfigH\003\210" - + "\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\004\210\001\001\022\033\n\013fing" - + "erprint\030\344\321\363o \001(\tH\005\210\001\001\022\020\n\002id\030\233\032 \001(\004H\006\210\001\001\022" - + "\024\n\004kind\030\224\367\310\001 \001(\tH\007\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\010" - + "\210\001\001\022h\n\030recaptcha_options_config\030\333\324\275\367\001 \001(" - + "\0132=.google.cloud.compute.v1.SecurityPoli" - + "cyRecaptchaOptionsConfigH\t\210\001\001\022\026\n\006region\030" - + "\364\315\240B \001(\tH\n\210\001\001\022=\n\005rules\030\367\221\3653 \003(\0132+.google" - + ".cloud.compute.v1.SecurityPolicyRule\022\032\n\t" - + "self_link\030\215\222\305\331\001 \001(\tH\013\210\001\001\022\024\n\004type\030\272\236\332\001 \001(" - + "\tH\014\210\001\001\"d\n\004Type\022\022\n\016UNDEFINED_TYPE\020\000\022\022\n\013CL" - + "OUD_ARMOR\020\365\234\244|\022\027\n\020CLOUD_ARMOR_EDGE\020\307\242\307w\022" - + "\033\n\023CLOUD_ARMOR_NETWORK\020\304\254\371\350\001B\035\n\033_adaptiv" - + "e_protection_configB\032\n\030_advanced_options" - + "_configB\025\n\023_creation_timestampB\031\n\027_ddos_" - + "protection_configB\016\n\014_descriptionB\016\n\014_fi" - + "ngerprintB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\033\n\031_r" - + "ecaptcha_options_configB\t\n\007_regionB\014\n\n_s" - + "elf_linkB\007\n\005_type\"\315\001\n&SecurityPolicyAdap", - "tiveProtectionConfig\022\203\001\n\032layer7_ddos_def" - + "ense_config\030\243\331\303\320\001 \001(\0132V.google.cloud.com" - + "pute.v1.SecurityPolicyAdaptiveProtection" - + "ConfigLayer7DdosDefenseConfigH\000\210\001\001B\035\n\033_l" - + "ayer7_ddos_defense_config\"\355\001\n=SecurityPo" - + "licyAdaptiveProtectionConfigLayer7DdosDe" - + "fenseConfig\022\027\n\006enable\030\203\313\324\224\001 \001(\010H\000\210\001\001\022 \n\017" - + "rule_visibility\030\265\330\220\330\001 \001(\tH\001\210\001\001\"R\n\016RuleVi" - + "sibility\022\035\n\031UNDEFINED_RULE_VISIBILITY\020\000\022" - + "\017\n\007PREMIUM\020\267\264\301\276\001\022\020\n\010STANDARD\020\275\235\214\347\001B\t\n\007_e" - + "nableB\022\n\020_rule_visibility\"\233\003\n#SecurityPo" - + "licyAdvancedOptionsConfig\022p\n\022json_custom" - + "_config\030\271\331\2315 \001(\0132L.google.cloud.compute." - + "v1.SecurityPolicyAdvancedOptionsConfigJs" - + "onCustomConfigH\000\210\001\001\022\035\n\014json_parsing\030\331\204\332\206" - + "\001 \001(\tH\001\210\001\001\022\031\n\tlog_level\030\311\275\204C \001(\tH\002\210\001\001\"M\n" - + "\013JsonParsing\022\032\n\026UNDEFINED_JSON_PARSING\020\000" - + "\022\020\n\010DISABLED\020\374\324\260\366\001\022\020\n\010STANDARD\020\275\235\214\347\001\"C\n\010" - + "LogLevel\022\027\n\023UNDEFINED_LOG_LEVEL\020\000\022\r\n\006NOR" - + "MAL\020\347\341\346L\022\017\n\007VERBOSE\020\342\212\344\375\001B\025\n\023_json_custo" - + "m_configB\017\n\r_json_parsingB\014\n\n_log_level\"" - + "O\n3SecurityPolicyAdvancedOptionsConfigJs" - + "onCustomConfig\022\030\n\rcontent_types\030\263\342\247\010 \003(\t" - + "\"\256\001\n\"SecurityPolicyDdosProtectionConfig\022" - + " \n\017ddos_protection\030\224\237\233\203\001 \001(\tH\000\210\001\001\"R\n\016Ddo" - + "sProtection\022\035\n\031UNDEFINED_DDOS_PROTECTION" - + "\020\000\022\017\n\010ADVANCED\020\242\260\265\036\022\020\n\010STANDARD\020\275\235\214\347\001B\022\n" - + "\020_ddos_protection\"\203\002\n\022SecurityPolicyList" - + "\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0229\n\005items\030\300\317\367/ \003(\0132\'.g" - + "oogle.cloud.compute.v1.SecurityPolicy\022\024\n" - + "\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225" - + "\272\206& \001(\tH\002\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .googl" - + "e.cloud.compute.v1.WarningH\003\210\001\001B\005\n\003_idB\007" - + "\n\005_kindB\022\n\020_next_page_tokenB\n\n\010_warning\"" - + "`\n$SecurityPolicyRecaptchaOptionsConfig\022" - + "\"\n\021redirect_site_key\030\352\204\274\325\001 \001(\tH\000\210\001\001B\024\n\022_" - + "redirect_site_key\"N\n\027SecurityPolicyRefer" - + "ence\022\037\n\017security_policy\030\221\206\312Q \001(\tH\000\210\001\001B\022\n" - + "\020_security_policy\"\212\006\n\022SecurityPolicyRule" - + "\022\026\n\006action\030\266\374\275Y \001(\tH\000\210\001\001\022\034\n\013description\030" - + "\374\207\326\311\001 \001(\tH\001\210\001\001\022[\n\rheader_action\030\250\240\270\234\001 \001(" - + "\0132;.google.cloud.compute.v1.SecurityPoli" - + "cyRuleHttpHeaderActionH\002\210\001\001\022\024\n\004kind\030\224\367\310\001" - + " \001(\tH\003\210\001\001\022I\n\005match\030\305\263\2671 \001(\01322.google.clo" - + "ud.compute.v1.SecurityPolicyRuleMatcherH" - + "\004\210\001\001\022k\n\030preconfigured_waf_config\030\343\237\2268 \001(" - + "\0132A.google.cloud.compute.v1.SecurityPoli" - + "cyRulePreconfiguredWafConfigH\005\210\001\001\022\027\n\007pre" - + "view\030\310\307\243h \001(\010H\006\210\001\001\022\031\n\010priority\030\244\363\241\324\001 \001(\005" - + "H\007\210\001\001\022_\n\022rate_limit_options\030\373\311\232 \001(\0132;.g" - + "oogle.cloud.compute.v1.SecurityPolicyRul" - + "eRateLimitOptionsH\010\210\001\001\022\\\n\020redirect_optio" - + "ns\030\273\222\356M \001(\0132:.google.cloud.compute.v1.Se" - + "curityPolicyRuleRedirectOptionsH\t\210\001\001B\t\n\007" - + "_actionB\016\n\014_descriptionB\020\n\016_header_actio" - + "nB\007\n\005_kindB\010\n\006_matchB\033\n\031_preconfigured_w" - + "af_configB\n\n\010_previewB\013\n\t_priorityB\025\n\023_r" - + "ate_limit_optionsB\023\n\021_redirect_options\"\225" - + "\001\n\"SecurityPolicyRuleHttpHeaderAction\022o\n" - + "\027request_headers_to_adds\030\315\253\372) \003(\0132K.goog" - + "le.cloud.compute.v1.SecurityPolicyRuleHt" - + "tpHeaderActionHttpHeaderOption\"\220\001\n2Secur" - + "ityPolicyRuleHttpHeaderActionHttpHeaderO" - + "ption\022\033\n\013header_name\030\375\301\3074 \001(\tH\000\210\001\001\022\034\n\014he" - + "ader_value\030\277\362\353` \001(\tH\001\210\001\001B\016\n\014_header_name" - + "B\017\n\r_header_value\"\254\002\n\031SecurityPolicyRule" - + "Matcher\022P\n\006config\030\302\206\376y \001(\01328.google.clou" - + "d.compute.v1.SecurityPolicyRuleMatcherCo" - + "nfigH\000\210\001\001\0223\n\004expr\030\365\363\276\001 \001(\0132\035.google.clou" - + "d.compute.v1.ExprH\001\210\001\001\022\037\n\016versioned_expr" - + "\030\275\343\326\231\001 \001(\tH\002\210\001\001\"@\n\rVersionedExpr\022\034\n\030UNDE" - + "FINED_VERSIONED_EXPR\020\000\022\021\n\nSRC_IPS_V1\020\211\375\350" - + "!B\t\n\007_configB\007\n\005_exprB\021\n\017_versioned_expr" - + "\"<\n\037SecurityPolicyRuleMatcherConfig\022\031\n\rs" - + "rc_ip_ranges\030\323\200\207\316\001 \003(\t\"\215\001\n(SecurityPolic" - + "yRulePreconfiguredWafConfig\022a\n\nexclusion" - + "s\030\345\370\277c \003(\0132J.google.cloud.compute.v1.Sec" - + "urityPolicyRulePreconfiguredWafConfigExc" - + "lusion\"\202\005\n1SecurityPolicyRulePreconfigur" - + "edWafConfigExclusion\022|\n\032request_cookies_" - + "to_exclude\030\366\336\337J \003(\0132U.google.cloud.compu" - + "te.v1.SecurityPolicyRulePreconfiguredWaf" - + "ConfigExclusionFieldParams\022|\n\032request_he" - + "aders_to_exclude\030\237\244\223\036 \003(\0132U.google.cloud" - + ".compute.v1.SecurityPolicyRulePreconfigu" - + "redWafConfigExclusionFieldParams\022\202\001\n\037req" - + "uest_query_params_to_exclude\030\210\236\272\242\001 \003(\0132U" - + ".google.cloud.compute.v1.SecurityPolicyR" - + "ulePreconfiguredWafConfigExclusionFieldP" - + "arams\022y\n\027request_uris_to_exclude\030\236\252\237+ \003(" - + "\0132U.google.cloud.compute.v1.SecurityPoli" - + "cyRulePreconfiguredWafConfigExclusionFie" - + "ldParams\022\033\n\017target_rule_ids\030\343\343\325\355\001 \003(\t\022 \n" - + "\017target_rule_set\030\215\257\326\355\001 \001(\tH\000\210\001\001B\022\n\020_targ" - + "et_rule_set\"\347\001\n.google.cloud.compute" - + ".v1.ServiceAttachmentConsumerProjectLimi" - + "t\022 \n\025consumer_reject_lists\030\236\231\245a \003(\t\022\"\n\022c" - + "reation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013descr" - + "iption\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\027\n\014domain_names\030\215\330" - + "\211\003 \003(\t\022&\n\025enable_proxy_protocol\030\205\207\274\255\001 \001(" - + "\010H\003\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\004\210\001\001\022\020\n\002i" - + "d\030\233\032 \001(\004H\005\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\006\210\001\001\022\024\n\004n" - + "ame\030\213\365\315\001 \001(\tH\007\210\001\001\022\027\n\013nat_subnets\030\230\217\333\262\001 \003" - + "(\t\022(\n\030producer_forwarding_rule\030\321\250\234v \001(\tH" - + "\010\210\001\001\022L\n\031psc_service_attachment_id\030\356\372\317\373\001 " - + "\001(\0132 .google.cloud.compute.v1.Uint128H\t\210" - + "\001\001\022\026\n\006region\030\364\315\240B \001(\tH\n\210\001\001\022\032\n\tself_link\030" - + "\215\222\305\331\001 \001(\tH\013\210\001\001\022\035\n\016target_service\030\207\374N \001(\t" - + "H\014\210\001\001\"\225\001\n\024ConnectionPreference\022#\n\037UNDEFI" - + "NED_CONNECTION_PREFERENCE\020\000\022\027\n\020ACCEPT_AU" - + "TOMATIC\020\224\367\360#\022\025\n\rACCEPT_MANUAL\020\335\355\361\261\001\022(\n!C" - + "ONNECTION_PREFERENCE_UNSPECIFIED\020\264\240\277\020B\030\n" - + "\026_connection_preferenceB\025\n\023_creation_tim" - + "estampB\016\n\014_descriptionB\030\n\026_enable_proxy_" - + "protocolB\016\n\014_fingerprintB\005\n\003_idB\007\n\005_kind" - + "B\007\n\005_nameB\033\n\031_producer_forwarding_ruleB\034" - + "\n\032_psc_service_attachment_idB\t\n\007_regionB" - + "\014\n\n_self_linkB\021\n\017_target_service\"\324\003\n\037Ser" - + "viceAttachmentAggregatedList\022\020\n\002id\030\233\032 \001(" - + "\tH\000\210\001\001\022U\n\005items\030\300\317\367/ \003(\0132C.google.cloud." - + "compute.v1.ServiceAttachmentAggregatedLi" - + "st.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017n" + + "rning\"\271\001\n\034ResourcePolicyResourceStatus\022|" + + "\n\030instance_schedule_policy\030\260\320\271\244\001 \001(\0132Q.g" + + "oogle.cloud.compute.v1.ResourcePolicyRes" + + "ourceStatusInstanceSchedulePolicyStatusH" + + "\000\210\001\001B\033\n\031_instance_schedule_policy\"\266\001\n8Re" + + "sourcePolicyResourceStatusInstanceSchedu" + + "lePolicyStatus\022$\n\023last_run_start_time\030\207\357" + + "\301\220\001 \001(\tH\000\210\001\001\022$\n\023next_run_start_time\030\212\263\370\227" + + "\001 \001(\tH\001\210\001\001B\026\n\024_last_run_start_timeB\026\n\024_n" + + "ext_run_start_time\"\250\003\n$ResourcePolicySna" + + "pshotSchedulePolicy\022n\n\020retention_policy\030" + + "\363\312\334 \001(\0132L.google.cloud.compute.v1.Resou" + + "rcePolicySnapshotSchedulePolicyRetention" + + "PolicyH\000\210\001\001\022`\n\010schedule\030\227\245\232\263\001 \001(\0132E.goog" + + "le.cloud.compute.v1.ResourcePolicySnapsh" + + "otSchedulePolicyScheduleH\001\210\001\001\022t\n\023snapsho" + + "t_properties\030\216\225\262X \001(\0132O.google.cloud.com" + + "pute.v1.ResourcePolicySnapshotSchedulePo" + + "licySnapshotPropertiesH\002\210\001\001B\023\n\021_retentio" + + "n_policyB\013\n\t_scheduleB\026\n\024_snapshot_prope" + + "rties\"\325\002\n3ResourcePolicySnapshotSchedule" + + "PolicyRetentionPolicy\022#\n\022max_retention_d" + + "ays\030\223\302\321\232\001 \001(\005H\000\210\001\001\022&\n\025on_source_disk_del" + + "ete\030\311\315\302\231\001 \001(\tH\001\210\001\001\"\237\001\n\022OnSourceDiskDelet" + + "e\022#\n\037UNDEFINED_ON_SOURCE_DISK_DELETE\020\000\022\036" + + "\n\026APPLY_RETENTION_POLICY\020\344\224\222\377\001\022\032\n\023KEEP_A" + + "UTO_SNAPSHOTS\020\371\310\273{\022(\n!UNSPECIFIED_ON_SOU" + + "RCE_DISK_DELETE\020\241\377\203rB\025\n\023_max_retention_d" + + "aysB\030\n\026_on_source_disk_delete\"\347\002\n,Resour" + + "cePolicySnapshotSchedulePolicySchedule\022Q" + + "\n\016daily_schedule\030\375\343\212) \001(\01321.google.cloud" + + ".compute.v1.ResourcePolicyDailyCycleH\000\210\001" + + "\001\022S\n\017hourly_schedule\030\245\261\243\022 \001(\01322.google.c" + + "loud.compute.v1.ResourcePolicyHourlyCycl" + + "eH\001\210\001\001\022T\n\017weekly_schedule\030\225\211\271\253\001 \001(\01322.go" + + "ogle.cloud.compute.v1.ResourcePolicyWeek" + + "lyCycleH\002\210\001\001B\021\n\017_daily_scheduleB\022\n\020_hour" + + "ly_scheduleB\022\n\020_weekly_schedule\"\320\002\n6Reso" + + "urcePolicySnapshotSchedulePolicySnapshot" + + "Properties\022\032\n\nchain_name\030\311\332\335 \001(\tH\000\210\001\001\022\034" + + "\n\013guest_flush\030\335\223\354\267\001 \001(\010H\001\210\001\001\022o\n\006labels\030\377" + + "\277\301\356\001 \003(\0132[.google.cloud.compute.v1.Resou" + + "rcePolicySnapshotSchedulePolicySnapshotP" + + "roperties.LabelsEntry\022\035\n\021storage_locatio" + + "ns\030\232\355\263\234\001 \003(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001B\r\n\013_chain_nameB\016\n\014_g" + + "uest_flush\"q\n\031ResourcePolicyWeeklyCycle\022" + + "T\n\014day_of_weeks\030\332\237\373z \003(\0132;.google.cloud." + + "compute.v1.ResourcePolicyWeeklyCycleDayO" + + "fWeek\"\264\002\n\"ResourcePolicyWeeklyCycleDayOf" + + "Week\022\022\n\003day\030\234\207\006 \001(\tH\000\210\001\001\022\030\n\010duration\030\224\233\221" + + "J \001(\tH\001\210\001\001\022\032\n\nstart_time\030\212\351\356\021 \001(\tH\002\210\001\001\"\237" + + "\001\n\003Day\022\021\n\rUNDEFINED_DAY\020\000\022\016\n\006FRIDAY\020\337\362\343\340" + + "\001\022\017\n\007INVALID\020\327\373\355\374\001\022\r\n\006MONDAY\020\220\312\213?\022\020\n\010SAT" + + "URDAY\020\271\217\207\205\001\022\016\n\006SUNDAY\020\320\213\322\223\001\022\017\n\010THURSDAY\020" + + "\332\263\346b\022\017\n\007TUESDAY\020\255\354\251\204\001\022\021\n\tWEDNESDAY\020\266\316\236\311\001" + + "B\006\n\004_dayB\013\n\t_durationB\r\n\013_start_time\"B\n\016" + + "ResourceStatus\022\036\n\rphysical_host\030\220\370\266\335\001 \001(" + + "\tH\000\210\001\001B\020\n\016_physical_host\"\234\001\n\025ResumeInsta" + + "nceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007" + + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreque" + + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A" + + "\002\362G\004zoneB\r\n\013_request_id\"\226\t\n\005Route\0229\n\010as_" + + "paths\030\241\305\314A \003(\0132$.google.cloud.compute.v1" + + ".RouteAsPath\022\"\n\022creation_timestamp\030\266\217\307\016 " + + "\001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\033" + + "\n\ndest_range\030\340\262\352\265\001 \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004" + + "H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001" + + " \001(\tH\005\210\001\001\022\027\n\007network\030\256\264\205o \001(\tH\006\210\001\001\022!\n\020ne" + + "xt_hop_gateway\030\202\372\354\263\001 \001(\tH\007\210\001\001\022\034\n\014next_ho" + + "p_ilb\030\335\272\336^ \001(\tH\010\210\001\001\022\"\n\021next_hop_instance" + + "\030\227\353\321\273\001 \001(\tH\t\210\001\001\022\033\n\013next_hop_ip\030\251\257\3154 \001(\tH" + + "\n\210\001\001\022 \n\020next_hop_network\030\354\241\211} \001(\tH\013\210\001\001\022!" + + "\n\020next_hop_peering\030\376\223\344\304\001 \001(\tH\014\210\001\001\022$\n\023nex" + + "t_hop_vpn_tunnel\030\225\345\360\367\001 \001(\tH\r\210\001\001\022\031\n\010prior" + + "ity\030\244\363\241\324\001 \001(\rH\016\210\001\001\022\035\n\014route_status\030\250\315\262\307\001" + + " \001(\tH\017\210\001\001\022\033\n\nroute_type\030\360\266\236\263\001 \001(\tH\020\210\001\001\022\032" + + "\n\tself_link\030\215\222\305\331\001 \001(\tH\021\210\001\001\022\017\n\004tags\030\231\350\330\001 " + + "\003(\t\0227\n\010warnings\030\327\210\301\355\001 \003(\0132!.google.cloud" + + ".compute.v1.Warnings\"l\n\013RouteStatus\022\032\n\026U" + + "NDEFINED_ROUTE_STATUS\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022", + "\017\n\007DROPPED\020\240\347\317\354\001\022\020\n\010INACTIVE\020\353\230\371\200\001\022\016\n\007PE" + + "NDING\020\367\252\360\020\"`\n\tRouteType\022\030\n\024UNDEFINED_ROU" + + "TE_TYPE\020\000\022\t\n\003BGP\020\253\201\004\022\016\n\006STATIC\020\356\204\203\223\001\022\016\n\006" + + "SUBNET\020\335\356\274\223\001\022\016\n\007TRANSIT\020\263\203\306YB\025\n\023_creatio" + + "n_timestampB\016\n\014_descriptionB\r\n\013_dest_ran" + + "geB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\n\n\010_networkB" + + "\023\n\021_next_hop_gatewayB\017\n\r_next_hop_ilbB\024\n" + + "\022_next_hop_instanceB\016\n\014_next_hop_ipB\023\n\021_" + + "next_hop_networkB\023\n\021_next_hop_peeringB\026\n" + + "\024_next_hop_vpn_tunnelB\013\n\t_priorityB\017\n\r_r" + + "oute_statusB\r\n\013_route_typeB\014\n\n_self_link" + + "\"\347\001\n\013RouteAsPath\022\023\n\010as_lists\030\310\312\371? \003(\r\022\"\n" + + "\021path_segment_type\030\240\265\353\364\001 \001(\tH\000\210\001\001\"\210\001\n\017Pa" + + "thSegmentType\022\037\n\033UNDEFINED_PATH_SEGMENT_" + + "TYPE\020\000\022\031\n\022AS_CONFED_SEQUENCE\020\260\217\367i\022\025\n\rAS_" + + "CONFED_SET\020\363\315\255\262\001\022\022\n\013AS_SEQUENCE\020\256\322\3622\022\016\n\006" + + "AS_SET\020\265\235\244\235\001B\024\n\022_path_segment_type\"\233\002\n\tR" + + "outeList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0220\n\005items\030\300\317\367/" + + " \003(\0132\036.google.cloud.compute.v1.Route\022\024\n\004" + + "kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272" + + "\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022" + + "9\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compu" + + "te.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_n" + + "ext_page_tokenB\014\n\n_self_linkB\n\n\010_warning" + + "\"\332\005\n\006Router\0226\n\003bgp\030\313\371\005 \001(\0132\".google.clou" + + "d.compute.v1.RouterBgpH\000\210\001\001\022=\n\tbgp_peers" + + "\030\335\255\356\327\001 \003(\0132&.google.cloud.compute.v1.Rou" + + "terBgpPeer\022\"\n\022creation_timestamp\030\266\217\307\016 \001(" + + "\tH\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022.\n\035" + + "encrypted_interconnect_router\030\237\242\214\216\001 \001(\010H" + + "\003\210\001\001\022\020\n\002id\030\233\032 \001(\004H\004\210\001\001\022?\n\ninterfaces\030\332\364\340" + + "\005 \003(\0132(.google.cloud.compute.v1.RouterIn" + + "terface\022\024\n\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022W\n\027md5_aut" + + "hentication_keys\030\232\256\361! \003(\01323.google.cloud" + + ".compute.v1.RouterMd5AuthenticationKey\022\024" + + "\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001\0223\n\004nats\030\362\366\315\001 \003(\0132\"." + + "google.cloud.compute.v1.RouterNat\022\027\n\007net" + + "work\030\256\264\205o \001(\tH\007\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\010\210" + + "\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\t\210\001\001B\006\n\004_bgpB\025" + + "\n\023_creation_timestampB\016\n\014_descriptionB \n" + + "\036_encrypted_interconnect_routerB\005\n\003_idB\007" + + "\n\005_kindB\007\n\005_nameB\n\n\010_networkB\t\n\007_regionB" + + "\014\n\n_self_link\"h\n\027RouterAdvertisedIpRange" + + "\022\034\n\013description\030\374\207\326\311\001 \001(\tH\000\210\001\001\022\025\n\005range\030" + + "\275\362\3203 \001(\tH\001\210\001\001B\016\n\014_descriptionB\010\n\006_range\"" + + "\263\003\n\024RouterAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210" + + "\001\001\022J\n\005items\030\300\317\367/ \003(\01328.google.cloud.comp" + + "ute.v1.RouterAggregatedList.ItemsEntry\022\024" + + "\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030" + + "\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001" + + "\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337" + + "\226\030 \001(\0132 .google.cloud.compute.v1.Warning" + + "H\004\210\001\001\032X\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\0229\n\005valu" + + "e\030\002 \001(\0132*.google.cloud.compute.v1.Router" + + "sScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next" + + "_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\240\003" + + "\n\tRouterBgp\022\037\n\016advertise_mode\030\273\225\353\224\001 \001(\tH" + + "\000\210\001\001\022\034\n\021advertised_groups\030\266\336\205\n \003(\t\022Q\n\024ad" + + "vertised_ip_ranges\030\314\330\363\020 \003(\01320.google.clo" + + "ud.compute.v1.RouterAdvertisedIpRange\022\022\n" + + "\003asn\030\374\364\005 \001(\rH\001\210\001\001\022#\n\022keepalive_interval\030" + + "\274\345\374\203\001 \001(\rH\002\210\001\001\"M\n\rAdvertiseMode\022\034\n\030UNDEF" + + "INED_ADVERTISE_MODE\020\000\022\016\n\006CUSTOM\020\361\376\245\271\001\022\016\n" + + "\007DEFAULT\020\241\304\3756\"G\n\020AdvertisedGroups\022\037\n\033UND" + + "EFINED_ADVERTISED_GROUPS\020\000\022\022\n\013ALL_SUBNET" + + "S\020\330\217\335\001B\021\n\017_advertise_modeB\006\n\004_asnB\025\n\023_ke" + + "epalive_interval\"\202\n\n\rRouterBgpPeer\022\037\n\016ad" + + "vertise_mode\030\273\225\353\224\001 \001(\tH\000\210\001\001\022\034\n\021advertise" + + "d_groups\030\266\336\205\n \003(\t\022Q\n\024advertised_ip_range" + + "s\030\314\330\363\020 \003(\01320.google.cloud.compute.v1.Rou" + + "terAdvertisedIpRange\022)\n\031advertised_route" + + "_priority\030\274\234\366X \001(\rH\001\210\001\001\022=\n\003bfd\030\240\371\005 \001(\0132)" + + ".google.cloud.compute.v1.RouterBgpPeerBf" + + "dH\002\210\001\001\022\027\n\006enable\030\203\313\324\224\001 \001(\tH\003\210\001\001\022\033\n\013enabl" + + "e_ipv6\030\243\366\303V \001(\010H\004\210\001\001\022\037\n\016interface_name\030\321" + + "\303\344\320\001 \001(\tH\005\210\001\001\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH\006\210" + + "\001\001\022$\n\024ipv6_nexthop_address\030\323\205\253\r \001(\tH\007\210\001\001" + + "\022\037\n\017management_type\030\266\203\352R \001(\tH\010\210\001\001\022,\n\033md5" + + "_authentication_key_name\030\221\275\203\206\001 \001(\tH\t\210\001\001\022" + + "\024\n\004name\030\213\365\315\001 \001(\tH\n\210\001\001\022\030\n\010peer_asn\030\237\264\226! \001" + + "(\rH\013\210\001\001\022\037\n\017peer_ip_address\030\331\227\207c \001(\tH\014\210\001\001" + + "\022*\n\031peer_ipv6_nexthop_address\030\220\373\255\352\001 \001(\tH" + + "\r\210\001\001\022*\n\031router_appliance_instance\030\235\307\247\337\001 " + + "\001(\tH\016\210\001\001\"M\n\rAdvertiseMode\022\034\n\030UNDEFINED_A" + + "DVERTISE_MODE\020\000\022\016\n\006CUSTOM\020\361\376\245\271\001\022\016\n\007DEFAU" + + "LT\020\241\304\3756\"G\n\020AdvertisedGroups\022\037\n\033UNDEFINED" + + "_ADVERTISED_GROUPS\020\000\022\022\n\013ALL_SUBNETS\020\330\217\335\001" + + "\"9\n\006Enable\022\024\n\020UNDEFINED_ENABLE\020\000\022\014\n\005FALS" + + "E\020\203\302\344\037\022\013\n\004TRUE\020\216\333\235\001\"g\n\016ManagementType\022\035\n" + + "\031UNDEFINED_MANAGEMENT_TYPE\020\000\022\035\n\025MANAGED_" + + "BY_ATTACHMENT\020\313\322\352\332\001\022\027\n\017MANAGED_BY_USER\020\363" + + "\213\246\227\001B\021\n\017_advertise_modeB\034\n\032_advertised_r" + + "oute_priorityB\006\n\004_bfdB\t\n\007_enableB\016\n\014_ena" + + "ble_ipv6B\021\n\017_interface_nameB\r\n\013_ip_addre" + + "ssB\027\n\025_ipv6_nexthop_addressB\022\n\020_manageme" + + "nt_typeB\036\n\034_md5_authentication_key_nameB" + + "\007\n\005_nameB\013\n\t_peer_asnB\022\n\020_peer_ip_addres" + + "sB\034\n\032_peer_ipv6_nexthop_addressB\034\n\032_rout" + + "er_appliance_instance\"\206\003\n\020RouterBgpPeerB" + + "fd\022$\n\024min_receive_interval\030\356\271\224Y \001(\rH\000\210\001\001" + + "\022&\n\025min_transmit_interval\030\307\321\302\371\001 \001(\rH\001\210\001\001" + + "\022\032\n\nmultiplier\030\301\373\235[ \001(\rH\002\210\001\001\022+\n\033session_" + + "initialization_mode\030\271\215\3032 \001(\tH\003\210\001\001\"y\n\031Ses" + + "sionInitializationMode\022)\n%UNDEFINED_SESS" + + "ION_INITIALIZATION_MODE\020\000\022\016\n\006ACTIVE\020\206\346\211\226" + + "\001\022\020\n\010DISABLED\020\374\324\260\366\001\022\017\n\007PASSIVE\020\207\366\327\334\001B\027\n\025" + + "_min_receive_intervalB\030\n\026_min_transmit_i" + + "ntervalB\r\n\013_multiplierB\036\n\034_session_initi" + + "alization_mode\"\250\004\n\017RouterInterface\022\030\n\010ip" + + "_range\030\245\340\227E \001(\tH\000\210\001\001\022/\n\036linked_interconn" + + "ect_attachment\030\316\352\367\356\001 \001(\tH\001\210\001\001\022\"\n\021linked_" + + "vpn_tunnel\030\371\277\376\247\001 \001(\tH\002\210\001\001\022\037\n\017management_" + + "type\030\266\203\352R \001(\tH\003\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\004\210\001\001" + + "\022\"\n\022private_ip_address\030\230\322\2130 \001(\tH\005\210\001\001\022$\n\023" + + "redundant_interface\030\347\350\274\371\001 \001(\tH\006\210\001\001\022\033\n\nsu" + + "bnetwork\030\356\247\344\222\001 \001(\tH\007\210\001\001\"g\n\016ManagementTyp" + + "e\022\035\n\031UNDEFINED_MANAGEMENT_TYPE\020\000\022\035\n\025MANA" + + "GED_BY_ATTACHMENT\020\313\322\352\332\001\022\027\n\017MANAGED_BY_US" + + "ER\020\363\213\246\227\001B\013\n\t_ip_rangeB!\n\037_linked_interco" + + "nnect_attachmentB\024\n\022_linked_vpn_tunnelB\022" + + "\n\020_management_typeB\007\n\005_nameB\025\n\023_private_" + + "ip_addressB\026\n\024_redundant_interfaceB\r\n\013_s" + + "ubnetwork\"\235\002\n\nRouterList\022\020\n\002id\030\233\032 \001(\tH\000\210" + + "\001\001\0221\n\005items\030\300\317\367/ \003(\0132\037.google.cloud.comp" + + "ute.v1.Router\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017n" + "ext_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_lin" - + "k\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(" - + "\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.com" - + "pute.v1.WarningH\004\210\001\001\032c\n\nItemsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022D\n\005value\030\002 \001(\01325.google.cloud.co" - + "mpute.v1.ServiceAttachmentsScopedList:\0028" - + "\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n" - + "\n_self_linkB\n\n\010_warning\"\277\002\n\"ServiceAttac" - + "hmentConnectedEndpoint\022\030\n\010endpoint\030\225\273\234> " - + "\001(\tH\000\210\001\001\022\"\n\021psc_connection_id\030\335\245\243\213\001 \001(\004H" - + "\001\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\002\210\001\001\"\224\001\n\006Status\022" - + "\024\n\020UNDEFINED_STATUS\020\000\022\017\n\010ACCEPTED\020\247\237\322u\022\016" - + "\n\006CLOSED\020\354\252\243\265\001\022\027\n\017NEEDS_ATTENTION\020\274\213\242\244\001\022" - + "\016\n\007PENDING\020\367\252\360\020\022\017\n\010REJECTED\020\376\210\204S\022\031\n\022STAT" - + "US_UNSPECIFIED\020\312\314\213\024B\013\n\t_endpointB\024\n\022_psc" - + "_connection_idB\t\n\007_status\"\305\001\n%ServiceAtt" - + "achmentConsumerProjectLimit\022 \n\020connectio" - + "n_limit\030\232\236\324> \001(\rH\000\210\001\001\022\033\n\013network_url\030\336\217\346" - + "b \001(\tH\001\210\001\001\022\"\n\021project_id_or_num\030\250\212\345\246\001 \001(" - + "\tH\002\210\001\001B\023\n\021_connection_limitB\016\n\014_network_" - + "urlB\024\n\022_project_id_or_num\"\263\002\n\025ServiceAtt" - + "achmentList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022<\n\005items\030\300" - + "\317\367/ \003(\0132*.google.cloud.compute.v1.Servic" - + "eAttachment\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017nex" - + "t_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030" - + "\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .goo" - + "gle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_id" - + "B\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_l" - + "inkB\n\n\010_warning\"\262\001\n\034ServiceAttachmentsSc" - + "opedList\022K\n\023service_attachments\030\246\222\272\222\001 \003(" - + "\0132*.google.cloud.compute.v1.ServiceAttac" - + "hment\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud" - + ".compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\246\002\n" - + "&SetBackendServiceTargetSslProxyRequest\022" - + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" - + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\212\001\n7target_ssl_pr" - + "oxies_set_backend_service_request_resour" - + "ce\030\244\351\250B \001(\0132A.google.cloud.compute.v1.Ta" - + "rgetSslProxiesSetBackendServiceRequestB\003" - + "\340A\002\022!\n\020target_ssl_proxy\030\315\272\306\241\001 \001(\tB\003\340A\002B\r" - + "\n\013_request_id\"\247\002\n&SetBackendServiceTarge" - + "tTcpProxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022" - + "\213\001\n7target_tcp_proxies_set_backend_servi" - + "ce_request_resource\030\357\321\302\202\001 \001(\0132A.google.c" - + "loud.compute.v1.TargetTcpProxiesSetBacke" - + "ndServiceRequestB\003\340A\002\022!\n\020target_tcp_prox" - + "y\030\342\326\360\357\001 \001(\tB\003\340A\002B\r\n\013_request_id\"\261\002\n\032SetB" - + "ackupTargetPoolRequest\022\036\n\016failover_ratio" - + "\030\376\224\264e \001(\002H\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" - + "G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006regi" - + "on\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\033\n\013target" - + "_pool\030\212\344\370\035 \001(\tB\003\340A\002\022T\n\031target_reference_" - + "resource\030\360\267\335\371\001 \001(\0132(.google.cloud.comput" - + "e.v1.TargetReferenceB\003\340A\002B\021\n\017_failover_r" - + "atioB\r\n\013_request_id\"\256\002\n(SetCertificateMa" - + "pTargetHttpsProxyRequest\022!\n\007project\030\231\226\301l" - + " \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001" - + "(\tH\000\210\001\001\022\217\001\n9target_https_proxies_set_cer" - + "tificate_map_request_resource\030\273\266\376\336\001 \001(\0132" - + "C.google.cloud.compute.v1.TargetHttpsPro" - + "xiesSetCertificateMapRequestB\003\340A\002\022\"\n\022tar" - + "get_https_proxy\030\354\260\372\030 \001(\tB\003\340A\002B\r\n\013_reques" - + "t_id\"\247\002\n&SetCertificateMapTargetSslProxy" - + "Request\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proje" - + "ct\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\213\001\n7targe" - + "t_ssl_proxies_set_certificate_map_reques" - + "t_resource\030\272\226\203\244\001 \001(\0132A.google.cloud.comp" - + "ute.v1.TargetSslProxiesSetCertificateMap" - + "RequestB\003\340A\002\022!\n\020target_ssl_proxy\030\315\272\306\241\001 \001" - + "(\tB\003\340A\002B\r\n\013_request_id\"\276\001\n\'SetCommonInst" - + "anceMetadataProjectRequest\022E\n\021metadata_r" - + "esource\030\236\276\346\212\001 \001(\0132!.google.cloud.compute" - + ".v1.MetadataB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340" - + "A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001" - + "B\r\n\013_request_id\"\367\001\n#SetDefaultNetworkTie" - + "rProjectRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" - + "\362G\007project\022\201\001\n2projects_set_default_netw" - + "ork_tier_request_resource\030\212\300\243< \001(\0132=.goo" - + "gle.cloud.compute.v1.ProjectsSetDefaultN" - + "etworkTierRequestB\003\340A\002\022\032\n\nrequest_id\030\313\201\331" - + "\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\351\001\n$SetDeletio" - + "nProtectionInstanceRequest\022$\n\023deletion_p" - + "rotection\030\352\377\262\332\001 \001(\010H\000\210\001\001\022!\n\007project\030\231\226\301l" - + " \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001" - + "(\tH\001\210\001\001\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022\033\n\004zon" - + "e\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\026\n\024_deletion_prot" - + "ectionB\r\n\013_request_id\"\342\001\n SetDiskAutoDel" - + "eteInstanceRequest\022\034\n\013auto_delete\030\273\344\316\335\001 " - + "\001(\010B\003\340A\002\022\033\n\013device_name\030\324\265\232 \001(\tB\003\340A\002\022\030\n" - + "\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l " - + "\001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_" - + "request_id\"\377\001\n)SetEdgeSecurityPolicyBack" - + "endBucketRequest\022\036\n\016backend_bucket\030\365\343\335+ " - + "\001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" - + "ect\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022d\n\"secur" - + "ity_policy_reference_resource\030\360\264\253a \001(\01320" + + "k\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .g" + + "oogle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_" + + "idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self" + + "_linkB\n\n\010_warning\"W\n\032RouterMd5Authentica" + + "tionKey\022\022\n\003key\030\337\274\006 \001(\tH\000\210\001\001\022\024\n\004name\030\213\365\315\001" + + " \001(\tH\001\210\001\001B\006\n\004_keyB\007\n\005_name\"\222\014\n\tRouterNat" + + "\022\031\n\rdrain_nat_ips\030\307\301\256\360\001 \003(\t\022/\n\036enable_dy" + + "namic_port_allocation\030\242\231\335\375\001 \001(\010H\000\210\001\001\0223\n#" + + "enable_endpoint_independent_mapping\030\233\211\333{" + + " \001(\010H\001\210\001\001\022\032\n\016endpoint_types\030\317\252\326\357\001 \003(\t\022%\n" + + "\025icmp_idle_timeout_sec\030\312\320\336\001 \001(\005H\002\210\001\001\022H\n\n" + + "log_config\030\235\321\301\247\001 \001(\0132+.google.cloud.comp" + + "ute.v1.RouterNatLogConfigH\003\210\001\001\022 \n\020max_po" + + "rts_per_vm\030\341\311\236w \001(\005H\004\210\001\001\022 \n\020min_ports_pe" + + "r_vm\030\263\255\344X \001(\005H\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001" + + "\022\'\n\026nat_ip_allocate_option\030\375\270\364\314\001 \001(\tH\007\210\001" + + "\001\022\022\n\007nat_ips\030\216\360\2138 \003(\t\0228\n\005rules\030\367\221\3653 \003(\0132" + + "&.google.cloud.compute.v1.RouterNatRule\022" + + "2\n\"source_subnetwork_ip_ranges_to_nat\030\333\357" + + "\241x \001(\tH\010\210\001\001\022J\n\013subnetworks\030\305\324\245\306\001 \003(\01321.g" + + "oogle.cloud.compute.v1.RouterNatSubnetwo" + + "rkToNat\0220\n tcp_established_idle_timeout_" + + "sec\030\355\353\260j \001(\005H\t\210\001\001\022*\n\031tcp_time_wait_timeo" + + "ut_sec\030\375\273\363\364\001 \001(\005H\n\210\001\001\022/\n\037tcp_transitory_" + + "idle_timeout_sec\030\246\373\341a \001(\005H\013\210\001\001\022$\n\024udp_id" + + "le_timeout_sec\030\306\262\372\036 \001(\005H\014\210\001\001\"`\n\rEndpoint" + + "Types\022\034\n\030UNDEFINED_ENDPOINT_TYPES\020\000\022\030\n\021E" + + "NDPOINT_TYPE_SWG\020\310\316\375K\022\027\n\020ENDPOINT_TYPE_V" + + "M\020\262\352\234\033\"a\n\023NatIpAllocateOption\022$\n UNDEFIN" + + "ED_NAT_IP_ALLOCATE_OPTION\020\000\022\020\n\tAUTO_ONLY" + + "\020\274\340\370V\022\022\n\013MANUAL_ONLY\020\205\301\311|\"\302\001\n\035SourceSubn" + + "etworkIpRangesToNat\0220\n,UNDEFINED_SOURCE_" + + "SUBNETWORK_IP_RANGES_TO_NAT\020\000\022$\n\035ALL_SUB" + + "NETWORKS_ALL_IP_RANGES\020\330\223\350U\022,\n%ALL_SUBNE" + + "TWORKS_ALL_PRIMARY_IP_RANGES\020\273\303\276X\022\033\n\023LIS" + + "T_OF_SUBNETWORKS\020\376\242\344\366\001B!\n\037_enable_dynami" + + "c_port_allocationB&\n$_enable_endpoint_in" + + "dependent_mappingB\030\n\026_icmp_idle_timeout_" + + "secB\r\n\013_log_configB\023\n\021_max_ports_per_vmB" + + "\023\n\021_min_ports_per_vmB\007\n\005_nameB\031\n\027_nat_ip" + + "_allocate_optionB%\n#_source_subnetwork_i" + + "p_ranges_to_natB#\n!_tcp_established_idle" + + "_timeout_secB\034\n\032_tcp_time_wait_timeout_s" + + "ecB\"\n _tcp_transitory_idle_timeout_secB\027" + + "\n\025_udp_idle_timeout_sec\"\267\001\n\022RouterNatLog" + + "Config\022\027\n\006enable\030\203\313\324\224\001 \001(\010H\000\210\001\001\022\027\n\006filte" + + "r\030\370\226\243\240\001 \001(\tH\001\210\001\001\"Y\n\006Filter\022\024\n\020UNDEFINED_" + + "FILTER\020\000\022\t\n\003ALL\020\201\373\003\022\023\n\013ERRORS_ONLY\020\200\260\317\222\001" + + "\022\031\n\021TRANSLATIONS_ONLY\020\351\303\252\252\001B\t\n\007_enableB\t" + + "\n\007_filter\"\335\001\n\rRouterNatRule\022D\n\006action\030\266\374" + + "\275Y \001(\0132,.google.cloud.compute.v1.RouterN" + + "atRuleActionH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001" + + "(\tH\001\210\001\001\022\025\n\005match\030\305\263\2671 \001(\tH\002\210\001\001\022\034\n\013rule_n" + + "umber\030\354\333\232\377\001 \001(\rH\003\210\001\001B\t\n\007_actionB\016\n\014_desc" + + "riptionB\010\n\006_matchB\016\n\014_rule_number\"Y\n\023Rou" + + "terNatRuleAction\022 \n\025source_nat_active_ip" + + "s\030\365\273\250d \003(\t\022 \n\024source_nat_drain_ips\030\243\305\301\242\001" + + " \003(\t\"\226\002\n\030RouterNatSubnetworkToNat\022\024\n\004nam" + + "e\030\213\365\315\001 \001(\tH\000\210\001\001\022#\n\030secondary_ip_range_na" + + "mes\030\331\301\204~ \003(\t\022#\n\027source_ip_ranges_to_nat\030" + + "\362\312\224\271\001 \003(\t\"\220\001\n\023SourceIpRangesToNat\022%\n!UND" + + "EFINED_SOURCE_IP_RANGES_TO_NAT\020\000\022\024\n\rALL_" + + "IP_RANGES\020\260\257\375\020\022\"\n\033LIST_OF_SECONDARY_IP_R" + + "ANGES\020\234\264\330[\022\030\n\020PRIMARY_IP_RANGE\020\302\223\326\215\001B\007\n\005" + + "_name\"\306\002\n\014RouterStatus\0227\n\013best_routes\030\205\254" + + "\337\274\001 \003(\0132\036.google.cloud.compute.v1.Route\022" + + "A\n\026best_routes_for_router\030\371\373\3668 \003(\0132\036.goo" + + "gle.cloud.compute.v1.Route\022N\n\017bgp_peer_s" + + "tatus\030\373\327\225h \003(\01322.google.cloud.compute.v1" + + ".RouterStatusBgpPeerStatus\022E\n\nnat_status" + + "\030\320\231\213\036 \003(\0132..google.cloud.compute.v1.Rout" + + "erStatusNatStatus\022\027\n\007network\030\256\264\205o \001(\tH\000\210" + + "\001\001B\n\n\010_network\"\334\010\n\031RouterStatusBgpPeerSt" + + "atus\022=\n\021advertised_routes\030\254\331\374\236\001 \003(\0132\036.go" + + "ogle.cloud.compute.v1.Route\022?\n\nbfd_statu" + + "s\030\361\270\323\274\001 \001(\0132\".google.cloud.compute.v1.Bf" + + "dStatusH\000\210\001\001\022\033\n\013enable_ipv6\030\243\366\303V \001(\010H\001\210\001" + + "\001\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH\002\210\001\001\022$\n\024ipv6_n" + + "exthop_address\030\323\205\253\r \001(\tH\003\210\001\001\022\"\n\021linked_v" + + "pn_tunnel\030\371\277\376\247\001 \001(\tH\004\210\001\001\022!\n\020md5_auth_ena" + + "bled\030\313\221\220\327\001 \001(\010H\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001" + + "\001\022\"\n\022num_learned_routes\030\377\325\313@ \001(\rH\007\210\001\001\022\037\n" + + "\017peer_ip_address\030\331\227\207c \001(\tH\010\210\001\001\022*\n\031peer_i" + + "pv6_nexthop_address\030\220\373\255\352\001 \001(\tH\t\210\001\001\022*\n\031ro" + + "uter_appliance_instance\030\235\307\247\337\001 \001(\tH\n\210\001\001\022\025" + + "\n\005state\030\221\211\2534 \001(\tH\013\210\001\001\022\026\n\006status\030\362\237\267V \001(\t" + + "H\014\210\001\001\022\036\n\rstatus_reason\030\261\226\265\243\001 \001(\tH\r\210\001\001\022\026\n" + + "\006uptime\030\350\267\236p \001(\tH\016\210\001\001\022\036\n\016uptime_seconds\030" + + "\250\312\3701 \001(\tH\017\210\001\001\"E\n\006Status\022\024\n\020UNDEFINED_STA" + + "TUS\020\000\022\013\n\004DOWN\020\242\271\200\001\022\017\n\007UNKNOWN\020\252\360\304\316\001\022\007\n\002U" + + "P\020\233\025\"p\n\014StatusReason\022\033\n\027UNDEFINED_STATUS" + + "_REASON\020\000\022 \n\031MD5_AUTH_INTERNAL_PROBLEM\020\263" + + "\221\375B\022!\n\031STATUS_REASON_UNSPECIFIED\020\211\216\204\274\001B\r" + + "\n\013_bfd_statusB\016\n\014_enable_ipv6B\r\n\013_ip_add" + + "ressB\027\n\025_ipv6_nexthop_addressB\024\n\022_linked" + + "_vpn_tunnelB\023\n\021_md5_auth_enabledB\007\n\005_nam" + + "eB\025\n\023_num_learned_routesB\022\n\020_peer_ip_add" + + "ressB\034\n\032_peer_ipv6_nexthop_addressB\034\n\032_r" + + "outer_appliance_instanceB\010\n\006_stateB\t\n\007_s" + + "tatusB\020\n\016_status_reasonB\t\n\007_uptimeB\021\n\017_u" + + "ptime_seconds\"\367\003\n\025RouterStatusNatStatus\022" + + "\"\n\026auto_allocated_nat_ips\030\206\264\310\363\001 \003(\t\022(\n\034d" + + "rain_auto_allocated_nat_ips\030\255\220\267\223\001 \003(\t\022(\n" + + "\034drain_user_allocated_nat_ips\030\311\216\310\221\001 \003(\t\022" + + ")\n\030min_extra_nat_ips_needed\030\342\351\265\256\001 \001(\005H\000\210" + + "\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\001\210\001\001\0223\n\"num_vm_endpo" + + "ints_with_nat_mappings\030\354\266\250\364\001 \001(\005H\002\210\001\001\022S\n" + + "\013rule_status\030\225\305\356B \003(\0132;.google.cloud.com" + + "pute.v1.RouterStatusNatStatusNatRuleStat" + + "us\022*\n\037user_allocated_nat_ip_resources\030\327\351" + + "\272e \003(\t\022\"\n\026user_allocated_nat_ips\030\242\262\331\361\001 \003" + + "(\tB\033\n\031_min_extra_nat_ips_neededB\007\n\005_name" + + "B%\n#_num_vm_endpoints_with_nat_mappings\"" + + "\244\002\n\"RouterStatusNatStatusNatRuleStatus\022\031" + + "\n\016active_nat_ips\030\325\357\266c \003(\t\022\031\n\rdrain_nat_i" + + "ps\030\307\301\256\360\001 \003(\t\022%\n\024min_extra_ips_needed\030\204\312\251" + + "\250\001 \001(\005H\000\210\001\001\0223\n\"num_vm_endpoints_with_nat" + + "_mappings\030\354\266\250\364\001 \001(\005H\001\210\001\001\022\034\n\013rule_number\030" + + "\354\333\232\377\001 \001(\005H\002\210\001\001B\027\n\025_min_extra_ips_neededB" + + "%\n#_num_vm_endpoints_with_nat_mappingsB\016" + + "\n\014_rule_number\"\177\n\024RouterStatusResponse\022\024" + + "\n\004kind\030\224\367\310\001 \001(\tH\000\210\001\001\022=\n\006result\030\235\220\267B \001(\0132" + + "%.google.cloud.compute.v1.RouterStatusH\001" + + "\210\001\001B\007\n\005_kindB\t\n\007_result\"`\n\026RoutersPrevie" + + "wResponse\0229\n\010resource\030\216\210\257] \001(\0132\037.google." + + "cloud.compute.v1.RouterH\000\210\001\001B\013\n\t_resourc" + + "e\"\220\001\n\021RoutersScopedList\0224\n\007routers\030\312\244\335\224\001" + + " \003(\0132\037.google.cloud.compute.v1.Router\0229\n" + + "\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compute" + + ".v1.WarningH\000\210\001\001B\n\n\010_warning\"\220\003\n\004Rule\022\026\n" + + "\006action\030\266\374\275Y \001(\tH\000\210\001\001\0229\n\nconditions\030\270\355\220D" + + " \003(\0132\".google.cloud.compute.v1.Condition" + + "\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\r\n\003ins\030\356\257" + + "\006 \003(\t\022:\n\013log_configs\030\366\326\362H \003(\0132\".google.c" + + "loud.compute.v1.LogConfig\022\023\n\007not_ins\030\202\241\233" + + "\367\001 \003(\t\022\026\n\013permissions\030\204\351\313\034 \003(\t\"\203\001\n\006Actio" + + "n\022\024\n\020UNDEFINED_ACTION\020\000\022\014\n\005ALLOW\020\251\326\336\035\022\025\n" + + "\016ALLOW_WITH_LOG\020\201\341\240$\022\n\n\004DENY\020\214\354\177\022\025\n\rDENY" + + "_WITH_LOG\020\376\351\311\247\001\022\t\n\003LOG\020\244\316\004\022\020\n\tNO_ACTION\020" + + "\364\264\244|B\t\n\007_actionB\016\n\014_description\"\330\003\n\016SSLH" + + "ealthCheck\022\024\n\004port\030\201\261\322\001 \001(\005H\000\210\001\001\022\031\n\tport" + + "_name\030\211\207\347\023 \001(\tH\001\210\001\001\022\"\n\022port_specificatio" + + "n\030\305\353\314\030 \001(\tH\002\210\001\001\022\034\n\014proxy_header\030\376\272\274L \001(\t" + + "H\003\210\001\001\022\027\n\007request\030\217\345\273\n \001(\tH\004\210\001\001\022\030\n\010respon" + + "se\030\301\250\334] \001(\tH\005\210\001\001\"~\n\021PortSpecification\022 \n" + + "\034UNDEFINED_PORT_SPECIFICATION\020\000\022\025\n\016USE_F" + + "IXED_PORT\020\344\210\333Z\022\026\n\016USE_NAMED_PORT\020\277\317\307\246\001\022\030" + + "\n\020USE_SERVING_PORT\020\314\321\365\254\001\"H\n\013ProxyHeader\022" + + "\032\n\026UNDEFINED_PROXY_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001" + + "\022\020\n\010PROXY_V1\020\254\244\267\237\001B\007\n\005_portB\014\n\n_port_nam" + + "eB\025\n\023_port_specificationB\017\n\r_proxy_heade" + + "rB\n\n\010_requestB\013\n\t_response\"\217\010\n\021SavedAtta" + + "chedDisk\022\034\n\013auto_delete\030\273\344\316\335\001 \001(\010H\000\210\001\001\022\024" + + "\n\004boot\030\362\365\270\001 \001(\010H\001\210\001\001\022\033\n\013device_name\030\324\265\232 " + + " \001(\tH\002\210\001\001\022T\n\023disk_encryption_key\030\205\355\304\201\001 \001" + + "(\0132..google.cloud.compute.v1.CustomerEnc" + + "ryptionKeyH\003\210\001\001\022\035\n\014disk_size_gb\030\267\232\347\226\001 \001(" + + "\003H\004\210\001\001\022\031\n\tdisk_type\030\234\351\254, \001(\tH\005\210\001\001\022E\n\021gue" + + "st_os_features\030\321\340\347% \003(\0132\'.google.cloud.c" + + "ompute.v1.GuestOsFeature\022\025\n\005index\030\322\321\354/ \001" + + "(\005H\006\210\001\001\022\032\n\tinterface\030\271\332\325\357\001 \001(\tH\007\210\001\001\022\024\n\004k" + + "ind\030\224\367\310\001 \001(\tH\010\210\001\001\022\024\n\010licenses\030\322\210\200\241\001 \003(\t\022" + + "\024\n\004mode\030\243\363\314\001 \001(\tH\t\210\001\001\022\026\n\006source\030\233\320\301T \001(\t" + + "H\n\210\001\001\022\036\n\rstorage_bytes\030\247\273\275\312\001 \001(\003H\013\210\001\001\022%\n" + + "\024storage_bytes_status\030\212\253\200\352\001 \001(\tH\014\210\001\001\022\024\n\004" + + "type\030\272\236\332\001 \001(\tH\r\210\001\001\">\n\tInterface\022\027\n\023UNDEF" + + "INED_INTERFACE\020\000\022\013\n\004NVME\020\340\202\223\001\022\013\n\004SCSI\020\246\201" + + "\233\001\"?\n\004Mode\022\022\n\016UNDEFINED_MODE\020\000\022\020\n\tREAD_O" + + "NLY\020\265\231\354+\022\021\n\nREAD_WRITE\020\326\227\344R\"]\n\022StorageBy" + + "tesStatus\022\"\n\036UNDEFINED_STORAGE_BYTES_STA" + + "TUS\020\000\022\020\n\010UPDATING\020\306\356\354\353\001\022\021\n\nUP_TO_DATE\020\316\242" + + "\2470\"?\n\004Type\022\022\n\016UNDEFINED_TYPE\020\000\022\022\n\nPERSIS" + + "TENT\020\227\365\325\333\001\022\017\n\007SCRATCH\020\332\375\360\354\001B\016\n\014_auto_del" + + "eteB\007\n\005_bootB\016\n\014_device_nameB\026\n\024_disk_en" + + "cryption_keyB\017\n\r_disk_size_gbB\014\n\n_disk_t" + + "ypeB\010\n\006_indexB\014\n\n_interfaceB\007\n\005_kindB\007\n\005" + + "_modeB\t\n\007_sourceB\020\n\016_storage_bytesB\027\n\025_s" + + "torage_bytes_statusB\007\n\005_type\"\305\003\n\tSavedDi" + + "sk\022\035\n\014architecture\030\323\322\261\220\001 \001(\tH\000\210\001\001\022\024\n\004kin" + + "d\030\224\367\310\001 \001(\tH\001\210\001\001\022\034\n\013source_disk\030\301\356\264\327\001 \001(\t" + + "H\002\210\001\001\022\036\n\rstorage_bytes\030\247\273\275\312\001 \001(\003H\003\210\001\001\022%\n" + + "\024storage_bytes_status\030\212\253\200\352\001 \001(\tH\004\210\001\001\"j\n\014" + + "Architecture\022\032\n\026UNDEFINED_ARCHITECTURE\020\000" + + "\022 \n\030ARCHITECTURE_UNSPECIFIED\020\253\324\235\274\001\022\014\n\005AR" + + "M64\020\372\313\351\035\022\016\n\006X86_64\020\307\244\346\312\001\"]\n\022StorageBytes" + + "Status\022\"\n\036UNDEFINED_STORAGE_BYTES_STATUS" + + "\020\000\022\020\n\010UPDATING\020\306\356\354\353\001\022\021\n\nUP_TO_DATE\020\316\242\2470B" + + "\017\n\r_architectureB\007\n\005_kindB\016\n\014_source_dis" + + "kB\020\n\016_storage_bytesB\027\n\025_storage_bytes_st" + + "atus\"\201\002\n\025ScalingScheduleStatus\022\037\n\017last_s" + + "tart_time\030\323\273\274\020 \001(\tH\000\210\001\001\022\037\n\017next_start_ti" + + "me\030\326\362\260. \001(\tH\001\210\001\001\022\025\n\005state\030\221\211\2534 \001(\tH\002\210\001\001\"" + + "]\n\005State\022\023\n\017UNDEFINED_STATE\020\000\022\016\n\006ACTIVE\020" + + "\206\346\211\226\001\022\020\n\010DISABLED\020\374\324\260\366\001\022\017\n\010OBSOLETE\020\231\353\334\037" + + "\022\014\n\005READY\020\203\303\217%B\022\n\020_last_start_timeB\022\n\020_n" + + "ext_start_timeB\010\n\006_state\"\261\006\n\nScheduling\022" + + "\"\n\021automatic_restart\030\373\267\244\247\001 \001(\010H\000\210\001\001\022+\n\033i" + + "nstance_termination_action\030\273\377\2313 \001(\tH\001\210\001\001" + + "\022\036\n\rlocation_hint\030\321\201\222\247\001 \001(\tH\002\210\001\001\022\036\n\rmin_" + + "node_cpus\030\273\244\242\227\001 \001(\005H\003\210\001\001\022L\n\017node_affinit" + + "ies\030\243\204\232\334\001 \003(\0132/.google.cloud.compute.v1." + + "SchedulingNodeAffinity\022#\n\023on_host_mainte" + + "nance\030\334\362\347\036 \001(\tH\004\210\001\001\022\034\n\013preemptible\030\241\345\313\232\001" + + " \001(\010H\005\210\001\001\022!\n\022provisioning_model\030\327\226\036 \001(\tH" + + "\006\210\001\001\"\223\001\n\031InstanceTerminationAction\022)\n%UN" + + "DEFINED_INSTANCE_TERMINATION_ACTION\020\000\022\016\n" + + "\006DELETE\020\253\363\345\277\001\022.\n\'INSTANCE_TERMINATION_AC" + + "TION_UNSPECIFIED\020\263\301\251,\022\013\n\004STOP\020\202\200\234\001\"Y\n\021On" + + "HostMaintenance\022!\n\035UNDEFINED_ON_HOST_MAI" + + "NTENANCE\020\000\022\016\n\007MIGRATE\020\213\303\201O\022\021\n\tTERMINATE\020" + + "\301\234\313\373\001\"T\n\021ProvisioningModel\022 \n\034UNDEFINED_" + + "PROVISIONING_MODEL\020\000\022\013\n\004SPOT\020\202\342\233\001\022\020\n\010STA" + + "NDARD\020\275\235\214\347\001B\024\n\022_automatic_restartB\036\n\034_in" + + "stance_termination_actionB\020\n\016_location_h" + + "intB\020\n\016_min_node_cpusB\026\n\024_on_host_mainte" + + "nanceB\016\n\014_preemptibleB\025\n\023_provisioning_m" + + "odel\"\307\001\n\026SchedulingNodeAffinity\022\022\n\003key\030\337" + + "\274\006 \001(\tH\000\210\001\001\022\030\n\010operator\030\244\321\250\021 \001(\tH\001\210\001\001\022\021\n" + + "\006values\030\242\272\226w \003(\t\"W\n\010Operator\022\026\n\022UNDEFINE" + + "D_OPERATOR\020\000\022\007\n\002IN\020\245\022\022\r\n\006NOT_IN\020\261\274\353L\022\033\n\024" + + "OPERATOR_UNSPECIFIED\020\374\377\272=B\006\n\004_keyB\013\n\t_op" + + "erator\"3\n\014ScratchDisks\022\027\n\007disk_gb\030\275\305\212\035 \001" + + "(\005H\000\210\001\001B\n\n\010_disk_gb\"S\n\nScreenshot\022\031\n\010con" + + "tents\030\232\266\275\361\001 \001(\tH\000\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210" + + "\001\001B\013\n\t_contentsB\007\n\005_kind\"\357\003\n\036SecurityPol" + + "iciesAggregatedList\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001" + + "\001\022\020\n\002id\030\233\032 \001(\tH\001\210\001\001\022T\n\005items\030\300\317\367/ \003(\0132B." + + "google.cloud.compute.v1.SecurityPolicies" + + "AggregatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001" + + "(\tH\002\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\003\210\001\001" + + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\004\210\001\001\022\027\n\014unreacha" + + "bles\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .goog" + + "le.cloud.compute.v1.WarningH\005\210\001\001\032a\n\nItem" + + "sEntry\022\013\n\003key\030\001 \001(\t\022B\n\005value\030\002 \001(\01323.goo" + + "gle.cloud.compute.v1.SecurityPoliciesSco" + + "pedList:\0028\001B\007\n\005_etagB\005\n\003_idB\007\n\005_kindB\022\n\020" + + "_next_page_tokenB\014\n\n_self_linkB\n\n\010_warni" + + "ng\"\277\001\n7SecurityPoliciesListPreconfigured" + + "ExpressionSetsResponse\022b\n\035preconfigured_" + + "expression_sets\030\372\214\327\377\001 \001(\01322.google.cloud" + + ".compute.v1.SecurityPoliciesWafConfigH\000\210" + + "\001\001B \n\036_preconfigured_expression_sets\"\252\001\n" + + "\032SecurityPoliciesScopedList\022E\n\021security_" + + "policies\030\357\246\367< \003(\0132\'.google.cloud.compute" + + ".v1.SecurityPolicy\0229\n\007warning\030\234\337\226\030 \001(\0132 " + + ".google.cloud.compute.v1.WarningH\000\210\001\001B\n\n" + + "\010_warning\"r\n\031SecurityPoliciesWafConfig\022G" + + "\n\twaf_rules\030\324\303\333# \001(\0132,.google.cloud.comp" + + "ute.v1.PreconfiguredWafSetH\000\210\001\001B\014\n\n_waf_" + + "rules\"\245\010\n\016SecurityPolicy\022k\n\032adaptive_pro" + + "tection_config\030\337\373\321G \001(\0132?.google.cloud.c" + + "ompute.v1.SecurityPolicyAdaptiveProtecti" + + "onConfigH\000\210\001\001\022f\n\027advanced_options_config" + + "\030\300\323\235\326\001 \001(\0132<.google.cloud.compute.v1.Sec" + + "urityPolicyAdvancedOptionsConfigH\001\210\001\001\022\"\n" + + "\022creation_timestamp\030\266\217\307\016 \001(\tH\002\210\001\001\022c\n\026ddo" + + "s_protection_config\030\315\204\377\027 \001(\0132;.google.cl" + + "oud.compute.v1.SecurityPolicyDdosProtect" + + "ionConfigH\003\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH" + + "\004\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\005\210\001\001\022\020\n\002id\030" + + "\233\032 \001(\004H\006\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\007\210\001\001\022\024\n\004nam" + + "e\030\213\365\315\001 \001(\tH\010\210\001\001\022h\n\030recaptcha_options_con" + + "fig\030\333\324\275\367\001 \001(\0132=.google.cloud.compute.v1." + + "SecurityPolicyRecaptchaOptionsConfigH\t\210\001" + + "\001\022\026\n\006region\030\364\315\240B \001(\tH\n\210\001\001\022=\n\005rules\030\367\221\3653 " + + "\003(\0132+.google.cloud.compute.v1.SecurityPo" + + "licyRule\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\013\210\001\001\022\024\n\004" + + "type\030\272\236\332\001 \001(\tH\014\210\001\001\"d\n\004Type\022\022\n\016UNDEFINED_" + + "TYPE\020\000\022\022\n\013CLOUD_ARMOR\020\365\234\244|\022\027\n\020CLOUD_ARMO" + + "R_EDGE\020\307\242\307w\022\033\n\023CLOUD_ARMOR_NETWORK\020\304\254\371\350\001" + + "B\035\n\033_adaptive_protection_configB\032\n\030_adva" + + "nced_options_configB\025\n\023_creation_timesta" + + "mpB\031\n\027_ddos_protection_configB\016\n\014_descri" + + "ptionB\016\n\014_fingerprintB\005\n\003_idB\007\n\005_kindB\007\n", + "\005_nameB\033\n\031_recaptcha_options_configB\t\n\007_" + + "regionB\014\n\n_self_linkB\007\n\005_type\"\315\001\n&Securi" + + "tyPolicyAdaptiveProtectionConfig\022\203\001\n\032lay" + + "er7_ddos_defense_config\030\243\331\303\320\001 \001(\0132V.goog" + + "le.cloud.compute.v1.SecurityPolicyAdapti" + + "veProtectionConfigLayer7DdosDefenseConfi" + + "gH\000\210\001\001B\035\n\033_layer7_ddos_defense_config\"\355\001" + + "\n=SecurityPolicyAdaptiveProtectionConfig" + + "Layer7DdosDefenseConfig\022\027\n\006enable\030\203\313\324\224\001 " + + "\001(\010H\000\210\001\001\022 \n\017rule_visibility\030\265\330\220\330\001 \001(\tH\001\210" + + "\001\001\"R\n\016RuleVisibility\022\035\n\031UNDEFINED_RULE_V" + + "ISIBILITY\020\000\022\017\n\007PREMIUM\020\267\264\301\276\001\022\020\n\010STANDARD" + + "\020\275\235\214\347\001B\t\n\007_enableB\022\n\020_rule_visibility\"\233\003" + + "\n#SecurityPolicyAdvancedOptionsConfig\022p\n" + + "\022json_custom_config\030\271\331\2315 \001(\0132L.google.cl" + + "oud.compute.v1.SecurityPolicyAdvancedOpt" + + "ionsConfigJsonCustomConfigH\000\210\001\001\022\035\n\014json_" + + "parsing\030\331\204\332\206\001 \001(\tH\001\210\001\001\022\031\n\tlog_level\030\311\275\204C" + + " \001(\tH\002\210\001\001\"M\n\013JsonParsing\022\032\n\026UNDEFINED_JS" + + "ON_PARSING\020\000\022\020\n\010DISABLED\020\374\324\260\366\001\022\020\n\010STANDA" + + "RD\020\275\235\214\347\001\"C\n\010LogLevel\022\027\n\023UNDEFINED_LOG_LE" + + "VEL\020\000\022\r\n\006NORMAL\020\347\341\346L\022\017\n\007VERBOSE\020\342\212\344\375\001B\025\n" + + "\023_json_custom_configB\017\n\r_json_parsingB\014\n" + + "\n_log_level\"O\n3SecurityPolicyAdvancedOpt" + + "ionsConfigJsonCustomConfig\022\030\n\rcontent_ty" + + "pes\030\263\342\247\010 \003(\t\"\256\001\n\"SecurityPolicyDdosProte" + + "ctionConfig\022 \n\017ddos_protection\030\224\237\233\203\001 \001(\t" + + "H\000\210\001\001\"R\n\016DdosProtection\022\035\n\031UNDEFINED_DDO" + + "S_PROTECTION\020\000\022\017\n\010ADVANCED\020\242\260\265\036\022\020\n\010STAND" + + "ARD\020\275\235\214\347\001B\022\n\020_ddos_protection\"\203\002\n\022Securi" + + "tyPolicyList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0229\n\005items\030" + + "\300\317\367/ \003(\0132\'.google.cloud.compute.v1.Secur" + + "ityPolicy\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_" + + "page_token\030\225\272\206& \001(\tH\002\210\001\001\0229\n\007warning\030\234\337\226\030" + + " \001(\0132 .google.cloud.compute.v1.WarningH\003" + + "\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB" + + "\n\n\010_warning\"`\n$SecurityPolicyRecaptchaOp" + + "tionsConfig\022\"\n\021redirect_site_key\030\352\204\274\325\001 \001" + + "(\tH\000\210\001\001B\024\n\022_redirect_site_key\"N\n\027Securit" + + "yPolicyReference\022\037\n\017security_policy\030\221\206\312Q" + + " \001(\tH\000\210\001\001B\022\n\020_security_policy\"\212\006\n\022Securi" + + "tyPolicyRule\022\026\n\006action\030\266\374\275Y \001(\tH\000\210\001\001\022\034\n\013" + + "description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022[\n\rheader_act" + + "ion\030\250\240\270\234\001 \001(\0132;.google.cloud.compute.v1." + + "SecurityPolicyRuleHttpHeaderActionH\002\210\001\001\022" + + "\024\n\004kind\030\224\367\310\001 \001(\tH\003\210\001\001\022I\n\005match\030\305\263\2671 \001(\0132" + + "2.google.cloud.compute.v1.SecurityPolicy" + + "RuleMatcherH\004\210\001\001\022k\n\030preconfigured_waf_co" + + "nfig\030\343\237\2268 \001(\0132A.google.cloud.compute.v1." + + "SecurityPolicyRulePreconfiguredWafConfig" + + "H\005\210\001\001\022\027\n\007preview\030\310\307\243h \001(\010H\006\210\001\001\022\031\n\010priori" + + "ty\030\244\363\241\324\001 \001(\005H\007\210\001\001\022_\n\022rate_limit_options\030" + + "\373\311\232 \001(\0132;.google.cloud.compute.v1.Secur" + + "ityPolicyRuleRateLimitOptionsH\010\210\001\001\022\\\n\020re" + + "direct_options\030\273\222\356M \001(\0132:.google.cloud.c" + + "ompute.v1.SecurityPolicyRuleRedirectOpti" + + "onsH\t\210\001\001B\t\n\007_actionB\016\n\014_descriptionB\020\n\016_" + + "header_actionB\007\n\005_kindB\010\n\006_matchB\033\n\031_pre" + + "configured_waf_configB\n\n\010_previewB\013\n\t_pr" + + "iorityB\025\n\023_rate_limit_optionsB\023\n\021_redire" + + "ct_options\"\225\001\n\"SecurityPolicyRuleHttpHea" + + "derAction\022o\n\027request_headers_to_adds\030\315\253\372" + + ") \003(\0132K.google.cloud.compute.v1.Security" + + "PolicyRuleHttpHeaderActionHttpHeaderOpti" + + "on\"\220\001\n2SecurityPolicyRuleHttpHeaderActio" + + "nHttpHeaderOption\022\033\n\013header_name\030\375\301\3074 \001(" + + "\tH\000\210\001\001\022\034\n\014header_value\030\277\362\353` \001(\tH\001\210\001\001B\016\n\014" + + "_header_nameB\017\n\r_header_value\"\254\002\n\031Securi" + + "tyPolicyRuleMatcher\022P\n\006config\030\302\206\376y \001(\01328" + ".google.cloud.compute.v1.SecurityPolicyR" - + "eferenceB\003\340A\002B\r\n\013_request_id\"\202\002\n*SetEdge" - + "SecurityPolicyBackendServiceRequest\022 \n\017b" - + "ackend_service\030\212\300\256\222\001 \001(\tB\003\340A\002\022!\n\007project" + + "uleMatcherConfigH\000\210\001\001\0223\n\004expr\030\365\363\276\001 \001(\0132\035" + + ".google.cloud.compute.v1.ExprH\001\210\001\001\022\037\n\016ve" + + "rsioned_expr\030\275\343\326\231\001 \001(\tH\002\210\001\001\"@\n\rVersioned" + + "Expr\022\034\n\030UNDEFINED_VERSIONED_EXPR\020\000\022\021\n\nSR" + + "C_IPS_V1\020\211\375\350!B\t\n\007_configB\007\n\005_exprB\021\n\017_ve" + + "rsioned_expr\"<\n\037SecurityPolicyRuleMatche" + + "rConfig\022\031\n\rsrc_ip_ranges\030\323\200\207\316\001 \003(\t\"\215\001\n(S" + + "ecurityPolicyRulePreconfiguredWafConfig\022" + + "a\n\nexclusions\030\345\370\277c \003(\0132J.google.cloud.co" + + "mpute.v1.SecurityPolicyRulePreconfigured" + + "WafConfigExclusion\"\202\005\n1SecurityPolicyRul" + + "ePreconfiguredWafConfigExclusion\022|\n\032requ" + + "est_cookies_to_exclude\030\366\336\337J \003(\0132U.google" + + ".cloud.compute.v1.SecurityPolicyRulePrec" + + "onfiguredWafConfigExclusionFieldParams\022|" + + "\n\032request_headers_to_exclude\030\237\244\223\036 \003(\0132U." + + "google.cloud.compute.v1.SecurityPolicyRu" + + "lePreconfiguredWafConfigExclusionFieldPa" + + "rams\022\202\001\n\037request_query_params_to_exclude" + + "\030\210\236\272\242\001 \003(\0132U.google.cloud.compute.v1.Sec" + + "urityPolicyRulePreconfiguredWafConfigExc" + + "lusionFieldParams\022y\n\027request_uris_to_exc" + + "lude\030\236\252\237+ \003(\0132U.google.cloud.compute.v1." + + "SecurityPolicyRulePreconfiguredWafConfig" + + "ExclusionFieldParams\022\033\n\017target_rule_ids\030" + + "\343\343\325\355\001 \003(\t\022 \n\017target_rule_set\030\215\257\326\355\001 \001(\tH\000" + + "\210\001\001B\022\n\020_target_rule_set\"\347\001\n.google.c" + + "loud.compute.v1.ServiceAttachmentConsume" + + "rProjectLimit\022 \n\025consumer_reject_lists\030\236" + + "\231\245a \003(\t\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\001" + + "\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\027\n\014dom" + + "ain_names\030\215\330\211\003 \003(\t\022&\n\025enable_proxy_proto" + + "col\030\205\207\274\255\001 \001(\010H\003\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001" + + "(\tH\004\210\001\001\022\020\n\002id\030\233\032 \001(\004H\005\210\001\001\022\024\n\004kind\030\224\367\310\001 \001" + + "(\tH\006\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022\027\n\013nat_sub" + + "nets\030\230\217\333\262\001 \003(\t\022(\n\030producer_forwarding_ru" + + "le\030\321\250\234v \001(\tH\010\210\001\001\022L\n\031psc_service_attachme" + + "nt_id\030\356\372\317\373\001 \001(\0132 .google.cloud.compute.v" + + "1.Uint128H\t\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\n\210\001\001\022\032" + + "\n\tself_link\030\215\222\305\331\001 \001(\tH\013\210\001\001\022\035\n\016target_ser" + + "vice\030\207\374N \001(\tH\014\210\001\001\"\225\001\n\024ConnectionPreferen" + + "ce\022#\n\037UNDEFINED_CONNECTION_PREFERENCE\020\000\022" + + "\027\n\020ACCEPT_AUTOMATIC\020\224\367\360#\022\025\n\rACCEPT_MANUA" + + "L\020\335\355\361\261\001\022(\n!CONNECTION_PREFERENCE_UNSPECI" + + "FIED\020\264\240\277\020B\030\n\026_connection_preferenceB\025\n\023_" + + "creation_timestampB\016\n\014_descriptionB\030\n\026_e" + + "nable_proxy_protocolB\016\n\014_fingerprintB\005\n\003" + + "_idB\007\n\005_kindB\007\n\005_nameB\033\n\031_producer_forwa" + + "rding_ruleB\034\n\032_psc_service_attachment_id" + + "B\t\n\007_regionB\014\n\n_self_linkB\021\n\017_target_ser" + + "vice\"\324\003\n\037ServiceAttachmentAggregatedList" + + "\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022U\n\005items\030\300\317\367/ \003(\0132C.g" + + "oogle.cloud.compute.v1.ServiceAttachment" + + "AggregatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001" + + "(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001" + + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreacha" + + "bles\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .goog" + + "le.cloud.compute.v1.WarningH\004\210\001\001\032c\n\nItem" + + "sEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 \001(\01325.goo" + + "gle.cloud.compute.v1.ServiceAttachmentsS" + + "copedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_p" + + "age_tokenB\014\n\n_self_linkB\n\n\010_warning\"\277\002\n\"" + + "ServiceAttachmentConnectedEndpoint\022\030\n\010en" + + "dpoint\030\225\273\234> \001(\tH\000\210\001\001\022\"\n\021psc_connection_i" + + "d\030\335\245\243\213\001 \001(\004H\001\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\002\210\001\001" + + "\"\224\001\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\017\n\010ACC" + + "EPTED\020\247\237\322u\022\016\n\006CLOSED\020\354\252\243\265\001\022\027\n\017NEEDS_ATTE" + + "NTION\020\274\213\242\244\001\022\016\n\007PENDING\020\367\252\360\020\022\017\n\010REJECTED\020" + + "\376\210\204S\022\031\n\022STATUS_UNSPECIFIED\020\312\314\213\024B\013\n\t_endp" + + "ointB\024\n\022_psc_connection_idB\t\n\007_status\"\305\001" + + "\n%ServiceAttachmentConsumerProjectLimit\022" + + " \n\020connection_limit\030\232\236\324> \001(\rH\000\210\001\001\022\033\n\013net" + + "work_url\030\336\217\346b \001(\tH\001\210\001\001\022\"\n\021project_id_or_" + + "num\030\250\212\345\246\001 \001(\tH\002\210\001\001B\023\n\021_connection_limitB" + + "\016\n\014_network_urlB\024\n\022_project_id_or_num\"\263\002" + + "\n\025ServiceAttachmentList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" + + "\001\022<\n\005items\030\300\317\367/ \003(\0132*.google.cloud.compu" + + "te.v1.ServiceAttachment\022\024\n\004kind\030\224\367\310\001 \001(\t" + + "H\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032" + + "\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337" + + "\226\030 \001(\0132 .google.cloud.compute.v1.Warning" + + "H\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_toke" + + "nB\014\n\n_self_linkB\n\n\010_warning\"\262\001\n\034ServiceA" + + "ttachmentsScopedList\022K\n\023service_attachme" + + "nts\030\246\222\272\222\001 \003(\0132*.google.cloud.compute.v1." + + "ServiceAttachment\0229\n\007warning\030\234\337\226\030 \001(\0132 ." + + "google.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010" + + "_warning\"\246\002\n&SetBackendServiceTargetSslP" + + "roxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\212\001\n7t" + + "arget_ssl_proxies_set_backend_service_re" + + "quest_resource\030\244\351\250B \001(\0132A.google.cloud.c" + + "ompute.v1.TargetSslProxiesSetBackendServ" + + "iceRequestB\003\340A\002\022!\n\020target_ssl_proxy\030\315\272\306\241" + + "\001 \001(\tB\003\340A\002B\r\n\013_request_id\"\247\002\n&SetBackend" + + "ServiceTargetTcpProxyRequest\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201" + + "\331\021 \001(\tH\000\210\001\001\022\213\001\n7target_tcp_proxies_set_b" + + "ackend_service_request_resource\030\357\321\302\202\001 \001(" + + "\0132A.google.cloud.compute.v1.TargetTcpPro" + + "xiesSetBackendServiceRequestB\003\340A\002\022!\n\020tar" + + "get_tcp_proxy\030\342\326\360\357\001 \001(\tB\003\340A\002B\r\n\013_request" + + "_id\"\261\002\n\032SetBackupTargetPoolRequest\022\036\n\016fa" + + "ilover_ratio\030\376\224\264e \001(\002H\000\210\001\001\022!\n\007project\030\231\226" + + "\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\t" + + "B\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210" + + "\001\001\022\033\n\013target_pool\030\212\344\370\035 \001(\tB\003\340A\002\022T\n\031targe" + + "t_reference_resource\030\360\267\335\371\001 \001(\0132(.google." + + "cloud.compute.v1.TargetReferenceB\003\340A\002B\021\n" + + "\017_failover_ratioB\r\n\013_request_id\"\256\002\n(SetC" + + "ertificateMapTargetHttpsProxyRequest\022!\n\007" + + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreque" + + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\217\001\n9target_https_pro" + + "xies_set_certificate_map_request_resourc" + + "e\030\273\266\376\336\001 \001(\0132C.google.cloud.compute.v1.Ta" + + "rgetHttpsProxiesSetCertificateMapRequest" + + "B\003\340A\002\022\"\n\022target_https_proxy\030\354\260\372\030 \001(\tB\003\340A" + + "\002B\r\n\013_request_id\"\247\002\n&SetCertificateMapTa" + + "rgetSslProxyRequest\022!\n\007project\030\231\226\301l \001(\tB" + + "\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210" + + "\001\001\022\213\001\n7target_ssl_proxies_set_certificat" + + "e_map_request_resource\030\272\226\203\244\001 \001(\0132A.googl" + + "e.cloud.compute.v1.TargetSslProxiesSetCe" + + "rtificateMapRequestB\003\340A\002\022!\n\020target_ssl_p" + + "roxy\030\315\272\306\241\001 \001(\tB\003\340A\002B\r\n\013_request_id\"\276\001\n\'S" + + "etCommonInstanceMetadataProjectRequest\022E" + + "\n\021metadata_resource\030\236\276\346\212\001 \001(\0132!.google.c" + + "loud.compute.v1.MetadataB\003\340A\002\022!\n\007project" + "\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313" - + "\201\331\021 \001(\tH\000\210\001\001\022d\n\"security_policy_referenc" - + "e_resource\030\360\264\253a \001(\01320.google.cloud.compu" - + "te.v1.SecurityPolicyReferenceB\003\340A\002B\r\n\013_r" - + "equest_id\"\274\001\n!SetIamPolicyBackendService" - + "Request\022d\n\"global_set_policy_request_res" - + "ource\030\262\347\333\240\001 \001(\0132/.google.cloud.compute.v" - + "1.GlobalSetPolicyRequestB\003\340A\002\022\027\n\007project" - + "\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002" - + "\"\304\001\n\027SetIamPolicyDiskRequest\022\027\n\007project\030" - + "\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022" - + "\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\022`\n zone_set_policy" - + "_request_resource\030\273\270\230\266\001 \001(\0132-.google.clo" - + "ud.compute.v1.ZoneSetPolicyRequestB\003\340A\002\"" - + "\273\001\n!SetIamPolicyFirewallPolicyRequest\022|\n" - + "/global_organization_set_policy_request_" - + "resource\030\336\224\314T \001(\0132;.google.cloud.compute" - + ".v1.GlobalOrganizationSetPolicyRequestB\003" - + "\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\263\001\n\030SetIam" - + "PolicyImageRequest\022d\n\"global_set_policy_" - + "request_resource\030\262\347\333\240\001 \001(\0132/.google.clou" - + "d.compute.v1.GlobalSetPolicyRequestB\003\340A\002" + + "\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\367\001\n#SetDefau" + + "ltNetworkTierProjectRequest\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\201\001\n2projects_set_" + + "default_network_tier_request_resource\030\212\300" + + "\243< \001(\0132=.google.cloud.compute.v1.Project" + + "sSetDefaultNetworkTierRequestB\003\340A\002\022\032\n\nre" + + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\351\001" + + "\n$SetDeletionProtectionInstanceRequest\022$" + + "\n\023deletion_protection\030\352\377\262\332\001 \001(\010H\000\210\001\001\022!\n\007" + + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreque" + + "st_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\030\n\010resource\030\216\210\257] \001(\t" + + "B\003\340A\002\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\026\n\024_d" + + "eletion_protectionB\r\n\013_request_id\"\342\001\n Se" + + "tDiskAutoDeleteInstanceRequest\022\034\n\013auto_d" + + "elete\030\273\344\316\335\001 \001(\010B\003\340A\002\022\033\n\013device_name\030\324\265\232 " + + " \001(\tB\003\340A\002\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007p" + + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreques" + + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002" + + "\362G\004zoneB\r\n\013_request_id\"\377\001\n)SetEdgeSecuri" + + "tyPolicyBackendBucketRequest\022\036\n\016backend_" + + "bucket\030\365\343\335+ \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" + + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001\022d\n\"security_policy_reference_resourc" + + "e\030\360\264\253a \001(\01320.google.cloud.compute.v1.Sec" + + "urityPolicyReferenceB\003\340A\002B\r\n\013_request_id" + + "\"\202\002\n*SetEdgeSecurityPolicyBackendService" + + "Request\022 \n\017backend_service\030\212\300\256\222\001 \001(\tB\003\340A" + + "\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\n" + + "request_id\030\313\201\331\021 \001(\tH\000\210\001\001\022d\n\"security_pol" + + "icy_reference_resource\030\360\264\253a \001(\01320.google" + + ".cloud.compute.v1.SecurityPolicyReferenc" + + "eB\003\340A\002B\r\n\013_request_id\"\274\001\n!SetIamPolicyBa" + + "ckendServiceRequest\022d\n\"global_set_policy" + + "_request_resource\030\262\347\333\240\001 \001(\0132/.google.clo" + + "ud.compute.v1.GlobalSetPolicyRequestB\003\340A" + + "\002\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216" + + "\210\257] \001(\tB\003\340A\002\"\304\001\n\027SetIamPolicyDiskRequest" + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210" - + "\257] \001(\tB\003\340A\002\"\310\001\n\033SetIamPolicyInstanceRequ" - + "est\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource" - + "\030\216\210\257] \001(\tB\003\340A\002\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\022`\n " - + "zone_set_policy_request_resource\030\273\270\230\266\001 \001" - + "(\0132-.google.cloud.compute.v1.ZoneSetPoli" - + "cyRequestB\003\340A\002\"\276\001\n#SetIamPolicyInstanceT" - + "emplateRequest\022d\n\"global_set_policy_requ" - + "est_resource\030\262\347\333\240\001 \001(\0132/.google.cloud.co" - + "mpute.v1.GlobalSetPolicyRequestB\003\340A\002\022\027\n\007" - + "project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001" - + "(\tB\003\340A\002\"\265\001\n\032SetIamPolicyLicenseRequest\022d" - + "\n\"global_set_policy_request_resource\030\262\347\333" - + "\240\001 \001(\0132/.google.cloud.compute.v1.GlobalS" - + "etPolicyRequestB\003\340A\002\022\027\n\007project\030\231\226\301l \001(\t" - + "B\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\272\001\n\037SetI" - + "amPolicyMachineImageRequest\022d\n\"global_se" - + "t_policy_request_resource\030\262\347\333\240\001 \001(\0132/.go" - + "ogle.cloud.compute.v1.GlobalSetPolicyReq" - + "uestB\003\340A\002\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010re" - + "source\030\216\210\257] \001(\tB\003\340A\002\"\327\001\n$SetIamPolicyNet" - + "workAttachmentRequest\022\027\n\007project\030\231\226\301l \001(" - + "\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022d\n\"region" - + "_set_policy_request_resource\030\203\307\353\203\001 \001(\0132/" - + ".google.cloud.compute.v1.RegionSetPolicy" - + "RequestB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\303" - + "\001\n(SetIamPolicyNetworkFirewallPolicyRequ" - + "est\022d\n\"global_set_policy_request_resourc" - + "e\030\262\347\333\240\001 \001(\0132/.google.cloud.compute.v1.Gl" - + "obalSetPolicyRequestB\003\340A\002\022\027\n\007project\030\231\226\301" - + "l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\311\001\n" - + "\034SetIamPolicyNodeGroupRequest\022\027\n\007project" - + "\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002" - + "\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\022`\n zone_set_polic" - + "y_request_resource\030\273\270\230\266\001 \001(\0132-.google.cl" - + "oud.compute.v1.ZoneSetPolicyRequestB\003\340A\002" - + "\"\322\001\n\037SetIamPolicyNodeTemplateRequest\022\027\n\007" - + "project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\t" - + "B\003\340A\002\022d\n\"region_set_policy_request_resou" - + "rce\030\203\307\353\203\001 \001(\0132/.google.cloud.compute.v1." - + "RegionSetPolicyRequestB\003\340A\002\022\030\n\010resource\030" - + "\216\210\257] \001(\tB\003\340A\002\"\332\001\n\'SetIamPolicyRegionBack" - + "endServiceRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340" - + "A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022d\n\"region_set" - + "_policy_request_resource\030\203\307\353\203\001 \001(\0132/.goo" - + "gle.cloud.compute.v1.RegionSetPolicyRequ" - + "estB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\320\001\n\035S" - + "etIamPolicyRegionDiskRequest\022\027\n\007project\030" + + "\257] \001(\tB\003\340A\002\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\022`\n zon" + + "e_set_policy_request_resource\030\273\270\230\266\001 \001(\0132" + + "-.google.cloud.compute.v1.ZoneSetPolicyR" + + "equestB\003\340A\002\"\273\001\n!SetIamPolicyFirewallPoli" + + "cyRequest\022|\n/global_organization_set_pol" + + "icy_request_resource\030\336\224\314T \001(\0132;.google.c" + + "loud.compute.v1.GlobalOrganizationSetPol" + + "icyRequestB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A" + + "\002\"\263\001\n\030SetIamPolicyImageRequest\022d\n\"global" + + "_set_policy_request_resource\030\262\347\333\240\001 \001(\0132/" + + ".google.cloud.compute.v1.GlobalSetPolicy" + + "RequestB\003\340A\002\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n" + + "\010resource\030\216\210\257] \001(\tB\003\340A\002\"\310\001\n\033SetIamPolicy" + + "InstanceRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002" + + "\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022\024\n\004zone\030\254\307\344\001 " + + "\001(\tB\003\340A\002\022`\n zone_set_policy_request_reso" + + "urce\030\273\270\230\266\001 \001(\0132-.google.cloud.compute.v1" + + ".ZoneSetPolicyRequestB\003\340A\002\"\276\001\n#SetIamPol" + + "icyInstanceTemplateRequest\022d\n\"global_set" + + "_policy_request_resource\030\262\347\333\240\001 \001(\0132/.goo" + + "gle.cloud.compute.v1.GlobalSetPolicyRequ" + + "estB\003\340A\002\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010res" + + "ource\030\216\210\257] \001(\tB\003\340A\002\"\265\001\n\032SetIamPolicyLice" + + "nseRequest\022d\n\"global_set_policy_request_" + + "resource\030\262\347\333\240\001 \001(\0132/.google.cloud.comput" + + "e.v1.GlobalSetPolicyRequestB\003\340A\002\022\027\n\007proj" + + "ect\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003" + + "\340A\002\"\272\001\n\037SetIamPolicyMachineImageRequest\022" + + "d\n\"global_set_policy_request_resource\030\262\347" + + "\333\240\001 \001(\0132/.google.cloud.compute.v1.Global" + + "SetPolicyRequestB\003\340A\002\022\027\n\007project\030\231\226\301l \001(" + + "\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\327\001\n$Set" + + "IamPolicyNetworkAttachmentRequest\022\027\n\007pro" + + "ject\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340" + + "A\002\022d\n\"region_set_policy_request_resource" + + "\030\203\307\353\203\001 \001(\0132/.google.cloud.compute.v1.Reg" + + "ionSetPolicyRequestB\003\340A\002\022\030\n\010resource\030\216\210\257" + + "] \001(\tB\003\340A\002\"\303\001\n(SetIamPolicyNetworkFirewa" + + "llPolicyRequest\022d\n\"global_set_policy_req" + + "uest_resource\030\262\347\333\240\001 \001(\0132/.google.cloud.c" + + "ompute.v1.GlobalSetPolicyRequestB\003\340A\002\022\027\n" + + "\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] " + + "\001(\tB\003\340A\002\"\311\001\n\034SetIamPolicyNodeGroupReques" + + "t\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216" + + "\210\257] \001(\tB\003\340A\002\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\022`\n zo" + + "ne_set_policy_request_resource\030\273\270\230\266\001 \001(\013" + + "2-.google.cloud.compute.v1.ZoneSetPolicy" + + "RequestB\003\340A\002\"\322\001\n\037SetIamPolicyNodeTemplat" + + "eRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006reg" + + "ion\030\364\315\240B \001(\tB\003\340A\002\022d\n\"region_set_policy_r" + + "equest_resource\030\203\307\353\203\001 \001(\0132/.google.cloud" + + ".compute.v1.RegionSetPolicyRequestB\003\340A\002\022" + + "\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\332\001\n\'SetIamPoli" + + "cyRegionBackendServiceRequest\022\027\n\007project" + + "\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022d" + + "\n\"region_set_policy_request_resource\030\203\307\353" + + "\203\001 \001(\0132/.google.cloud.compute.v1.RegionS" + + "etPolicyRequestB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(" + + "\tB\003\340A\002\"\320\001\n\035SetIamPolicyRegionDiskRequest" + + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B" + + " \001(\tB\003\340A\002\022d\n\"region_set_policy_request_r" + + "esource\030\203\307\353\203\001 \001(\0132/.google.cloud.compute" + + ".v1.RegionSetPolicyRequestB\003\340A\002\022\030\n\010resou" + + "rce\030\216\210\257] \001(\tB\003\340A\002\"\341\001\n.SetIamPolicyRegion" + + "NetworkFirewallPolicyRequest\022\027\n\007project\030" + "\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022d\n" + "\"region_set_policy_request_resource\030\203\307\353\203" + "\001 \001(\0132/.google.cloud.compute.v1.RegionSe" + "tPolicyRequestB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\t" - + "B\003\340A\002\"\341\001\n.SetIamPolicyRegionNetworkFirew" - + "allPolicyRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A" - + "\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022d\n\"region_set_" - + "policy_request_resource\030\203\307\353\203\001 \001(\0132/.goog" - + "le.cloud.compute.v1.RegionSetPolicyReque" - + "stB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\313\001\n\036Se" - + "tIamPolicyReservationRequest\022\027\n\007project\030" - + "\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022" - + "\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\022`\n zone_set_policy" - + "_request_resource\030\273\270\230\266\001 \001(\0132-.google.clo" - + "ud.compute.v1.ZoneSetPolicyRequestB\003\340A\002\"" - + "\324\001\n!SetIamPolicyResourcePolicyRequest\022\027\n" - + "\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(" - + "\tB\003\340A\002\022d\n\"region_set_policy_request_reso" - + "urce\030\203\307\353\203\001 \001(\0132/.google.cloud.compute.v1" - + ".RegionSetPolicyRequestB\003\340A\002\022\030\n\010resource" - + "\030\216\210\257] \001(\tB\003\340A\002\"\327\001\n$SetIamPolicyServiceAt" - + "tachmentRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002" - + "\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022d\n\"region_set_p" - + "olicy_request_resource\030\203\307\353\203\001 \001(\0132/.googl" - + "e.cloud.compute.v1.RegionSetPolicyReques" - + "tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\266\001\n\033Set" - + "IamPolicySnapshotRequest\022d\n\"global_set_p" - + "olicy_request_resource\030\262\347\333\240\001 \001(\0132/.googl" - + "e.cloud.compute.v1.GlobalSetPolicyReques" - + "tB\003\340A\002\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resou" - + "rce\030\216\210\257] \001(\tB\003\340A\002\"\320\001\n\035SetIamPolicySubnet" - + "workRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006" - + "region\030\364\315\240B \001(\tB\003\340A\002\022d\n\"region_set_polic" - + "y_request_resource\030\203\307\353\203\001 \001(\0132/.google.cl" - + "oud.compute.v1.RegionSetPolicyRequestB\003\340" - + "A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\336\002\n.SetInst" - + "anceTemplateInstanceGroupManagerRequest\022" - + "&\n\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022" - + "\230\001\n>instance_group_managers_set_instance" - + "_template_request_resource\030\305\331\326\004 \001(\0132H.go" - + "ogle.cloud.compute.v1.InstanceGroupManag" - + "ersSetInstanceTemplateRequestB\003\340A\002\022!\n\007pr" - + "oject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest" - + "_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362" - + "G\004zoneB\r\n\013_request_id\"\344\002\n4SetInstanceTem" - + "plateRegionInstanceGroupManagerRequest\022&" - + "\n\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022!" - + "\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006reg", - "ion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\224\001\n.google" - + ".cloud.compute.v1.TargetSslProxiesSetPro" - + "xyHeaderRequestB\003\340A\002\022!\n\020target_ssl_proxy" - + "\030\315\272\306\241\001 \001(\tB\003\340A\002B\r\n\013_request_id\"\235\002\n#SetPr" - + "oxyHeaderTargetTcpProxyRequest\022!\n\007projec" - + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030" - + "\313\201\331\021 \001(\tH\000\210\001\001\022\204\001\n4target_tcp_proxies_set" - + "_proxy_header_request_resource\030\303\230\361h \001(\0132" - + ">.google.cloud.compute.v1.TargetTcpProxi" - + "esSetProxyHeaderRequestB\003\340A\002\022!\n\020target_t" - + "cp_proxy\030\342\326\360\357\001 \001(\tB\003\340A\002B\r\n\013_request_id\"\247" - + "\002\n&SetQuicOverrideTargetHttpsProxyReques" - + "t\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\n" - + "request_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\212\001\n7target_http" - + "s_proxies_set_quic_override_request_reso" - + "urce\030\342\365\343\" \001(\0132A.google.cloud.compute.v1." - + "TargetHttpsProxiesSetQuicOverrideRequest" - + "B\003\340A\002\022\"\n\022target_https_proxy\030\354\260\372\030 \001(\tB\003\340A" - + "\002B\r\n\013_request_id\"\356\001\n\034SetSchedulingInstan" - + "ceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007p" - + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreques" - + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001\022I\n\023scheduling_resourc" - + "e\030\331\254\356\334\001 \001(\0132#.google.cloud.compute.v1.Sc" - + "hedulingB\003\340A\002\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zo" - + "neB\r\n\013_request_id\"\376\001\n&SetSecurityPolicyB" - + "ackendServiceRequest\022 \n\017backend_service\030" - + "\212\300\256\222\001 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" - + "G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022d\n" - + "\"security_policy_reference_resource\030\360\264\253a" - + " \001(\01320.google.cloud.compute.v1.SecurityP" - + "olicyReferenceB\003\340A\002B\r\n\013_request_id\"\244\002\n S" - + "etServiceAccountInstanceRequest\022\030\n\010insta" - + "nce\030\225\251\332\010 \001(\tB\003\340A\002\022{\n.instances_set_servi" - + "ce_account_request_resource\030\270\236\262\203\001 \001(\0132:." - + "google.cloud.compute.v1.InstancesSetServ" - + "iceAccountRequestB\003\340A\002\022!\n\007project\030\231\226\301l \001" - + "(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\t" - + "H\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_r" - + "equest_id\"\260\002\n1SetShieldedInstanceIntegri" - + "tyPolicyInstanceRequest\022\030\n\010instance\030\225\251\332\010" - + " \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" - + "ject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022v\n+shie" - + "lded_instance_integrity_policy_resource\030" - + "\266\334\215\303\001 \001(\01328.google.cloud.compute.v1.Shie" - + "ldedInstanceIntegrityPolicyB\003\340A\002\022\033\n\004zone" - + "\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\345\002\n" - + "/SetSslCertificatesRegionTargetHttpsProx" - + "yRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" - + "ect\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\236\001\n" - + "Aregion_target_https_proxies_set_ssl_cer" - + "tificates_request_resource\030\207\204\246\272\001 \001(\0132J.g" - + "oogle.cloud.compute.v1.RegionTargetHttps" - + "ProxiesSetSslCertificatesRequestB\003\340A\002\022\032\n" - + "\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\"\n\022target_http" - + "s_proxy\030\354\260\372\030 \001(\tB\003\340A\002B\r\n\013_request_id\"\260\002\n" - + ")SetSslCertificatesTargetHttpsProxyReque" - + "st\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n" - + "\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\220\001\n:target_htt" - + "ps_proxies_set_ssl_certificates_request_" - + "resource\030\334\253\262j \001(\0132D.google.cloud.compute" - + ".v1.TargetHttpsProxiesSetSslCertificates" - + "RequestB\003\340A\002\022\"\n\022target_https_proxy\030\354\260\372\030 " - + "\001(\tB\003\340A\002B\r\n\013_request_id\"\251\002\n\'SetSslCertif" - + "icatesTargetSslProxyRequest\022!\n\007project\030\231" - + "\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331" - + "\021 \001(\tH\000\210\001\001\022\214\001\n8target_ssl_proxies_set_ss" - + "l_certificates_request_resource\030\275\313\305F \001(\013" - + "2B.google.cloud.compute.v1.TargetSslProx" - + "iesSetSslCertificatesRequestB\003\340A\002\022!\n\020tar" - + "get_ssl_proxy\030\315\272\306\241\001 \001(\tB\003\340A\002B\r\n\013_request" - + "_id\"\363\001\n#SetSslPolicyTargetHttpsProxyRequ" - + "est\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032" - + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022Z\n\035ssl_policy" - + "_reference_resource\030\274\364\237p \001(\0132+.google.cl" - + "oud.compute.v1.SslPolicyReferenceB\003\340A\002\022\"" - + "\n\022target_https_proxy\030\354\260\372\030 \001(\tB\003\340A\002B\r\n\013_r" - + "equest_id\"\360\001\n!SetSslPolicyTargetSslProxy" - + "Request\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proje" - + "ct\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022Z\n\035ssl_po" - + "licy_reference_resource\030\274\364\237p \001(\0132+.googl" - + "e.cloud.compute.v1.SslPolicyReferenceB\003\340" - + "A\002\022!\n\020target_ssl_proxy\030\315\272\306\241\001 \001(\tB\003\340A\002B\r\n" - + "\013_request_id\"\334\001\n\026SetTagsInstanceRequest\022" - + "\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301" - + "l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 " - + "\001(\tH\000\210\001\001\022=\n\rtags_resource\030\364\232\205\236\001 \001(\0132\035.go" - + "ogle.cloud.compute.v1.TagsB\003\340A\002\022\033\n\004zone\030" - + "\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\207\002\n\036" - + "SetTargetForwardingRuleRequest\022 \n\017forwar" - + "ding_rule\030\376\245\335\200\001 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l" - + " \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014" - + "\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001" - + "\022T\n\031target_reference_resource\030\360\267\335\371\001 \001(\0132" - + "(.google.cloud.compute.v1.TargetReferenc" - + "eB\003\340A\002B\r\n\013_request_id\"\354\001\n$SetTargetGloba" - + "lForwardingRuleRequest\022 \n\017forwarding_rul" - + "e\030\376\245\335\200\001 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022" - + "T\n\031target_reference_resource\030\360\267\335\371\001 \001(\0132(" - + ".google.cloud.compute.v1.TargetReference" - + "B\003\340A\002B\r\n\013_request_id\"\320\002\n)SetTargetPoolsI" - + "nstanceGroupManagerRequest\022&\n\026instance_g" - + "roup_manager\030\303\367\363v \001(\tB\003\340A\002\022\217\001\n9instance_" - + "group_managers_set_target_pools_request_" - + "resource\030\210\206\210\206\001 \001(\0132C.google.cloud.comput" - + "e.v1.InstanceGroupManagersSetTargetPools" - + "RequestB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007" - + "project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004z" - + "one\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"" - + "\346\002\n/SetTargetPoolsRegionInstanceGroupMan" + + "PolicyRequestB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB" + + "\003\340A\002\"\266\001\n\033SetIamPolicySnapshotRequest\022d\n\"" + + "global_set_policy_request_resource\030\262\347\333\240\001" + + " \001(\0132/.google.cloud.compute.v1.GlobalSet" + + "PolicyRequestB\003\340A\002\022\027\n\007project\030\231\226\301l \001(\tB\003" + + "\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\"\320\001\n\035SetIam" + + "PolicySubnetworkRequest\022\027\n\007project\030\231\226\301l " + + "\001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022d\n\"regi" + + "on_set_policy_request_resource\030\203\307\353\203\001 \001(\013" + + "2/.google.cloud.compute.v1.RegionSetPoli" + + "cyRequestB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002" + + "\"\336\002\n.SetInstanceTemplateInstanceGroupMan" + "agerRequest\022&\n\026instance_group_manager\030\303\367" - + "\363v \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "\363v \001(\tB\003\340A\002\022\230\001\n>instance_group_managers_" + + "set_instance_template_request_resource\030\305" + + "\331\326\004 \001(\0132H.google.cloud.compute.v1.Instan" + + "ceGroupManagersSetInstanceTemplateReques" + + "tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007projec" + + "t\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307" + + "\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\344\002\n4Se" + + "tInstanceTemplateRegionInstanceGroupMana", + "gerRequest\022&\n\026instance_group_manager\030\303\367\363" + + "v \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pr" + + "oject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\224" + + "\001\n.google.cloud.compute.v1.TargetSslP" + + "roxiesSetProxyHeaderRequestB\003\340A\002\022!\n\020targ" + + "et_ssl_proxy\030\315\272\306\241\001 \001(\tB\003\340A\002B\r\n\013_request_" + + "id\"\235\002\n#SetProxyHeaderTargetTcpProxyReque" + + "st\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n" + + "\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\204\001\n4target_tcp" + + "_proxies_set_proxy_header_request_resour" + + "ce\030\303\230\361h \001(\0132>.google.cloud.compute.v1.Ta" + + "rgetTcpProxiesSetProxyHeaderRequestB\003\340A\002" + + "\022!\n\020target_tcp_proxy\030\342\326\360\357\001 \001(\tB\003\340A\002B\r\n\013_" + + "request_id\"\247\002\n&SetQuicOverrideTargetHttp" + + "sProxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G" + + "\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\212\001\n" + + "7target_https_proxies_set_quic_override_" + + "request_resource\030\342\365\343\" \001(\0132A.google.cloud" + + ".compute.v1.TargetHttpsProxiesSetQuicOve" + + "rrideRequestB\003\340A\002\022\"\n\022target_https_proxy\030" + + "\354\260\372\030 \001(\tB\003\340A\002B\r\n\013_request_id\"\356\001\n\034SetSche" + + "dulingInstanceRequest\022\030\n\010instance\030\225\251\332\010 \001" + + "(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proje" + + "ct\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022I\n\023schedu" + + "ling_resource\030\331\254\356\334\001 \001(\0132#.google.cloud.c" + + "ompute.v1.SchedulingB\003\340A\002\022\033\n\004zone\030\254\307\344\001 \001" + + "(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\376\001\n&SetSec" + + "urityPolicyBackendServiceRequest\022 \n\017back" + + "end_service\030\212\300\256\222\001 \001(\tB\003\340A\002\022!\n\007project\030\231\226" + + "\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021" + + " \001(\tH\000\210\001\001\022d\n\"security_policy_reference_r" + + "esource\030\360\264\253a \001(\01320.google.cloud.compute." + + "v1.SecurityPolicyReferenceB\003\340A\002B\r\n\013_requ" + + "est_id\"\244\002\n SetServiceAccountInstanceRequ" + + "est\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022{\n.instanc" + + "es_set_service_account_request_resource\030" + + "\270\236\262\203\001 \001(\0132:.google.cloud.compute.v1.Inst" + + "ancesSetServiceAccountRequestB\003\340A\002\022!\n\007pr" + + "oject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest" + + "_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362" + + "G\004zoneB\r\n\013_request_id\"\260\002\n1SetShieldedIns" + + "tanceIntegrityPolicyInstanceRequest\022\030\n\010i" + + "nstance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(" + + "\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH" + + "\000\210\001\001\022v\n+shielded_instance_integrity_poli" + + "cy_resource\030\266\334\215\303\001 \001(\01328.google.cloud.com" + + "pute.v1.ShieldedInstanceIntegrityPolicyB" + + "\003\340A\002\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_re" + + "quest_id\"\345\002\n/SetSslCertificatesRegionTar" + + "getHttpsProxyRequest\022!\n\007project\030\231\226\301l \001(\t" + + "B\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362" + + "G\006region\022\236\001\nAregion_target_https_proxies" + + "_set_ssl_certificates_request_resource\030\207" + + "\204\246\272\001 \001(\0132J.google.cloud.compute.v1.Regio" + + "nTargetHttpsProxiesSetSslCertificatesReq" + + "uestB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\"\n" + + "\022target_https_proxy\030\354\260\372\030 \001(\tB\003\340A\002B\r\n\013_re" + + "quest_id\"\260\002\n)SetSslCertificatesTargetHtt" + + "psProxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" + + "G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\220\001" + + "\n:target_https_proxies_set_ssl_certifica" + + "tes_request_resource\030\334\253\262j \001(\0132D.google.c" + + "loud.compute.v1.TargetHttpsProxiesSetSsl" + + "CertificatesRequestB\003\340A\002\022\"\n\022target_https" + + "_proxy\030\354\260\372\030 \001(\tB\003\340A\002B\r\n\013_request_id\"\251\002\n\'" + + "SetSslCertificatesTargetSslProxyRequest\022" + + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" + + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\214\001\n8target_ssl_pr" + + "oxies_set_ssl_certificates_request_resou" + + "rce\030\275\313\305F \001(\0132B.google.cloud.compute.v1.T" + + "argetSslProxiesSetSslCertificatesRequest" + + "B\003\340A\002\022!\n\020target_ssl_proxy\030\315\272\306\241\001 \001(\tB\003\340A\002" + + "B\r\n\013_request_id\"\363\001\n#SetSslPolicyTargetHt" + + "tpsProxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002" + + "\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022Z" + + "\n\035ssl_policy_reference_resource\030\274\364\237p \001(\013" + + "2+.google.cloud.compute.v1.SslPolicyRefe" + + "renceB\003\340A\002\022\"\n\022target_https_proxy\030\354\260\372\030 \001(" + + "\tB\003\340A\002B\r\n\013_request_id\"\360\001\n!SetSslPolicyTa" + + "rgetSslProxyRequest\022!\n\007project\030\231\226\301l \001(\tB" + + "\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210" + + "\001\001\022Z\n\035ssl_policy_reference_resource\030\274\364\237p" + + " \001(\0132+.google.cloud.compute.v1.SslPolicy" + + "ReferenceB\003\340A\002\022!\n\020target_ssl_proxy\030\315\272\306\241\001" + + " \001(\tB\003\340A\002B\r\n\013_request_id\"\334\001\n\026SetTagsInst" + + "anceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n" + + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequ" + + "est_id\030\313\201\331\021 \001(\tH\000\210\001\001\022=\n\rtags_resource\030\364\232" + + "\205\236\001 \001(\0132\035.google.cloud.compute.v1.TagsB\003" + + "\340A\002\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_req" + + "uest_id\"\207\002\n\036SetTargetForwardingRuleReque" + + "st\022 \n\017forwarding_rule\030\376\245\335\200\001 \001(\tB\003\340A\002\022!\n\007" + + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006regio" + + "n\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313" + + "\201\331\021 \001(\tH\000\210\001\001\022T\n\031target_reference_resourc" + + "e\030\360\267\335\371\001 \001(\0132(.google.cloud.compute.v1.Ta" + + "rgetReferenceB\003\340A\002B\r\n\013_request_id\"\354\001\n$Se" + + "tTargetGlobalForwardingRuleRequest\022 \n\017fo" + + "rwarding_rule\030\376\245\335\200\001 \001(\tB\003\340A\002\022!\n\007project\030" + + "\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201" + + "\331\021 \001(\tH\000\210\001\001\022T\n\031target_reference_resource" + + "\030\360\267\335\371\001 \001(\0132(.google.cloud.compute.v1.Tar" + + "getReferenceB\003\340A\002B\r\n\013_request_id\"\320\002\n)Set" + + "TargetPoolsInstanceGroupManagerRequest\022&" + + "\n\026instance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022\217" + + "\001\n9instance_group_managers_set_target_po" + + "ols_request_resource\030\210\206\210\206\001 \001(\0132C.google." + + "cloud.compute.v1.InstanceGroupManagersSe" + + "tTargetPoolsRequestB\003\340A\002\022!\n\007project\030\231\226\301l" + + " \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001" + + "(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013" + + "_request_id\"\346\002\n/SetTargetPoolsRegionInst" + + "anceGroupManagerRequest\022&\n\026instance_grou" + + "p_manager\030\303\367\363v \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l " + + "\001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340" + + "A\002\362G\006region\022\233\001\n@region_instance_group_ma" + + "nagers_set_target_pools_request_resource" + + "\030\375\312\305% \001(\0132I.google.cloud.compute.v1.Regi" + + "onInstanceGroupManagersSetTargetPoolsReq" + + "uestB\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n" + + "\013_request_id\"\220\002\n%SetUrlMapRegionTargetHt" + + "tpProxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" + + "G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006regi" + + "on\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022!\n\021target" + + "_http_proxy\030\345\276\322b \001(\tB\003\340A\002\022U\n\032url_map_ref" + + "erence_resource\030\225\346\216\276\001 \001(\0132(.google.cloud" + + ".compute.v1.UrlMapReferenceB\003\340A\002B\r\n\013_req" + + "uest_id\"\222\002\n&SetUrlMapRegionTargetHttpsPr" + + "oxyRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pr" + + "oject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032" + + "\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\"\n\022target_htt" + + "ps_proxy\030\354\260\372\030 \001(\tB\003\340A\002\022U\n\032url_map_refere" + + "nce_resource\030\225\346\216\276\001 \001(\0132(.google.cloud.co" + + "mpute.v1.UrlMapReferenceB\003\340A\002B\r\n\013_reques" + + "t_id\"\351\001\n\037SetUrlMapTargetHttpProxyRequest" + + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nr" + + "equest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022!\n\021target_http_p" + + "roxy\030\345\276\322b \001(\tB\003\340A\002\022U\n\032url_map_reference_" + + "resource\030\225\346\216\276\001 \001(\0132(.google.cloud.comput" + + "e.v1.UrlMapReferenceB\003\340A\002B\r\n\013_request_id" + + "\"\353\001\n SetUrlMapTargetHttpsProxyRequest\022!\n" + + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequ" + + "est_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\"\n\022target_https_pro" + + "xy\030\354\260\372\030 \001(\tB\003\340A\002\022U\n\032url_map_reference_re" + + "source\030\225\346\216\276\001 \001(\0132(.google.cloud.compute." + + "v1.UrlMapReferenceB\003\340A\002B\r\n\013_request_id\"\320" + + "\001\n\"SetUsageExportBucketProjectRequest\022!\n" + + "\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequ" + + "est_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\\\n\036usage_export_loc" + + "ation_resource\030\353\314\324\t \001(\0132,.google.cloud.c" + + "ompute.v1.UsageExportLocationB\003\340A\002B\r\n\013_r" + + "equest_id\"\372\002\n\rShareSettings\022N\n\013project_m" + + "ap\030\266\326\377? \003(\01326.google.cloud.compute.v1.Sh" + + "areSettings.ProjectMapEntry\022\033\n\nshare_typ" + + "e\030\232\227\270\253\001 \001(\tH\000\210\001\001\032f\n\017ProjectMapEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022B\n\005value\030\002 \001(\01323.google.cloud.c" + + "ompute.v1.ShareSettingsProjectConfig:\0028\001" + + "\"\204\001\n\tShareType\022\030\n\024UNDEFINED_SHARE_TYPE\020\000" + + "\022\014\n\005LOCAL\020\313\316\317\"\022\024\n\014ORGANIZATION\020\263\252\217\203\001\022\036\n\026" + + "SHARE_TYPE_UNSPECIFIED\020\222\274\366\353\001\022\031\n\021SPECIFIC" + + "_PROJECTS\020\347\261\356\245\001B\r\n\013_share_type\"G\n\032ShareS" + + "ettingsProjectConfig\022\032\n\nproject_id\030\201\310\322T " + + "\001(\tH\000\210\001\001B\r\n\013_project_id\"\316\001\n\026ShieldedInst" + + "anceConfig\022,\n\033enable_integrity_monitorin" + + "g\030\266\333\207\303\001 \001(\010H\000\210\001\001\022\"\n\022enable_secure_boot\030\376" + + "\203\366: \001(\010H\001\210\001\001\022\033\n\013enable_vtpm\030\367\344\333V \001(\010H\002\210\001" + + "\001B\036\n\034_enable_integrity_monitoringB\025\n\023_en" + + "able_secure_bootB\016\n\014_enable_vtpm\"\213\002\n\030Shi" + + "eldedInstanceIdentity\022W\n\016encryption_key\030" + + "\243\307\351\350\001 \001(\01326.google.cloud.compute.v1.Shie" + + "ldedInstanceIdentityEntryH\000\210\001\001\022\024\n\004kind\030\224" + + "\367\310\001 \001(\tH\001\210\001\001\022T\n\013signing_key\030\245\220\205\231\001 \001(\01326." + "google.cloud.compute.v1.ShieldedInstance" - + "IdentityEntryH\000\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001" - + "\022T\n\013signing_key\030\245\220\205\231\001 \001(\01326.google.cloud" - + ".compute.v1.ShieldedInstanceIdentityEntr" - + "yH\002\210\001\001B\021\n\017_encryption_keyB\007\n\005_kindB\016\n\014_s" - + "igning_key\"i\n\035ShieldedInstanceIdentityEn" - + "try\022\030\n\007ek_cert\030\235\334\324\326\001 \001(\tH\000\210\001\001\022\027\n\006ek_pub\030" - + "\344\327\250\223\001 \001(\tH\001\210\001\001B\n\n\010_ek_certB\t\n\007_ek_pub\"h\n" - + "\037ShieldedInstanceIntegrityPolicy\022(\n\030upda" - + "te_auto_learn_policy\030\247\304\207u \001(\010H\000\210\001\001B\033\n\031_u" - + "pdate_auto_learn_policy\"`\n\014SignedUrlKey\022" - + "\031\n\010key_name\030\353\360\356\356\001 \001(\tH\000\210\001\001\022\032\n\tkey_value\030" - + "\221\237\260\360\001 \001(\tH\001\210\001\001B\013\n\t_key_nameB\014\n\n_key_valu" - + "e\"\203\001\n\'SimulateMaintenanceEventInstanceRe" - + "quest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007proje" - + "ct\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\033\n\004zone\030\254\307\344\001 " - + "\001(\tB\n\340A\002\362G\004zone\"\326\017\n\010Snapshot\022\035\n\014architec" - + "ture\030\323\322\261\220\001 \001(\tH\000\210\001\001\022\035\n\014auto_created\030\330\310\233\335" - + "\001 \001(\010H\001\210\001\001\022\032\n\nchain_name\030\311\332\335 \001(\tH\002\210\001\001\022#" - + "\n\023creation_size_bytes\030\215\350\345; \001(\003H\003\210\001\001\022\"\n\022c" - + "reation_timestamp\030\266\217\307\016 \001(\tH\004\210\001\001\022\034\n\013descr" - + "iption\030\374\207\326\311\001 \001(\tH\005\210\001\001\022\035\n\014disk_size_gb\030\267\232" - + "\347\226\001 \001(\003H\006\210\001\001\022\037\n\016download_bytes\030\364\313\271\317\001 \001(\003" - + "H\007\210\001\001\022\020\n\002id\030\233\032 \001(\004H\010\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\t" - + "H\t\210\001\001\022!\n\021label_fingerprint\030\231\360\367T \001(\tH\n\210\001\001" - + "\022A\n\006labels\030\377\277\301\356\001 \003(\0132-.google.cloud.comp" - + "ute.v1.Snapshot.LabelsEntry\022\030\n\rlicense_c" - + "odes\030\250\205\330\025 \003(\003\022\024\n\010licenses\030\322\210\200\241\001 \003(\t\022\036\n\rl" - + "ocation_hint\030\321\201\222\247\001 \001(\tH\013\210\001\001\022\024\n\004name\030\213\365\315\001" - + " \001(\tH\014\210\001\001\022\036\n\rsatisfies_pzs\030\253\335\253\345\001 \001(\010H\r\210\001" - + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\016\210\001\001\022W\n\027snapsho" - + "t_encryption_key\030\376\366\324\024 \001(\0132..google.cloud" - + ".compute.v1.CustomerEncryptionKeyH\017\210\001\001\022\035" - + "\n\rsnapshot_type\030\325\331\245; \001(\tH\020\210\001\001\022\034\n\013source_" - + "disk\030\301\356\264\327\001 \001(\tH\021\210\001\001\022[\n\032source_disk_encry" - + "ption_key\030\341\240\270\375\001 \001(\0132..google.cloud.compu" - + "te.v1.CustomerEncryptionKeyH\022\210\001\001\022\037\n\016sour" - + "ce_disk_id\030\331\315\311\330\001 \001(\tH\023\210\001\001\022/\n\037source_snap" - + "shot_schedule_policy\030\203\266\265p \001(\tH\024\210\001\001\0222\n\"so" - + "urce_snapshot_schedule_policy_id\030\327\247\316! \001(" - + "\tH\025\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\026\210\001\001\022\036\n\rstorag" - + "e_bytes\030\247\273\275\312\001 \001(\003H\027\210\001\001\022%\n\024storage_bytes_" - + "status\030\212\253\200\352\001 \001(\tH\030\210\001\001\022\035\n\021storage_locatio" - + "ns\030\232\355\263\234\001 \003(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t" - + "\022\r\n\005value\030\002 \001(\t:\0028\001\"j\n\014Architecture\022\032\n\026U" - + "NDEFINED_ARCHITECTURE\020\000\022 \n\030ARCHITECTURE_" - + "UNSPECIFIED\020\253\324\235\274\001\022\014\n\005ARM64\020\372\313\351\035\022\016\n\006X86_6" - + "4\020\307\244\346\312\001\"N\n\014SnapshotType\022\033\n\027UNDEFINED_SNA" - + "PSHOT_TYPE\020\000\022\017\n\007ARCHIVE\020\242\331\321\361\001\022\020\n\010STANDAR" - + "D\020\275\235\214\347\001\"r\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022" - + "\020\n\010CREATING\020\271\275\235\331\001\022\020\n\010DELETING\020\250\247\207\374\001\022\016\n\006F" - + "AILED\020\275\220\246\331\001\022\014\n\005READY\020\203\303\217%\022\020\n\tUPLOADING\020\241" - + "\234\315\177\"]\n\022StorageBytesStatus\022\"\n\036UNDEFINED_S" - + "TORAGE_BYTES_STATUS\020\000\022\020\n\010UPDATING\020\306\356\354\353\001\022" - + "\021\n\nUP_TO_DATE\020\316\242\2470B\017\n\r_architectureB\017\n\r_" - + "auto_createdB\r\n\013_chain_nameB\026\n\024_creation" - + "_size_bytesB\025\n\023_creation_timestampB\016\n\014_d" - + "escriptionB\017\n\r_disk_size_gbB\021\n\017_download" - + "_bytesB\005\n\003_idB\007\n\005_kindB\024\n\022_label_fingerp" - + "rintB\020\n\016_location_hintB\007\n\005_nameB\020\n\016_sati" - + "sfies_pzsB\014\n\n_self_linkB\032\n\030_snapshot_enc" - + "ryption_keyB\020\n\016_snapshot_typeB\016\n\014_source" - + "_diskB\035\n\033_source_disk_encryption_keyB\021\n\017", - "_source_disk_idB\"\n _source_snapshot_sche" - + "dule_policyB%\n#_source_snapshot_schedule" - + "_policy_idB\t\n\007_statusB\020\n\016_storage_bytesB" - + "\027\n\025_storage_bytes_status\"\241\002\n\014SnapshotLis" - + "t\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0223\n\005items\030\300\317\367/ \003(\0132!." - + "google.cloud.compute.v1.Snapshot\022\024\n\004kind" - + "\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001" - + "(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007w" - + "arning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v" - + "1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_" - + "page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\265\001\n" - + "\027SourceDiskEncryptionKey\022T\n\023disk_encrypt" - + "ion_key\030\205\355\304\201\001 \001(\0132..google.cloud.compute" - + ".v1.CustomerEncryptionKeyH\000\210\001\001\022\034\n\013source" - + "_disk\030\301\356\264\327\001 \001(\tH\001\210\001\001B\026\n\024_disk_encryption" - + "_keyB\016\n\014_source_disk\"a\n\024SourceInstancePa" - + "rams\022I\n\014disk_configs\030\317\331\252p \003(\01320.google.c" - + "loud.compute.v1.DiskInstantiationConfig\"" - + "\361\010\n\030SourceInstanceProperties\022\037\n\016can_ip_f" - + "orward\030\374\206\204\337\001 \001(\010H\000\210\001\001\022$\n\023deletion_protec" - + "tion\030\352\377\262\332\001 \001(\010H\001\210\001\001\022\034\n\013description\030\374\207\326\311\001" - + " \001(\tH\002\210\001\001\022<\n\005disks\030\366\314\312- \003(\0132*.google.clo" - + "ud.compute.v1.SavedAttachedDisk\022J\n\022guest" - + "_accelerators\030\357\314\207\335\001 \003(\0132*.google.cloud.c" - + "ompute.v1.AcceleratorConfig\022*\n\032key_revoc" - + "ation_action_type\030\342\334\300p \001(\tH\003\210\001\001\022Q\n\006label" - + "s\030\377\277\301\356\001 \003(\0132=.google.cloud.compute.v1.So" - + "urceInstanceProperties.LabelsEntry\022\034\n\014ma" - + "chine_type\030\262\260\312l \001(\tH\004\210\001\001\022;\n\010metadata\030\257\366\265" - + ") \001(\0132!.google.cloud.compute.v1.Metadata" - + "H\005\210\001\001\022 \n\020min_cpu_platform\030\367\233\352s \001(\tH\006\210\001\001\022" - + "H\n\022network_interfaces\030\213\332\222\031 \003(\0132).google." - + "cloud.compute.v1.NetworkInterface\022@\n\nsch" - + "eduling\030\224\313\261\270\001 \001(\0132#.google.cloud.compute" - + ".v1.SchedulingH\007\210\001\001\022E\n\020service_accounts\030" - + "\260\304\253\204\001 \003(\0132\'.google.cloud.compute.v1.Serv" - + "iceAccount\0223\n\004tags\030\231\350\330\001 \001(\0132\035.google.clo" - + "ud.compute.v1.TagsH\010\210\001\001\032-\n\013LabelsEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\215\001\n\027KeyRe" - + "vocationActionType\022(\n$UNDEFINED_KEY_REVO" - + "CATION_ACTION_TYPE\020\000\022.\n&KEY_REVOCATION_A" - + "CTION_TYPE_UNSPECIFIED\020\332\221\336\336\001\022\013\n\004NONE\020\270\316\222" - + "\001\022\013\n\004STOP\020\202\200\234\001B\021\n\017_can_ip_forwardB\026\n\024_de" - + "letion_protectionB\016\n\014_descriptionB\035\n\033_ke" - + "y_revocation_action_typeB\017\n\r_machine_typ" - + "eB\013\n\t_metadataB\023\n\021_min_cpu_platformB\r\n\013_" - + "schedulingB\007\n\005_tags\"\240\006\n\016SslCertificate\022\034" - + "\n\013certificate\030\227\203\375\242\001 \001(\tH\000\210\001\001\022\"\n\022creation" - + "_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013description\030" - + "\374\207\326\311\001 \001(\tH\002\210\001\001\022\034\n\013expire_time\030\355\323\221\322\001 \001(\tH" - + "\003\210\001\001\022\020\n\002id\030\233\032 \001(\004H\004\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH" - + "\005\210\001\001\022V\n\007managed\030\237\237\244\216\001 \001(\0132<.google.cloud" - + ".compute.v1.SslCertificateManagedSslCert" - + "ificateH\006\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022\034\n\013pr" - + "ivate_key\030\243\363\245\254\001 \001(\tH\010\210\001\001\022\026\n\006region\030\364\315\240B " - + "\001(\tH\t\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\n\210\001\001\022_\n\014" - + "self_managed\030\254\363\201\235\001 \001(\0132@.google.cloud.co" - + "mpute.v1.SslCertificateSelfManagedSslCer" - + "tificateH\013\210\001\001\022%\n\031subject_alternative_nam" - + "es\030\343\357\223\374\001 \003(\t\022\024\n\004type\030\272\236\332\001 \001(\tH\014\210\001\001\"[\n\004Ty" - + "pe\022\022\n\016UNDEFINED_TYPE\020\000\022\017\n\007MANAGED\020\377\266\322\344\001\022" - + "\024\n\014SELF_MANAGED\020\214\373\223\317\001\022\030\n\020TYPE_UNSPECIFIE" - + "D\020\222\373\333\320\001B\016\n\014_certificateB\025\n\023_creation_tim" - + "estampB\016\n\014_descriptionB\016\n\014_expire_timeB\005" - + "\n\003_idB\007\n\005_kindB\n\n\010_managedB\007\n\005_nameB\016\n\014_" - + "private_keyB\t\n\007_regionB\014\n\n_self_linkB\017\n\r" - + "_self_managedB\007\n\005_type\"\313\003\n\034SslCertificat" - + "eAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022R\n\005ite" - + "ms\030\300\317\367/ \003(\0132@.google.cloud.compute.v1.Ss" - + "lCertificateAggregatedList.ItemsEntry\022\024\n" - + "\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225" - + "\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001" - + "\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226" - + "\030 \001(\0132 .google.cloud.compute.v1.WarningH" - + "\004\210\001\001\032`\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022A\n\005value" - + "\030\002 \001(\01322.google.cloud.compute.v1.SslCert" - + "ificatesScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022" + + "IdentityEntryH\002\210\001\001B\021\n\017_encryption_keyB\007\n" + + "\005_kindB\016\n\014_signing_key\"i\n\035ShieldedInstan" + + "ceIdentityEntry\022\030\n\007ek_cert\030\235\334\324\326\001 \001(\tH\000\210\001" + + "\001\022\027\n\006ek_pub\030\344\327\250\223\001 \001(\tH\001\210\001\001B\n\n\010_ek_certB\t" + + "\n\007_ek_pub\"h\n\037ShieldedInstanceIntegrityPo" + + "licy\022(\n\030update_auto_learn_policy\030\247\304\207u \001(" + + "\010H\000\210\001\001B\033\n\031_update_auto_learn_policy\"`\n\014S" + + "ignedUrlKey\022\031\n\010key_name\030\353\360\356\356\001 \001(\tH\000\210\001\001\022\032" + + "\n\tkey_value\030\221\237\260\360\001 \001(\tH\001\210\001\001B\013\n\t_key_nameB" + + "\014\n\n_key_value\"\203\001\n\'SimulateMaintenanceEve" + + "ntInstanceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003" + + "\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\033" + + "\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zone\"\301\002\n(Simulate" + + "MaintenanceEventNodeGroupRequest\022\033\n\nnode" + + "_group\030\202\374\213\340\001 \001(\tB\003\340A\002\022\214\001\n7node_groups_si" + + "mulate_maintenance_event_request_resourc" + + "e\030\334\371\313\247\001 \001(\0132B.google.cloud.compute.v1.No" + + "deGroupsSimulateMaintenanceEventRequestB" + + "\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022" + + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001" + + " \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\326\017\n\010Snap" + + "shot\022\035\n\014architecture\030\323\322\261\220\001 \001(\tH\000\210\001\001\022\035\n\014a" + + "uto_created\030\330\310\233\335\001 \001(\010H\001\210\001\001\022\032\n\nchain_name" + + "\030\311\332\335 \001(\tH\002\210\001\001\022#\n\023creation_size_bytes\030\215\350" + + "\345; \001(\003H\003\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001" + + "(\tH\004\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\005\210\001\001\022\035\n" + + "\014disk_size_gb\030\267\232\347\226\001 \001(\003H\006\210\001\001\022\037\n\016download" + + "_bytes\030\364\313\271\317\001 \001(\003H\007\210\001\001\022\020\n\002id\030\233\032 \001(\004H\010\210\001\001\022" + + "\024\n\004kind\030\224\367\310\001 \001(\tH\t\210\001\001\022!\n\021label_fingerpri" + + "nt\030\231\360\367T \001(\tH\n\210\001\001\022A\n\006labels\030\377\277\301\356\001 \003(\0132-.g" + + "oogle.cloud.compute.v1.Snapshot.LabelsEn" + + "try\022\030\n\rlicense_codes\030\250\205\330\025 \003(\003\022\024\n\010license" + + "s\030\322\210\200\241\001 \003(\t\022\036\n\rlocation_hint\030\321\201\222\247\001 \001(\tH\013" + + "\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\014\210\001\001\022\036\n\rsatisfies_p" + + "zs\030\253\335\253\345\001 \001(\010H\r\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\t" + + "H\016\210\001\001\022W\n\027snapshot_encryption_key\030\376\366\324\024 \001(" + + "\0132..google.cloud.compute.v1.CustomerEncr" + + "yptionKeyH\017\210\001\001\022\035\n\rsnapshot_type\030\325\331\245; \001(\t" + + "H\020\210\001\001\022\034\n\013source_disk\030\301\356\264\327\001 \001(\tH\021\210\001\001\022[\n\032s" + + "ource_disk_encryption_key\030\341\240\270\375\001 \001(\0132..go" + + "ogle.cloud.compute.v1.CustomerEncryption" + + "KeyH\022\210\001\001\022\037\n\016source_disk_id\030\331\315\311\330\001 \001(\tH\023\210\001" + + "\001\022/\n\037source_snapshot_schedule_policy\030\203\266\265" + + "p \001(\tH\024\210\001\001\0222\n\"source_snapshot_schedule_p" + + "olicy_id\030\327\247\316! \001(\tH\025\210\001\001\022\026\n\006status\030\362\237\267V \001(" + + "\tH\026\210\001\001\022\036\n\rstorage_bytes\030\247\273\275\312\001 \001(\003H\027\210\001\001\022%" + + "\n\024storage_bytes_status\030\212\253\200\352\001 \001(\tH\030\210\001\001\022\035\n" + + "\021storage_locations\030\232\355\263\234\001 \003(\t\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"j\n\014A" + + "rchitecture\022\032\n\026UNDEFINED_ARCHITECTURE\020\000\022" + + " \n\030ARCHITECTURE_UNSPECIFIED\020\253\324\235\274\001\022\014\n\005ARM" + + "64\020\372\313\351\035\022\016\n\006X86_64\020\307\244\346\312\001\"N\n\014SnapshotType\022" + + "\033\n\027UNDEFINED_SNAPSHOT_TYPE\020\000\022\017\n\007ARCHIVE\020" + + "\242\331\321\361\001\022\020\n\010STANDARD\020\275\235\214\347\001\"r\n\006Status\022\024\n\020UND" + + "EFINED_STATUS\020\000\022\020\n\010CREATING\020\271\275\235\331\001\022\020\n\010DEL" + + "ETING\020\250\247\207\374\001\022\016\n\006FAILED\020\275\220\246\331\001\022\014\n\005READY\020\203\303\217" + + "%\022\020\n\tUPLOADING\020\241\234\315\177\"]\n\022StorageBytesStatu", + "s\022\"\n\036UNDEFINED_STORAGE_BYTES_STATUS\020\000\022\020\n" + + "\010UPDATING\020\306\356\354\353\001\022\021\n\nUP_TO_DATE\020\316\242\2470B\017\n\r_a" + + "rchitectureB\017\n\r_auto_createdB\r\n\013_chain_n" + + "ameB\026\n\024_creation_size_bytesB\025\n\023_creation" + + "_timestampB\016\n\014_descriptionB\017\n\r_disk_size" + + "_gbB\021\n\017_download_bytesB\005\n\003_idB\007\n\005_kindB\024" + + "\n\022_label_fingerprintB\020\n\016_location_hintB\007" + + "\n\005_nameB\020\n\016_satisfies_pzsB\014\n\n_self_linkB" + + "\032\n\030_snapshot_encryption_keyB\020\n\016_snapshot" + + "_typeB\016\n\014_source_diskB\035\n\033_source_disk_en" + + "cryption_keyB\021\n\017_source_disk_idB\"\n _sour" + + "ce_snapshot_schedule_policyB%\n#_source_s" + + "napshot_schedule_policy_idB\t\n\007_statusB\020\n" + + "\016_storage_bytesB\027\n\025_storage_bytes_status" + + "\"\241\002\n\014SnapshotList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0223\n\005i" + + "tems\030\300\317\367/ \003(\0132!.google.cloud.compute.v1." + + "Snapshot\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_p" + + "age_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305" + + "\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google" + + ".cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n" + + "\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_link" + + "B\n\n\010_warning\"\265\001\n\027SourceDiskEncryptionKey" + + "\022T\n\023disk_encryption_key\030\205\355\304\201\001 \001(\0132..goog" + + "le.cloud.compute.v1.CustomerEncryptionKe" + + "yH\000\210\001\001\022\034\n\013source_disk\030\301\356\264\327\001 \001(\tH\001\210\001\001B\026\n\024" + + "_disk_encryption_keyB\016\n\014_source_disk\"a\n\024" + + "SourceInstanceParams\022I\n\014disk_configs\030\317\331\252" + + "p \003(\01320.google.cloud.compute.v1.DiskInst" + + "antiationConfig\"\361\010\n\030SourceInstanceProper" + + "ties\022\037\n\016can_ip_forward\030\374\206\204\337\001 \001(\010H\000\210\001\001\022$\n" + + "\023deletion_protection\030\352\377\262\332\001 \001(\010H\001\210\001\001\022\034\n\013d" + + "escription\030\374\207\326\311\001 \001(\tH\002\210\001\001\022<\n\005disks\030\366\314\312- " + + "\003(\0132*.google.cloud.compute.v1.SavedAttac" + + "hedDisk\022J\n\022guest_accelerators\030\357\314\207\335\001 \003(\0132" + + "*.google.cloud.compute.v1.AcceleratorCon" + + "fig\022*\n\032key_revocation_action_type\030\342\334\300p \001" + + "(\tH\003\210\001\001\022Q\n\006labels\030\377\277\301\356\001 \003(\0132=.google.clo" + + "ud.compute.v1.SourceInstanceProperties.L" + + "abelsEntry\022\034\n\014machine_type\030\262\260\312l \001(\tH\004\210\001\001" + + "\022;\n\010metadata\030\257\366\265) \001(\0132!.google.cloud.com" + + "pute.v1.MetadataH\005\210\001\001\022 \n\020min_cpu_platfor" + + "m\030\367\233\352s \001(\tH\006\210\001\001\022H\n\022network_interfaces\030\213\332" + + "\222\031 \003(\0132).google.cloud.compute.v1.Network" + + "Interface\022@\n\nscheduling\030\224\313\261\270\001 \001(\0132#.goog" + + "le.cloud.compute.v1.SchedulingH\007\210\001\001\022E\n\020s" + + "ervice_accounts\030\260\304\253\204\001 \003(\0132\'.google.cloud" + + ".compute.v1.ServiceAccount\0223\n\004tags\030\231\350\330\001 " + + "\001(\0132\035.google.cloud.compute.v1.TagsH\010\210\001\001\032" + + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\"\215\001\n\027KeyRevocationActionType\022(\n$UN" + + "DEFINED_KEY_REVOCATION_ACTION_TYPE\020\000\022.\n&" + + "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\020\332" + + "\221\336\336\001\022\013\n\004NONE\020\270\316\222\001\022\013\n\004STOP\020\202\200\234\001B\021\n\017_can_i" + + "p_forwardB\026\n\024_deletion_protectionB\016\n\014_de" + + "scriptionB\035\n\033_key_revocation_action_type" + + "B\017\n\r_machine_typeB\013\n\t_metadataB\023\n\021_min_c" + + "pu_platformB\r\n\013_schedulingB\007\n\005_tags\"\240\006\n\016" + + "SslCertificate\022\034\n\013certificate\030\227\203\375\242\001 \001(\tH" + + "\000\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001" + + "\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\034\n\013expire" + + "_time\030\355\323\221\322\001 \001(\tH\003\210\001\001\022\020\n\002id\030\233\032 \001(\004H\004\210\001\001\022\024" + + "\n\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022V\n\007managed\030\237\237\244\216\001 \001(" + + "\0132<.google.cloud.compute.v1.SslCertifica" + + "teManagedSslCertificateH\006\210\001\001\022\024\n\004name\030\213\365\315" + + "\001 \001(\tH\007\210\001\001\022\034\n\013private_key\030\243\363\245\254\001 \001(\tH\010\210\001\001" + + "\022\026\n\006region\030\364\315\240B \001(\tH\t\210\001\001\022\032\n\tself_link\030\215\222" + + "\305\331\001 \001(\tH\n\210\001\001\022_\n\014self_managed\030\254\363\201\235\001 \001(\0132@" + + ".google.cloud.compute.v1.SslCertificateS" + + "elfManagedSslCertificateH\013\210\001\001\022%\n\031subject" + + "_alternative_names\030\343\357\223\374\001 \003(\t\022\024\n\004type\030\272\236\332" + + "\001 \001(\tH\014\210\001\001\"[\n\004Type\022\022\n\016UNDEFINED_TYPE\020\000\022\017" + + "\n\007MANAGED\020\377\266\322\344\001\022\024\n\014SELF_MANAGED\020\214\373\223\317\001\022\030\n" + + "\020TYPE_UNSPECIFIED\020\222\373\333\320\001B\016\n\014_certificateB" + + "\025\n\023_creation_timestampB\016\n\014_descriptionB\016" + + "\n\014_expire_timeB\005\n\003_idB\007\n\005_kindB\n\n\010_manag" + + "edB\007\n\005_nameB\016\n\014_private_keyB\t\n\007_regionB\014" + + "\n\n_self_linkB\017\n\r_self_managedB\007\n\005_type\"\313" + + "\003\n\034SslCertificateAggregatedList\022\020\n\002id\030\233\032" + + " \001(\tH\000\210\001\001\022R\n\005items\030\300\317\367/ \003(\0132@.google.clo" + + "ud.compute.v1.SslCertificateAggregatedLi" + + "st.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017n" + + "ext_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_lin" + + "k\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(" + + "\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.com" + + "pute.v1.WarningH\004\210\001\001\032`\n\nItemsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022A\n\005value\030\002 \001(\01322.google.cloud.co" + + "mpute.v1.SslCertificatesScopedList:\0028\001B\005" + + "\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_s" + + "elf_linkB\n\n\010_warning\"\255\002\n\022SslCertificateL" + + "ist\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0229\n\005items\030\300\317\367/ \003(\0132" + + "\'.google.cloud.compute.v1.SslCertificate" + + "\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_toke" + + "n\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003" + + "\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.c" + + "ompute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022" + "\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_war" - + "ning\"\255\002\n\022SslCertificateList\022\020\n\002id\030\233\032 \001(\t" - + "H\000\210\001\001\0229\n\005items\030\300\317\367/ \003(\0132\'.google.cloud.c" - + "ompute.v1.SslCertificate\022\024\n\004kind\030\224\367\310\001 \001(" - + "\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022" - + "\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234" - + "\337\226\030 \001(\0132 .google.cloud.compute.v1.Warnin" - + "gH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tok" - + "enB\014\n\n_self_linkB\n\n\010_warning\"\320\003\n#SslCert" - + "ificateManagedSslCertificate\022i\n\rdomain_s" - + "tatus\030\315\247\347\253\001 \003(\0132N.google.cloud.compute.v" - + "1.SslCertificateManagedSslCertificate.Do" - + "mainStatusEntry\022\022\n\007domains\030\257\210\233l \003(\t\022\026\n\006s" - + "tatus\030\362\237\267V \001(\tH\000\210\001\001\0323\n\021DomainStatusEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\321\001\n\006Sta" - + "tus\022\024\n\020UNDEFINED_STATUS\020\000\022\016\n\006ACTIVE\020\206\346\211\226" - + "\001\022.\n&MANAGED_CERTIFICATE_STATUS_UNSPECIF" - + "IED\020\322\305\263\342\001\022\024\n\014PROVISIONING\020\355\365\332\212\001\022\032\n\023PROVI" - + "SIONING_FAILED\020\317\253\320$\022\'\n\037PROVISIONING_FAIL" - + "ED_PERMANENTLY\020\253\360\222\203\001\022\026\n\016RENEWAL_FAILED\020\204" - + "\276\241\317\001B\t\n\007_status\"\205\001\n\'SslCertificateSelfMa" - + "nagedSslCertificate\022\034\n\013certificate\030\227\203\375\242\001" - + " \001(\tH\000\210\001\001\022\034\n\013private_key\030\243\363\245\254\001 \001(\tH\001\210\001\001B" - + "\016\n\014_certificateB\016\n\014_private_key\"\251\001\n\031SslC" - + "ertificatesScopedList\022E\n\020ssl_certificate" - + "s\030\217\242\303\256\001 \003(\0132\'.google.cloud.compute.v1.Ss" - + "lCertificate\0229\n\007warning\030\234\337\226\030 \001(\0132 .googl" - + "e.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_warn" - + "ing\"\340\003\n\031SslPoliciesAggregatedList\022\024\n\004eta" - + "g\030\225\322\276\001 \001(\tH\000\210\001\001\022\020\n\002id\030\233\032 \001(\tH\001\210\001\001\022O\n\005ite" - + "ms\030\300\317\367/ \003(\0132=.google.cloud.compute.v1.Ss" - + "lPoliciesAggregatedList.ItemsEntry\022\024\n\004ki" - + "nd\030\224\367\310\001 \001(\tH\002\210\001\001\022\037\n\017next_page_token\030\225\272\206&" - + " \001(\tH\003\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\004\210\001\001\022\027\n" - + "\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001" - + "(\0132 .google.cloud.compute.v1.WarningH\005\210\001" - + "\001\032\\\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 " - + "\001(\0132..google.cloud.compute.v1.SslPolicie" - + "sScopedList:\0028\001B\007\n\005_etagB\005\n\003_idB\007\n\005_kind" - + "B\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_w" - + "arning\"\245\002\n\017SslPoliciesList\022\020\n\002id\030\233\032 \001(\tH" - + "\000\210\001\001\0224\n\005items\030\300\317\367/ \003(\0132\".google.cloud.co" - + "mpute.v1.SslPolicy\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001" - + "\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tsel" - + "f_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(" - + "\0132 .google.cloud.compute.v1.WarningH\004\210\001\001" + + "ning\"\320\003\n#SslCertificateManagedSslCertifi" + + "cate\022i\n\rdomain_status\030\315\247\347\253\001 \003(\0132N.google" + + ".cloud.compute.v1.SslCertificateManagedS" + + "slCertificate.DomainStatusEntry\022\022\n\007domai" + + "ns\030\257\210\233l \003(\t\022\026\n\006status\030\362\237\267V \001(\tH\000\210\001\001\0323\n\021D" + + "omainStatusEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"\321\001\n\006Status\022\024\n\020UNDEFINED_STATUS\020" + + "\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022.\n&MANAGED_CERTIFICATE" + + "_STATUS_UNSPECIFIED\020\322\305\263\342\001\022\024\n\014PROVISIONIN" + + "G\020\355\365\332\212\001\022\032\n\023PROVISIONING_FAILED\020\317\253\320$\022\'\n\037P" + + "ROVISIONING_FAILED_PERMANENTLY\020\253\360\222\203\001\022\026\n\016" + + "RENEWAL_FAILED\020\204\276\241\317\001B\t\n\007_status\"\205\001\n\'SslC" + + "ertificateSelfManagedSslCertificate\022\034\n\013c" + + "ertificate\030\227\203\375\242\001 \001(\tH\000\210\001\001\022\034\n\013private_key" + + "\030\243\363\245\254\001 \001(\tH\001\210\001\001B\016\n\014_certificateB\016\n\014_priv" + + "ate_key\"\251\001\n\031SslCertificatesScopedList\022E\n" + + "\020ssl_certificates\030\217\242\303\256\001 \003(\0132\'.google.clo" + + "ud.compute.v1.SslCertificate\0229\n\007warning\030" + + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" + + "ngH\000\210\001\001B\n\n\010_warning\"\340\003\n\031SslPoliciesAggre" + + "gatedList\022\024\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\022\020\n\002id\030\233\032" + + " \001(\tH\001\210\001\001\022O\n\005items\030\300\317\367/ \003(\0132=.google.clo" + + "ud.compute.v1.SslPoliciesAggregatedList." + + "ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\002\210\001\001\022\037\n\017next" + + "_page_token\030\225\272\206& \001(\tH\003\210\001\001\022\032\n\tself_link\030\215" + + "\222\305\331\001 \001(\tH\004\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229" + + "\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comput" + + "e.v1.WarningH\005\210\001\001\032\\\n\nItemsEntry\022\013\n\003key\030\001" + + " \001(\t\022=\n\005value\030\002 \001(\0132..google.cloud.compu" + + "te.v1.SslPoliciesScopedList:\0028\001B\007\n\005_etag" + "B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n" - + "_self_linkB\n\n\010_warning\"?\n(SslPoliciesLis" - + "tAvailableFeaturesResponse\022\023\n\010features\030\275" - + "\310\263u \003(\t\"\233\001\n\025SslPoliciesScopedList\022;\n\014ssl" - + "_policies\030\243\344\215d \003(\0132\".google.cloud.comput" - + "e.v1.SslPolicy\0229\n\007warning\030\234\337\226\030 \001(\0132 .goo" - + "gle.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_wa" - + "rning\"\331\005\n\tSslPolicy\022\"\n\022creation_timestam" - + "p\030\266\217\307\016 \001(\tH\000\210\001\001\022\032\n\017custom_features\030\313\262\313\020 " - + "\003(\t\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\034\n\020ena" - + "bled_features\030\373\306\322\337\001 \003(\t\022\033\n\013fingerprint\030\344" - + "\321\363o \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224" - + "\367\310\001 \001(\tH\004\210\001\001\022\037\n\017min_tls_version\030\247\346\361\003 \001(\t" - + "H\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001\022\027\n\007profile\030\251" - + "\223\272l \001(\tH\007\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\010\210\001\001\022\032\n\t" - + "self_link\030\215\222\305\331\001 \001(\tH\t\210\001\001\0227\n\010warnings\030\327\210\301" - + "\355\001 \003(\0132!.google.cloud.compute.v1.Warning" - + "s\"^\n\rMinTlsVersion\022\035\n\031UNDEFINED_MIN_TLS_" - + "VERSION\020\000\022\016\n\007TLS_1_0\020\276\244\345\017\022\016\n\007TLS_1_1\020\277\244\345" - + "\017\022\016\n\007TLS_1_2\020\300\244\345\017\"e\n\007Profile\022\025\n\021UNDEFINE" - + "D_PROFILE\020\000\022\021\n\nCOMPATIBLE\020\324\215\303U\022\016\n\006CUSTOM" - + "\020\361\376\245\271\001\022\r\n\006MODERN\020\237\276\371>\022\021\n\nRESTRICTED\020\333\350\333|" - + "B\025\n\023_creation_timestampB\016\n\014_descriptionB" - + "\016\n\014_fingerprintB\005\n\003_idB\007\n\005_kindB\022\n\020_min_" - + "tls_versionB\007\n\005_nameB\n\n\010_profileB\t\n\007_reg" - + "ionB\014\n\n_self_link\"@\n\022SslPolicyReference\022" - + "\033\n\nssl_policy\030\305\375\340\214\001 \001(\tH\000\210\001\001B\r\n\013_ssl_pol" - + "icy\"\233\001\n\024StartInstanceRequest\022\030\n\010instance" - + "\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" - + "G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n" - + "\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_i" - + "d\"\265\002\n%StartWithEncryptionKeyInstanceRequ" - + "est\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022\206\001\n4instan" - + "ces_start_with_encryption_key_request_re" - + "source\030\377\376\317\322\001 \001(\0132?.google.cloud.compute." - + "v1.InstancesStartWithEncryptionKeyReques" - + "tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007projec" - + "t\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307" - + "\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"|\n\016Sta" - + "tefulPolicy\022V\n\017preserved_state\030\252\342\240\001 \001(\0132" - + "5.google.cloud.compute.v1.StatefulPolicy" - + "PreservedStateH\000\210\001\001B\022\n\020_preserved_state\"" - + "\341\001\n\034StatefulPolicyPreservedState\022R\n\005disk" - + "s\030\366\314\312- \003(\0132@.google.cloud.compute.v1.Sta" - + "tefulPolicyPreservedState.DisksEntry\032m\n\n" - + "DisksEntry\022\013\n\003key\030\001 \001(\t\022N\n\005value\030\002 \001(\0132?" - + ".google.cloud.compute.v1.StatefulPolicyP" - + "reservedStateDiskDevice:\0028\001\"\264\001\n&Stateful" - + "PolicyPreservedStateDiskDevice\022\034\n\013auto_d" - + "elete\030\273\344\316\335\001 \001(\tH\000\210\001\001\"\\\n\nAutoDelete\022\031\n\025UN" - + "DEFINED_AUTO_DELETE\020\000\022\014\n\005NEVER\020\354\244\257#\022%\n\036O" - + "N_PERMANENT_INSTANCE_DELETION\020\347\340\322-B\016\n\014_a" - + "uto_delete\"\324\001\n\023StopInstanceRequest\022\"\n\021di" - + "scard_local_ssd\030\317\351\255\230\001 \001(\010H\000\210\001\001\022\030\n\010instan" - + "ce\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A" - + "\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022" - + "\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\024\n\022_discard" - + "_local_ssdB\r\n\013_request_id\"\232\017\n\nSubnetwork" - + "\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013" - + "description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022 \n\020enable_flo" - + "w_logs\030\344\304\241H \001(\010H\002\210\001\001\022$\n\024external_ipv6_pr" - + "efix\030\366\222\266B \001(\tH\003\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001" - + "(\tH\004\210\001\001\022 \n\017gateway_address\030\371\211\244\333\001 \001(\tH\005\210\001" - + "\001\022\020\n\002id\030\233\032 \001(\004H\006\210\001\001\022%\n\024internal_ipv6_pre" - + "fix\030\350\242\264\361\001 \001(\tH\007\210\001\001\022\035\n\rip_cidr_range\030\312\315\344." - + " \001(\tH\010\210\001\001\022!\n\020ipv6_access_type\030\335\365\321\360\001 \001(\tH" - + "\t\210\001\001\022 \n\017ipv6_cidr_range\030\212\234\237\202\001 \001(\tH\n\210\001\001\022\024" - + "\n\004kind\030\224\367\310\001 \001(\tH\013\210\001\001\022I\n\nlog_config\030\235\321\301\247\001" - + " \001(\0132,.google.cloud.compute.v1.Subnetwor" - + "kLogConfigH\014\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\r\210\001\001\022\027\n" - + "\007network\030\256\264\205o \001(\tH\016\210\001\001\022)\n\030private_ip_goo" - + "gle_access\030\316\350\375\310\001 \001(\010H\017\210\001\001\022*\n\032private_ipv" - + "6_google_access\030\216\314\202\027 \001(\tH\020\210\001\001\022\030\n\007purpose" - + "\030\236\372\357\226\001 \001(\tH\021\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\022\210\001\001\022" - + "\024\n\004role\030\366\200\326\001 \001(\tH\023\210\001\001\022Q\n\023secondary_ip_ra" - + "nges\030\343\377\224A \003(\01321.google.cloud.compute.v1." - + "SubnetworkSecondaryRange\022\032\n\tself_link\030\215\222" - + "\305\331\001 \001(\tH\024\210\001\001\022\033\n\nstack_type\030\221\265\213\313\001 \001(\tH\025\210\001" - + "\001\022\025\n\005state\030\221\211\2534 \001(\tH\026\210\001\001\"y\n\016Ipv6AccessTy" - + "pe\022\036\n\032UNDEFINED_IPV6_ACCESS_TYPE\020\000\022\017\n\010EX" - + "TERNAL\020\313\247\375\020\022\020\n\010INTERNAL\020\275\355\226\205\001\022$\n\034UNSPECI" - + "FIED_IPV6_ACCESS_TYPE\020\245\366\244\225\001\"\276\001\n\027PrivateI" - + "pv6GoogleAccess\022(\n$UNDEFINED_PRIVATE_IPV" - + "6_GOOGLE_ACCESS\020\000\022\035\n\025DISABLE_GOOGLE_ACCE" - + "SS\020\363\251\204\327\001\022-\n%ENABLE_BIDIRECTIONAL_ACCESS_" - + "TO_GOOGLE\020\272\312\211\314\001\022+\n#ENABLE_OUTBOUND_VM_AC" - + "CESS_TO_GOOGLE\020\327\372\266\211\001\"\256\001\n\007Purpose\022\025\n\021UNDE" - + "FINED_PURPOSE\020\000\022#\n\034INTERNAL_HTTPS_LOAD_B" - + "ALANCER\020\331\266\316v\022\017\n\007PRIVATE\020\343\342\262\300\001\022\027\n\020PRIVATE" - + "_RFC_1918\020\333\376\305y\022\036\n\027PRIVATE_SERVICE_CONNEC" - + "T\020\304\364\371\026\022\035\n\026REGIONAL_MANAGED_PROXY\020\356\266\375H\":\n" - + "\004Role\022\022\n\016UNDEFINED_ROLE\020\000\022\016\n\006ACTIVE\020\206\346\211\226" - + "\001\022\016\n\006BACKUP\020\302\323\315\242\001\"i\n\tStackType\022\030\n\024UNDEFI" - + "NED_STACK_TYPE\020\000\022\020\n\tIPV4_IPV6\020\201\350\312\n\022\020\n\tIP" - + "V4_ONLY\020\246\313\325\n\022\036\n\026UNSPECIFIED_STACK_TYPE\020\331" - + "\321\221\216\001\"<\n\005State\022\023\n\017UNDEFINED_STATE\020\000\022\020\n\010DR" - + "AINING\020\352\325\214\345\001\022\014\n\005READY\020\203\303\217%B\025\n\023_creation_" - + "timestampB\016\n\014_descriptionB\023\n\021_enable_flo" - + "w_logsB\027\n\025_external_ipv6_prefixB\016\n\014_fing" - + "erprintB\022\n\020_gateway_addressB\005\n\003_idB\027\n\025_i" - + "nternal_ipv6_prefixB\020\n\016_ip_cidr_rangeB\023\n" - + "\021_ipv6_access_typeB\022\n\020_ipv6_cidr_rangeB\007" - + "\n\005_kindB\r\n\013_log_configB\007\n\005_nameB\n\n\010_netw" - + "orkB\033\n\031_private_ip_google_accessB\035\n\033_pri" - + "vate_ipv6_google_accessB\n\n\010_purposeB\t\n\007_" - + "regionB\007\n\005_roleB\014\n\n_self_linkB\r\n\013_stack_" - + "typeB\010\n\006_state\"\277\003\n\030SubnetworkAggregatedL" - + "ist\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022N\n\005items\030\300\317\367/ \003(\0132" - + "<.google.cloud.compute.v1.SubnetworkAggr" - + "egatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001" - + "\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\t" - + "self_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables" - + "\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.c" - + "loud.compute.v1.WarningH\004\210\001\001\032\\\n\nItemsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..google." - + "cloud.compute.v1.SubnetworksScopedList:\002" - + "8\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014" - + "\n\n_self_linkB\n\n\010_warning\"\245\002\n\016SubnetworkL" - + "ist\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0225\n\005items\030\300\317\367/ \003(\0132" - + "#.google.cloud.compute.v1.Subnetwork\022\024\n\004" - + "kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272" - + "\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022" - + "9\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compu" - + "te.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_n" - + "ext_page_tokenB\014\n\n_self_linkB\n\n\010_warning" - + "\"\335\004\n\023SubnetworkLogConfig\022$\n\024aggregation_" - + "interval\030\202\233\264S \001(\tH\000\210\001\001\022\027\n\006enable\030\203\313\324\224\001 \001" - + "(\010H\001\210\001\001\022\033\n\013filter_expr\030\334\244\270W \001(\tH\002\210\001\001\022\036\n\r" - + "flow_sampling\030\330\347\345\374\001 \001(\002H\003\210\001\001\022\030\n\010metadata" - + "\030\257\366\265) \001(\tH\004\210\001\001\022\033\n\017metadata_fields\030\311\273\273\264\001 " - + "\003(\t\"\310\001\n\023AggregationInterval\022\"\n\036UNDEFINED" - + "_AGGREGATION_INTERVAL\020\000\022\027\n\017INTERVAL_10_M" - + "IN\020\314\321\245\350\001\022\027\n\017INTERVAL_15_MIN\020\321\274\277\352\001\022\025\n\016INT" - + "ERVAL_1_MIN\020\252\322\366 \022\026\n\017INTERVAL_30_SEC\020\211\340\314\003" - + "\022\025\n\016INTERVAL_5_MIN\020\256\216\330\"\022\025\n\016INTERVAL_5_SE" - + "C\020\255\272\330\"\"u\n\010Metadata\022\026\n\022UNDEFINED_METADATA" - + "\020\000\022\026\n\017CUSTOM_METADATA\020\275\330\343\035\022\034\n\024EXCLUDE_AL" - + "L_METADATA\020\222\275\301\237\001\022\033\n\024INCLUDE_ALL_METADATA" - + "\020\204\315\277NB\027\n\025_aggregation_intervalB\t\n\007_enabl" - + "eB\016\n\014_filter_exprB\020\n\016_flow_samplingB\013\n\t_" - + "metadata\"w\n\030SubnetworkSecondaryRange\022\035\n\r" - + "ip_cidr_range\030\312\315\344. \001(\tH\000\210\001\001\022\033\n\nrange_nam" - + "e\030\315\360\264\236\001 \001(\tH\001\210\001\001B\020\n\016_ip_cidr_rangeB\r\n\013_r" - + "ange_name\"V\n#SubnetworksExpandIpCidrRang" - + "eRequest\022\035\n\rip_cidr_range\030\312\315\344. \001(\tH\000\210\001\001B" - + "\020\n\016_ip_cidr_range\"\234\001\n\025SubnetworksScopedL" - + "ist\022<\n\013subnetworks\030\305\324\245\306\001 \003(\0132#.google.cl" - + "oud.compute.v1.Subnetwork\0229\n\007warning\030\234\337\226" - + "\030 \001(\0132 .google.cloud.compute.v1.WarningH" - + "\000\210\001\001B\n\n\010_warning\"t\n*SubnetworksSetPrivat" - + "eIpGoogleAccessRequest\022)\n\030private_ip_goo" - + "gle_access\030\316\350\375\310\001 \001(\010H\000\210\001\001B\033\n\031_private_ip" - + "_google_access\"\177\n\nSubsetting\022\026\n\006policy\030\262" - + "\312\266+ \001(\tH\000\210\001\001\"N\n\006Policy\022\024\n\020UNDEFINED_POLI" - + "CY\020\000\022!\n\032CONSISTENT_HASH_SUBSETTING\020\264\230\3743\022" - + "\013\n\004NONE\020\270\316\222\001B\t\n\007_policy\"\327\001\n\026SuspendInsta" + + "_self_linkB\n\n\010_warning\"\245\002\n\017SslPoliciesLi" + + "st\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0224\n\005items\030\300\317\367/ \003(\0132\"" + + ".google.cloud.compute.v1.SslPolicy\022\024\n\004ki" + + "nd\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206&" + + " \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n" + + "\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compute" + + ".v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_nex" + + "t_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"?" + + "\n(SslPoliciesListAvailableFeaturesRespon" + + "se\022\023\n\010features\030\275\310\263u \003(\t\"\233\001\n\025SslPoliciesS" + + "copedList\022;\n\014ssl_policies\030\243\344\215d \003(\0132\".goo" + + "gle.cloud.compute.v1.SslPolicy\0229\n\007warnin" + + "g\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.War" + + "ningH\000\210\001\001B\n\n\010_warning\"\331\005\n\tSslPolicy\022\"\n\022c" + + "reation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\032\n\017custo" + + "m_features\030\313\262\313\020 \003(\t\022\034\n\013description\030\374\207\326\311\001" + + " \001(\tH\001\210\001\001\022\034\n\020enabled_features\030\373\306\322\337\001 \003(\t\022" + + "\033\n\013fingerprint\030\344\321\363o \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(" + + "\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\037\n\017min_tls_" + + "version\030\247\346\361\003 \001(\tH\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006" + + "\210\001\001\022\027\n\007profile\030\251\223\272l \001(\tH\007\210\001\001\022\026\n\006region\030\364" + + "\315\240B \001(\tH\010\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\t\210\001\001" + + "\0227\n\010warnings\030\327\210\301\355\001 \003(\0132!.google.cloud.co" + + "mpute.v1.Warnings\"^\n\rMinTlsVersion\022\035\n\031UN" + + "DEFINED_MIN_TLS_VERSION\020\000\022\016\n\007TLS_1_0\020\276\244\345" + + "\017\022\016\n\007TLS_1_1\020\277\244\345\017\022\016\n\007TLS_1_2\020\300\244\345\017\"e\n\007Pro" + + "file\022\025\n\021UNDEFINED_PROFILE\020\000\022\021\n\nCOMPATIBL" + + "E\020\324\215\303U\022\016\n\006CUSTOM\020\361\376\245\271\001\022\r\n\006MODERN\020\237\276\371>\022\021\n" + + "\nRESTRICTED\020\333\350\333|B\025\n\023_creation_timestampB" + + "\016\n\014_descriptionB\016\n\014_fingerprintB\005\n\003_idB\007" + + "\n\005_kindB\022\n\020_min_tls_versionB\007\n\005_nameB\n\n\010" + + "_profileB\t\n\007_regionB\014\n\n_self_link\"@\n\022Ssl" + + "PolicyReference\022\033\n\nssl_policy\030\305\375\340\214\001 \001(\tH" + + "\000\210\001\001B\r\n\013_ssl_policy\"\233\001\n\024StartInstanceReq" + + "uest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007projec" + + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030" + + "\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zo" + + "neB\r\n\013_request_id\"\265\002\n%StartWithEncryptio" + + "nKeyInstanceRequest\022\030\n\010instance\030\225\251\332\010 \001(\t" + + "B\003\340A\002\022\206\001\n4instances_start_with_encryptio" + + "n_key_request_resource\030\377\376\317\322\001 \001(\0132?.googl" + + "e.cloud.compute.v1.InstancesStartWithEnc" + + "ryptionKeyRequestB\003\340A\002\022!\n\007project\030\231\226\301l \001" + + "(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\t" + + "H\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_r" + + "equest_id\"|\n\016StatefulPolicy\022V\n\017preserved" + + "_state\030\252\342\240\001 \001(\01325.google.cloud.compute.v" + + "1.StatefulPolicyPreservedStateH\000\210\001\001B\022\n\020_" + + "preserved_state\"\341\001\n\034StatefulPolicyPreser" + + "vedState\022R\n\005disks\030\366\314\312- \003(\0132@.google.clou" + + "d.compute.v1.StatefulPolicyPreservedStat" + + "e.DisksEntry\032m\n\nDisksEntry\022\013\n\003key\030\001 \001(\t\022" + + "N\n\005value\030\002 \001(\0132?.google.cloud.compute.v1" + + ".StatefulPolicyPreservedStateDiskDevice:" + + "\0028\001\"\264\001\n&StatefulPolicyPreservedStateDisk" + + "Device\022\034\n\013auto_delete\030\273\344\316\335\001 \001(\tH\000\210\001\001\"\\\n\n" + + "AutoDelete\022\031\n\025UNDEFINED_AUTO_DELETE\020\000\022\014\n" + + "\005NEVER\020\354\244\257#\022%\n\036ON_PERMANENT_INSTANCE_DEL" + + "ETION\020\347\340\322-B\016\n\014_auto_delete\"\324\001\n\023StopInsta" + "nceRequest\022\"\n\021discard_local_ssd\030\317\351\255\230\001 \001(" + "\010H\000\210\001\001\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007proj" + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_i" + "d\030\313\201\331\021 \001(\tH\001\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004" + "zoneB\024\n\022_discard_local_ssdB\r\n\013_request_i" - + "d\"\211\001\n SwitchToCustomModeNetworkRequest\022\027" - + "\n\007network\030\256\264\205o \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l " - + "\001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001B\r\n\013_request_id\"\330\003\n\016TCPHealthCheck" - + "\022\024\n\004port\030\201\261\322\001 \001(\005H\000\210\001\001\022\031\n\tport_name\030\211\207\347\023" - + " \001(\tH\001\210\001\001\022\"\n\022port_specification\030\305\353\314\030 \001(\t" - + "H\002\210\001\001\022\034\n\014proxy_header\030\376\272\274L \001(\tH\003\210\001\001\022\027\n\007r" - + "equest\030\217\345\273\n \001(\tH\004\210\001\001\022\030\n\010response\030\301\250\334] \001(" - + "\tH\005\210\001\001\"~\n\021PortSpecification\022 \n\034UNDEFINED" - + "_PORT_SPECIFICATION\020\000\022\025\n\016USE_FIXED_PORT\020" - + "\344\210\333Z\022\026\n\016USE_NAMED_PORT\020\277\317\307\246\001\022\030\n\020USE_SERV" - + "ING_PORT\020\314\321\365\254\001\"H\n\013ProxyHeader\022\032\n\026UNDEFIN" - + "ED_PROXY_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_" - + "V1\020\254\244\267\237\001B\007\n\005_portB\014\n\n_port_nameB\025\n\023_port" - + "_specificationB\017\n\r_proxy_headerB\n\n\010_requ" - + "estB\013\n\t_response\"E\n\004Tags\022\033\n\013fingerprint\030" - + "\344\321\363o \001(\tH\000\210\001\001\022\020\n\005items\030\300\317\367/ \003(\tB\016\n\014_fing" - + "erprint\"\312\003\n\017TargetGrpcProxy\022\"\n\022creation_" + + "d\"\232\017\n\nSubnetwork\022\"\n\022creation_timestamp\030\266" + + "\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210" + + "\001\001\022 \n\020enable_flow_logs\030\344\304\241H \001(\010H\002\210\001\001\022$\n\024" + + "external_ipv6_prefix\030\366\222\266B \001(\tH\003\210\001\001\022\033\n\013fi" + + "ngerprint\030\344\321\363o \001(\tH\004\210\001\001\022 \n\017gateway_addre" + + "ss\030\371\211\244\333\001 \001(\tH\005\210\001\001\022\020\n\002id\030\233\032 \001(\004H\006\210\001\001\022%\n\024i" + + "nternal_ipv6_prefix\030\350\242\264\361\001 \001(\tH\007\210\001\001\022\035\n\rip" + + "_cidr_range\030\312\315\344. \001(\tH\010\210\001\001\022!\n\020ipv6_access" + + "_type\030\335\365\321\360\001 \001(\tH\t\210\001\001\022 \n\017ipv6_cidr_range\030" + + "\212\234\237\202\001 \001(\tH\n\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\013\210\001\001\022I\n\n" + + "log_config\030\235\321\301\247\001 \001(\0132,.google.cloud.comp" + + "ute.v1.SubnetworkLogConfigH\014\210\001\001\022\024\n\004name\030" + + "\213\365\315\001 \001(\tH\r\210\001\001\022\027\n\007network\030\256\264\205o \001(\tH\016\210\001\001\022)" + + "\n\030private_ip_google_access\030\316\350\375\310\001 \001(\010H\017\210\001" + + "\001\022*\n\032private_ipv6_google_access\030\216\314\202\027 \001(\t" + + "H\020\210\001\001\022\030\n\007purpose\030\236\372\357\226\001 \001(\tH\021\210\001\001\022\026\n\006regio" + + "n\030\364\315\240B \001(\tH\022\210\001\001\022\024\n\004role\030\366\200\326\001 \001(\tH\023\210\001\001\022Q\n" + + "\023secondary_ip_ranges\030\343\377\224A \003(\01321.google.c" + + "loud.compute.v1.SubnetworkSecondaryRange" + + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\024\210\001\001\022\033\n\nstack_ty" + + "pe\030\221\265\213\313\001 \001(\tH\025\210\001\001\022\025\n\005state\030\221\211\2534 \001(\tH\026\210\001\001" + + "\"y\n\016Ipv6AccessType\022\036\n\032UNDEFINED_IPV6_ACC" + + "ESS_TYPE\020\000\022\017\n\010EXTERNAL\020\313\247\375\020\022\020\n\010INTERNAL\020" + + "\275\355\226\205\001\022$\n\034UNSPECIFIED_IPV6_ACCESS_TYPE\020\245\366" + + "\244\225\001\"\276\001\n\027PrivateIpv6GoogleAccess\022(\n$UNDEF" + + "INED_PRIVATE_IPV6_GOOGLE_ACCESS\020\000\022\035\n\025DIS" + + "ABLE_GOOGLE_ACCESS\020\363\251\204\327\001\022-\n%ENABLE_BIDIR" + + "ECTIONAL_ACCESS_TO_GOOGLE\020\272\312\211\314\001\022+\n#ENABL" + + "E_OUTBOUND_VM_ACCESS_TO_GOOGLE\020\327\372\266\211\001\"\256\001\n" + + "\007Purpose\022\025\n\021UNDEFINED_PURPOSE\020\000\022#\n\034INTER" + + "NAL_HTTPS_LOAD_BALANCER\020\331\266\316v\022\017\n\007PRIVATE\020" + + "\343\342\262\300\001\022\027\n\020PRIVATE_RFC_1918\020\333\376\305y\022\036\n\027PRIVAT" + + "E_SERVICE_CONNECT\020\304\364\371\026\022\035\n\026REGIONAL_MANAG" + + "ED_PROXY\020\356\266\375H\":\n\004Role\022\022\n\016UNDEFINED_ROLE\020" + + "\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\016\n\006BACKUP\020\302\323\315\242\001\"i\n\tSta" + + "ckType\022\030\n\024UNDEFINED_STACK_TYPE\020\000\022\020\n\tIPV4" + + "_IPV6\020\201\350\312\n\022\020\n\tIPV4_ONLY\020\246\313\325\n\022\036\n\026UNSPECIF" + + "IED_STACK_TYPE\020\331\321\221\216\001\"<\n\005State\022\023\n\017UNDEFIN" + + "ED_STATE\020\000\022\020\n\010DRAINING\020\352\325\214\345\001\022\014\n\005READY\020\203\303" + + "\217%B\025\n\023_creation_timestampB\016\n\014_descriptio" + + "nB\023\n\021_enable_flow_logsB\027\n\025_external_ipv6" + + "_prefixB\016\n\014_fingerprintB\022\n\020_gateway_addr" + + "essB\005\n\003_idB\027\n\025_internal_ipv6_prefixB\020\n\016_" + + "ip_cidr_rangeB\023\n\021_ipv6_access_typeB\022\n\020_i" + + "pv6_cidr_rangeB\007\n\005_kindB\r\n\013_log_configB\007" + + "\n\005_nameB\n\n\010_networkB\033\n\031_private_ip_googl" + + "e_accessB\035\n\033_private_ipv6_google_accessB" + + "\n\n\010_purposeB\t\n\007_regionB\007\n\005_roleB\014\n\n_self" + + "_linkB\r\n\013_stack_typeB\010\n\006_state\"\277\003\n\030Subne" + + "tworkAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022N\n" + + "\005items\030\300\317\367/ \003(\0132<.google.cloud.compute.v" + + "1.SubnetworkAggregatedList.ItemsEntry\022\024\n" + + "\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225" + + "\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001" + + "\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226" + + "\030 \001(\0132 .google.cloud.compute.v1.WarningH" + + "\004\210\001\001\032\\\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value" + + "\030\002 \001(\0132..google.cloud.compute.v1.Subnetw" + + "orksScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_n" + + "ext_page_tokenB\014\n\n_self_linkB\n\n\010_warning" + + "\"\245\002\n\016SubnetworkList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0225\n" + + "\005items\030\300\317\367/ \003(\0132#.google.cloud.compute.v" + + "1.Subnetwork\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" + + "xt_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link" + + "\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .go" + + "ogle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_i" + + "dB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_" + + "linkB\n\n\010_warning\"\335\004\n\023SubnetworkLogConfig" + + "\022$\n\024aggregation_interval\030\202\233\264S \001(\tH\000\210\001\001\022\027" + + "\n\006enable\030\203\313\324\224\001 \001(\010H\001\210\001\001\022\033\n\013filter_expr\030\334" + + "\244\270W \001(\tH\002\210\001\001\022\036\n\rflow_sampling\030\330\347\345\374\001 \001(\002H" + + "\003\210\001\001\022\030\n\010metadata\030\257\366\265) \001(\tH\004\210\001\001\022\033\n\017metada" + + "ta_fields\030\311\273\273\264\001 \003(\t\"\310\001\n\023AggregationInter" + + "val\022\"\n\036UNDEFINED_AGGREGATION_INTERVAL\020\000\022" + + "\027\n\017INTERVAL_10_MIN\020\314\321\245\350\001\022\027\n\017INTERVAL_15_" + + "MIN\020\321\274\277\352\001\022\025\n\016INTERVAL_1_MIN\020\252\322\366 \022\026\n\017INTE" + + "RVAL_30_SEC\020\211\340\314\003\022\025\n\016INTERVAL_5_MIN\020\256\216\330\"\022" + + "\025\n\016INTERVAL_5_SEC\020\255\272\330\"\"u\n\010Metadata\022\026\n\022UN" + + "DEFINED_METADATA\020\000\022\026\n\017CUSTOM_METADATA\020\275\330" + + "\343\035\022\034\n\024EXCLUDE_ALL_METADATA\020\222\275\301\237\001\022\033\n\024INCL" + + "UDE_ALL_METADATA\020\204\315\277NB\027\n\025_aggregation_in" + + "tervalB\t\n\007_enableB\016\n\014_filter_exprB\020\n\016_fl" + + "ow_samplingB\013\n\t_metadata\"w\n\030SubnetworkSe" + + "condaryRange\022\035\n\rip_cidr_range\030\312\315\344. \001(\tH\000" + + "\210\001\001\022\033\n\nrange_name\030\315\360\264\236\001 \001(\tH\001\210\001\001B\020\n\016_ip_" + + "cidr_rangeB\r\n\013_range_name\"V\n#Subnetworks" + + "ExpandIpCidrRangeRequest\022\035\n\rip_cidr_rang" + + "e\030\312\315\344. \001(\tH\000\210\001\001B\020\n\016_ip_cidr_range\"\234\001\n\025Su" + + "bnetworksScopedList\022<\n\013subnetworks\030\305\324\245\306\001" + + " \003(\0132#.google.cloud.compute.v1.Subnetwor" + + "k\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.com" + + "pute.v1.WarningH\000\210\001\001B\n\n\010_warning\"t\n*Subn" + + "etworksSetPrivateIpGoogleAccessRequest\022)" + + "\n\030private_ip_google_access\030\316\350\375\310\001 \001(\010H\000\210\001" + + "\001B\033\n\031_private_ip_google_access\"\177\n\nSubset" + + "ting\022\026\n\006policy\030\262\312\266+ \001(\tH\000\210\001\001\"N\n\006Policy\022\024" + + "\n\020UNDEFINED_POLICY\020\000\022!\n\032CONSISTENT_HASH_" + + "SUBSETTING\020\264\230\3743\022\013\n\004NONE\020\270\316\222\001B\t\n\007_policy\"" + + "\327\001\n\026SuspendInstanceRequest\022\"\n\021discard_lo" + + "cal_ssd\030\317\351\255\230\001 \001(\010H\000\210\001\001\022\030\n\010instance\030\225\251\332\010 " + + "\001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" + + "ect\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\033\n\004zone\030" + + "\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\024\n\022_discard_local_s" + + "sdB\r\n\013_request_id\"\211\001\n SwitchToCustomMode" + + "NetworkRequest\022\027\n\007network\030\256\264\205o \001(\tB\003\340A\002\022" + + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" + + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\330\003" + + "\n\016TCPHealthCheck\022\024\n\004port\030\201\261\322\001 \001(\005H\000\210\001\001\022\031" + + "\n\tport_name\030\211\207\347\023 \001(\tH\001\210\001\001\022\"\n\022port_specif" + + "ication\030\305\353\314\030 \001(\tH\002\210\001\001\022\034\n\014proxy_header\030\376\272" + + "\274L \001(\tH\003\210\001\001\022\027\n\007request\030\217\345\273\n \001(\tH\004\210\001\001\022\030\n\010" + + "response\030\301\250\334] \001(\tH\005\210\001\001\"~\n\021PortSpecificat" + + "ion\022 \n\034UNDEFINED_PORT_SPECIFICATION\020\000\022\025\n" + + "\016USE_FIXED_PORT\020\344\210\333Z\022\026\n\016USE_NAMED_PORT\020\277" + + "\317\307\246\001\022\030\n\020USE_SERVING_PORT\020\314\321\365\254\001\"H\n\013ProxyH" + + "eader\022\032\n\026UNDEFINED_PROXY_HEADER\020\000\022\013\n\004NON" + + "E\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237\001B\007\n\005_portB\014\n\n_po" + + "rt_nameB\025\n\023_port_specificationB\017\n\r_proxy" + + "_headerB\n\n\010_requestB\013\n\t_response\"E\n\004Tags" + + "\022\033\n\013fingerprint\030\344\321\363o \001(\tH\000\210\001\001\022\020\n\005items\030\300" + + "\317\367/ \003(\tB\016\n\014_fingerprint\"\312\003\n\017TargetGrpcPr" + + "oxy\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022" + + "\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\033\n\013fingerp" + + "rint\030\344\321\363o \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004" + + "kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001" + + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\006\210\001\001\022!\n\021self_lin" + + "k_with_id\030\202\254\235\025 \001(\tH\007\210\001\001\022\030\n\007url_map\030\214\225\201\257\001" + + " \001(\tH\010\210\001\001\022&\n\026validate_for_proxyless\030\250\343\3060" + + " \001(\010H\t\210\001\001B\025\n\023_creation_timestampB\016\n\014_des" + + "criptionB\016\n\014_fingerprintB\005\n\003_idB\007\n\005_kind" + + "B\007\n\005_nameB\014\n\n_self_linkB\024\n\022_self_link_wi" + + "th_idB\n\n\010_url_mapB\031\n\027_validate_for_proxy" + + "less\"\257\002\n\023TargetGrpcProxyList\022\020\n\002id\030\233\032 \001(" + + "\tH\000\210\001\001\022:\n\005items\030\300\317\367/ \003(\0132(.google.cloud." + + "compute.v1.TargetGrpcProxy\022\024\n\004kind\030\224\367\310\001 " + + "\001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001" + + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning" + + "\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warn" + + "ingH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_t" + + "okenB\014\n\n_self_linkB\n\n\010_warning\"\256\001\n\033Targe" + + "tHttpProxiesScopedList\022H\n\023target_http_pr" + + "oxies\030\303\325\250M \003(\0132(.google.cloud.compute.v1" + + ".TargetHttpProxy\0229\n\007warning\030\234\337\226\030 \001(\0132 .g" + + "oogle.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_" + + "warning\"\235\003\n\017TargetHttpProxy\022\"\n\022creation_" + "timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374" + "\207\326\311\001 \001(\tH\001\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\002\210" + "\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210" - + "\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\032\n\tself_link\030\215\222" - + "\305\331\001 \001(\tH\006\210\001\001\022!\n\021self_link_with_id\030\202\254\235\025 \001" - + "(\tH\007\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tH\010\210\001\001\022&\n\026val" - + "idate_for_proxyless\030\250\343\3060 \001(\010H\t\210\001\001B\025\n\023_cr" - + "eation_timestampB\016\n\014_descriptionB\016\n\014_fin" - + "gerprintB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\014\n\n_se" - + "lf_linkB\024\n\022_self_link_with_idB\n\n\010_url_ma" - + "pB\031\n\027_validate_for_proxyless\"\257\002\n\023TargetG" - + "rpcProxyList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022:\n\005items\030" - + "\300\317\367/ \003(\0132(.google.cloud.compute.v1.Targe" - + "tGrpcProxy\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next" - + "_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215" - + "\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .goog" - + "le.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB" - + "\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_li" - + "nkB\n\n\010_warning\"\256\001\n\033TargetHttpProxiesScop" - + "edList\022H\n\023target_http_proxies\030\303\325\250M \003(\0132(" + + "\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\033\n\nproxy_bind\030\356" + + "\316\261\210\001 \001(\010H\006\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022\032\n" + + "\tself_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022\030\n\007url_map\030\214\225\201" + + "\257\001 \001(\tH\t\210\001\001B\025\n\023_creation_timestampB\016\n\014_d" + + "escriptionB\016\n\014_fingerprintB\005\n\003_idB\007\n\005_ki" + + "ndB\007\n\005_nameB\r\n\013_proxy_bindB\t\n\007_regionB\014\n" + + "\n_self_linkB\n\n\010_url_map\"\210\003\n\035TargetHttpPr" + + "oxyAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022S\n\005i" + + "tems\030\300\317\367/ \003(\0132A.google.cloud.compute.v1." + + "TargetHttpProxyAggregatedList.ItemsEntry" + + "\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_toke" + + "n\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003" + + "\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\032b\n\nItemsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022C\n\005value\030\002 \001(\01324.google." + + "cloud.compute.v1.TargetHttpProxiesScoped" + + "List:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_t" + + "okenB\014\n\n_self_link\"\257\002\n\023TargetHttpProxyLi" + + "st\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022:\n\005items\030\300\317\367/ \003(\0132(" + ".google.cloud.compute.v1.TargetHttpProxy" - + "\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comp" - + "ute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\235\003\n\017Targ" - + "etHttpProxy\022\"\n\022creation_timestamp\030\266\217\307\016 \001" - + "(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\033\n" - + "\013fingerprint\030\344\321\363o \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H" - + "\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 " - + "\001(\tH\005\210\001\001\022\033\n\nproxy_bind\030\356\316\261\210\001 \001(\010H\006\210\001\001\022\026\n" - + "\006region\030\364\315\240B \001(\tH\007\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" - + " \001(\tH\010\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tH\t\210\001\001B\025\n\023_" - + "creation_timestampB\016\n\014_descriptionB\016\n\014_f" - + "ingerprintB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\r\n\013_" - + "proxy_bindB\t\n\007_regionB\014\n\n_self_linkB\n\n\010_" - + "url_map\"\210\003\n\035TargetHttpProxyAggregatedLis" - + "t\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022S\n\005items\030\300\317\367/ \003(\0132A." - + "google.cloud.compute.v1.TargetHttpProxyA" - + "ggregatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(" - + "\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022" - + "\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachab" - + "les\030\237\240\206t \003(\t\032b\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022" - + "C\n\005value\030\002 \001(\01324.google.cloud.compute.v1" - + ".TargetHttpProxiesScopedList:\0028\001B\005\n\003_idB" - + "\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_li" - + "nk\"\257\002\n\023TargetHttpProxyList\022\020\n\002id\030\233\032 \001(\tH" - + "\000\210\001\001\022:\n\005items\030\300\317\367/ \003(\0132(.google.cloud.co" - + "mpute.v1.TargetHttpProxy\022\024\n\004kind\030\224\367\310\001 \001(" - + "\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022" - + "\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234" - + "\337\226\030 \001(\0132 .google.cloud.compute.v1.Warnin" - + "gH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tok" - + "enB\014\n\n_self_linkB\n\n\010_warning\"\262\001\n\034TargetH" - + "ttpsProxiesScopedList\022K\n\024target_https_pr" - + "oxies\030\212\374\347\256\001 \003(\0132).google.cloud.compute.v" - + "1.TargetHttpsProxy\0229\n\007warning\030\234\337\226\030 \001(\0132 " - + ".google.cloud.compute.v1.WarningH\000\210\001\001B\n\n" - + "\010_warning\"a\n*TargetHttpsProxiesSetCertif" - + "icateMapRequest\022\037\n\017certificate_map\030\264\345\315J " - + "\001(\tH\000\210\001\001B\022\n\020_certificate_map\"\266\001\n(TargetH" - + "ttpsProxiesSetQuicOverrideRequest\022\036\n\rqui" - + "c_override\030\255\241\333\331\001 \001(\tH\000\210\001\001\"X\n\014QuicOverrid" - + "e\022\033\n\027UNDEFINED_QUIC_OVERRIDE\020\000\022\016\n\007DISABL" - + "E\020\310\335\246s\022\016\n\006ENABLE\020\203\263\240\321\001\022\013\n\004NONE\020\270\316\222\001B\020\n\016_" - + "quic_override\"K\n+TargetHttpsProxiesSetSs" - + "lCertificatesRequest\022\034\n\020ssl_certificates" - + "\030\217\242\303\256\001 \003(\t\"\242\006\n\020TargetHttpsProxy\022$\n\024autho" - + "rization_policy\030\270\357\227\020 \001(\tH\000\210\001\001\022\037\n\017certifi" - + "cate_map\030\264\345\315J \001(\tH\001\210\001\001\022\"\n\022creation_times" - + "tamp\030\266\217\307\016 \001(\tH\002\210\001\001\022\034\n\013description\030\374\207\326\311\001 " - + "\001(\tH\003\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001(\tH\004\210\001\001\022\020\n" - + "\002id\030\233\032 \001(\004H\005\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\006\210\001\001\022\024\n" - + "\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022\033\n\nproxy_bind\030\356\316\261\210\001 " - + "\001(\010H\010\210\001\001\022\036\n\rquic_override\030\255\241\333\331\001 \001(\tH\t\210\001\001" - + "\022\026\n\006region\030\364\315\240B \001(\tH\n\210\001\001\022\032\n\tself_link\030\215\222" - + "\305\331\001 \001(\tH\013\210\001\001\022\"\n\021server_tls_policy\030\362\336\207\215\001 " - + "\001(\tH\014\210\001\001\022\034\n\020ssl_certificates\030\217\242\303\256\001 \003(\t\022\033" - + "\n\nssl_policy\030\305\375\340\214\001 \001(\tH\r\210\001\001\022\030\n\007url_map\030\214" - + "\225\201\257\001 \001(\tH\016\210\001\001\"X\n\014QuicOverride\022\033\n\027UNDEFIN" - + "ED_QUIC_OVERRIDE\020\000\022\016\n\007DISABLE\020\310\335\246s\022\016\n\006EN" - + "ABLE\020\203\263\240\321\001\022\013\n\004NONE\020\270\316\222\001B\027\n\025_authorizatio" - + "n_policyB\022\n\020_certificate_mapB\025\n\023_creatio" - + "n_timestampB\016\n\014_descriptionB\016\n\014_fingerpr" - + "intB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\r\n\013_proxy_b" - + "indB\020\n\016_quic_overrideB\t\n\007_regionB\014\n\n_sel" - + "f_linkB\024\n\022_server_tls_policyB\r\n\013_ssl_pol" - + "icyB\n\n\010_url_map\"\322\003\n\036TargetHttpsProxyAggr" - + "egatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022T\n\005items\030\300\317" - + "\367/ \003(\0132B.google.cloud.compute.v1.TargetH" - + "ttpsProxyAggregatedList.ItemsEntry\022\024\n\004ki" - + "nd\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206&" - + " \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n" - + "\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001" - + "(\0132 .google.cloud.compute.v1.WarningH\004\210\001" - + "\001\032c\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 " - + "\001(\01325.google.cloud.compute.v1.TargetHttp" - + "sProxiesScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022" + + "\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_toke" + + "n\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003" + + "\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.c" + + "ompute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022" + "\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_war" - + "ning\"\261\002\n\024TargetHttpsProxyList\022\020\n\002id\030\233\032 \001" - + "(\tH\000\210\001\001\022;\n\005items\030\300\317\367/ \003(\0132).google.cloud", - ".compute.v1.TargetHttpsProxy\022\024\n\004kind\030\224\367\310" + + "ning\"\262\001\n\034TargetHttpsProxiesScopedList\022K\n" + + "\024target_https_proxies\030\212\374\347\256\001 \003(\0132).google" + + ".cloud.compute.v1.TargetHttpsProxy\0229\n\007wa" + + "rning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1" + + ".WarningH\000\210\001\001B\n\n\010_warning\"a\n*TargetHttps" + + "ProxiesSetCertificateMapRequest\022\037\n\017certi" + + "ficate_map\030\264\345\315J \001(\tH\000\210\001\001B\022\n\020_certificate" + + "_map\"\266\001\n(TargetHttpsProxiesSetQuicOverri" + + "deRequest\022\036\n\rquic_override\030\255\241\333\331\001 \001(\tH\000\210\001" + + "\001\"X\n\014QuicOverride\022\033\n\027UNDEFINED_QUIC_OVER" + + "RIDE\020\000\022\016\n\007DISABLE\020\310\335\246s\022\016\n\006ENABLE\020\203\263\240\321\001\022\013" + + "\n\004NONE\020\270\316\222\001B\020\n\016_quic_override\"K\n+TargetH" + + "ttpsProxiesSetSslCertificatesRequest\022\034\n\020" + + "ssl_certificates\030\217\242\303\256\001 \003(\t\"\242\006\n\020TargetHtt" + + "psProxy\022$\n\024authorization_policy\030\270\357\227\020 \001(\t" + + "H\000\210\001\001\022\037\n\017certificate_map\030\264\345\315J \001(\tH\001\210\001\001\022\"" + + "\n\022creation_timestamp\030\266\217\307\016 \001(\tH\002\210\001\001\022\034\n\013de" + + "scription\030\374\207\326\311\001 \001(\tH\003\210\001\001\022\033\n\013fingerprint\030" + + "\344\321\363o \001(\tH\004\210\001\001\022\020\n\002id\030\233\032 \001(\004H\005\210\001\001\022\024\n\004kind\030" + + "\224\367\310\001 \001(\tH\006\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\007\210\001\001\022\033\n\np" + + "roxy_bind\030\356\316\261\210\001 \001(\010H\010\210\001\001\022\036\n\rquic_overrid" + + "e\030\255\241\333\331\001 \001(\tH\t\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\n\210\001\001" + + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\013\210\001\001\022\"\n\021server_t" + + "ls_policy\030\362\336\207\215\001 \001(\tH\014\210\001\001\022\034\n\020ssl_certific" + + "ates\030\217\242\303\256\001 \003(\t\022\033\n\nssl_policy\030\305\375\340\214\001 \001(\tH\r" + + "\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tH\016\210\001\001\"X\n\014QuicOve" + + "rride\022\033\n\027UNDEFINED_QUIC_OVERRIDE\020\000\022\016\n\007DI" + + "SABLE\020\310\335\246s\022\016\n\006ENABLE\020\203\263\240\321\001\022\013\n\004NONE\020\270\316\222\001B" + + "\027\n\025_authorization_policyB\022\n\020_certificate" + + "_mapB\025\n\023_creation_timestampB\016\n\014_descript" + + "ionB\016\n\014_fingerprintB\005\n\003_idB\007\n\005_kindB\007\n\005_" + + "nameB\r\n\013_proxy_bindB\020\n\016_quic_overrideB\t\n" + + "\007_regionB\014\n\n_self_linkB\024\n\022_server_tls_po" + + "licyB\r\n\013_ssl_policyB\n\n\010_url_map\"\322\003\n\036Targ" + + "etHttpsProxyAggregatedList\022\020\n\002id\030\233\032 \001(\tH" + + "\000\210\001\001\022T\n\005items\030\300\317\367/ \003(\0132B.google.cloud.co" + + "mpute.v1.TargetHttpsProxyAggregatedList.", + "ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next" + + "_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215" + + "\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229" + + "\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comput" + + "e.v1.WarningH\004\210\001\001\032c\n\nItemsEntry\022\013\n\003key\030\001" + + " \001(\t\022D\n\005value\030\002 \001(\01325.google.cloud.compu" + + "te.v1.TargetHttpsProxiesScopedList:\0028\001B\005" + + "\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_s" + + "elf_linkB\n\n\010_warning\"\261\002\n\024TargetHttpsProx" + + "yList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022;\n\005items\030\300\317\367/ \003(" + + "\0132).google.cloud.compute.v1.TargetHttpsP" + + "roxy\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_" + + "token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001" + + "(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clo" + + "ud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_ki" + + "ndB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010" + + "_warning\"\307\003\n\016TargetInstance\022\"\n\022creation_" + + "timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374" + + "\207\326\311\001 \001(\tH\001\210\001\001\022\020\n\002id\030\233\032 \001(\004H\002\210\001\001\022\030\n\010insta" + + "nce\030\225\251\332\010 \001(\tH\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022" + + "\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\033\n\nnat_policy\030\220\304\212\363" + + "\001 \001(\tH\006\210\001\001\022\027\n\007network\030\256\264\205o \001(\tH\007\210\001\001\022\032\n\ts" + + "elf_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\t" + + "H\t\210\001\001\"4\n\tNatPolicy\022\030\n\024UNDEFINED_NAT_POLI" + + "CY\020\000\022\r\n\006NO_NAT\020\203\273\376LB\025\n\023_creation_timesta" + + "mpB\016\n\014_descriptionB\005\n\003_idB\013\n\t_instanceB\007" + + "\n\005_kindB\007\n\005_nameB\r\n\013_nat_policyB\n\n\010_netw" + + "orkB\014\n\n_self_linkB\007\n\005_zone\"\313\003\n\034TargetIns" + + "tanceAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022R\n" + + "\005items\030\300\317\367/ \003(\0132@.google.cloud.compute.v" + + "1.TargetInstanceAggregatedList.ItemsEntr" + + "y\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_tok" + + "en\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH" + + "\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning" + + "\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warn" + + "ingH\004\210\001\001\032`\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022A\n\005v" + + "alue\030\002 \001(\01322.google.cloud.compute.v1.Tar" + + "getInstancesScopedList:\0028\001B\005\n\003_idB\007\n\005_ki" + + "ndB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010" + + "_warning\"\255\002\n\022TargetInstanceList\022\020\n\002id\030\233\032" + + " \001(\tH\000\210\001\001\0229\n\005items\030\300\317\367/ \003(\0132\'.google.clo" + + "ud.compute.v1.TargetInstance\022\024\n\004kind\030\224\367\310" + "\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002" + "\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warni" + "ng\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Wa" + "rningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page" - + "_tokenB\014\n\n_self_linkB\n\n\010_warning\"\307\003\n\016Tar" - + "getInstance\022\"\n\022creation_timestamp\030\266\217\307\016 \001" - + "(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\020\n" - + "\002id\030\233\032 \001(\004H\002\210\001\001\022\030\n\010instance\030\225\251\332\010 \001(\tH\003\210\001" - + "\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\t" - + "H\005\210\001\001\022\033\n\nnat_policy\030\220\304\212\363\001 \001(\tH\006\210\001\001\022\027\n\007ne" - + "twork\030\256\264\205o \001(\tH\007\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001" - + "(\tH\010\210\001\001\022\024\n\004zone\030\254\307\344\001 \001(\tH\t\210\001\001\"4\n\tNatPoli" - + "cy\022\030\n\024UNDEFINED_NAT_POLICY\020\000\022\r\n\006NO_NAT\020\203" - + "\273\376LB\025\n\023_creation_timestampB\016\n\014_descripti" - + "onB\005\n\003_idB\013\n\t_instanceB\007\n\005_kindB\007\n\005_name" - + "B\r\n\013_nat_policyB\n\n\010_networkB\014\n\n_self_lin" - + "kB\007\n\005_zone\"\313\003\n\034TargetInstanceAggregatedL" - + "ist\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022R\n\005items\030\300\317\367/ \003(\0132" - + "@.google.cloud.compute.v1.TargetInstance" - + "AggregatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001" - + "(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001" - + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreacha" - + "bles\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .goog" - + "le.cloud.compute.v1.WarningH\004\210\001\001\032`\n\nItem" - + "sEntry\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 \001(\01322.goo" - + "gle.cloud.compute.v1.TargetInstancesScop" - + "edList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page" - + "_tokenB\014\n\n_self_linkB\n\n\010_warning\"\255\002\n\022Tar" - + "getInstanceList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0229\n\005ite" + + "_tokenB\014\n\n_self_linkB\n\n\010_warning\"\251\001\n\031Tar" + + "getInstancesScopedList\022E\n\020target_instanc" + + "es\030\320\322\255\273\001 \003(\0132\'.google.cloud.compute.v1.T" + + "argetInstance\0229\n\007warning\030\234\337\226\030 \001(\0132 .goog" + + "le.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_war" + + "ning\"\320\005\n\nTargetPool\022\033\n\013backup_pool\030\371\310\360\025 " + + "\001(\tH\000\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\tH" + + "\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\036\n\016fa" + + "ilover_ratio\030\376\224\264e \001(\002H\003\210\001\001\022\031\n\rhealth_che" + + "cks\030\256\257\346\325\001 \003(\t\022\020\n\002id\030\233\032 \001(\004H\004\210\001\001\022\024\n\tinsta" + + "nces\030\376\374\357\r \003(\t\022\024\n\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022\024\n\004n" + + "ame\030\213\365\315\001 \001(\tH\006\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\007\210\001" + + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022!\n\020session" + + "_affinity\030\261\301\231\335\001 \001(\tH\t\210\001\001\"\353\001\n\017SessionAffi" + + "nity\022\036\n\032UNDEFINED_SESSION_AFFINITY\020\000\022\021\n\t" + + "CLIENT_IP\020\233\334\351\244\001\022\037\n\030CLIENT_IP_NO_DESTINAT" + + "ION\020\224\232\3152\022\033\n\024CLIENT_IP_PORT_PROTO\020\256\362\334i\022\026\n" + + "\017CLIENT_IP_PROTO\020\244\305\211\014\022\030\n\020GENERATED_COOKI" + + "E\020\264\316\312\260\001\022\023\n\014HEADER_FIELD\020\250\211\334_\022\023\n\013HTTP_COO" + + "KIE\020\373\243\203\354\001\022\013\n\004NONE\020\270\316\222\001B\016\n\014_backup_poolB\025" + + "\n\023_creation_timestampB\016\n\014_descriptionB\021\n" + + "\017_failover_ratioB\005\n\003_idB\007\n\005_kindB\007\n\005_nam" + + "eB\t\n\007_regionB\014\n\n_self_linkB\023\n\021_session_a" + + "ffinity\"\277\003\n\030TargetPoolAggregatedList\022\020\n\002" + + "id\030\233\032 \001(\tH\000\210\001\001\022N\n\005items\030\300\317\367/ \003(\0132<.googl" + + "e.cloud.compute.v1.TargetPoolAggregatedL" + + "ist.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017" + + "next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_li" + + "nk\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003" + + "(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.co" + + "mpute.v1.WarningH\004\210\001\001\032\\\n\nItemsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..google.cloud.c" + + "ompute.v1.TargetPoolsScopedList:\0028\001B\005\n\003_" + + "idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self" + + "_linkB\n\n\010_warning\"{\n\030TargetPoolInstanceH" + + "ealth\022@\n\rhealth_status\030\265\326\272\265\001 \003(\0132%.googl" + + "e.cloud.compute.v1.HealthStatus\022\024\n\004kind\030" + + "\224\367\310\001 \001(\tH\000\210\001\001B\007\n\005_kind\"\245\002\n\016TargetPoolLis" + + "t\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0225\n\005items\030\300\317\367/ \003(\0132#." + + "google.cloud.compute.v1.TargetPool\022\024\n\004ki" + + "nd\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206&" + + " \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n" + + "\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compute" + + ".v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_nex" + + "t_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"l" + + "\n TargetPoolsAddHealthCheckRequest\022H\n\rhe" + + "alth_checks\030\256\257\346\325\001 \003(\0132-.google.cloud.com" + + "pute.v1.HealthCheckReference\"a\n\035TargetPo" + + "olsAddInstanceRequest\022@\n\tinstances\030\376\374\357\r " + + "\003(\0132*.google.cloud.compute.v1.InstanceRe" + + "ference\"o\n#TargetPoolsRemoveHealthCheckR" + + "equest\022H\n\rhealth_checks\030\256\257\346\325\001 \003(\0132-.goog" + + "le.cloud.compute.v1.HealthCheckReference" + + "\"d\n TargetPoolsRemoveInstanceRequest\022@\n\t" + + "instances\030\376\374\357\r \003(\0132*.google.cloud.comput" + + "e.v1.InstanceReference\"\235\001\n\025TargetPoolsSc" + + "opedList\022=\n\014target_pools\030\251\237\240\240\001 \003(\0132#.goo" + + "gle.cloud.compute.v1.TargetPool\0229\n\007warni" + + "ng\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Wa" + + "rningH\000\210\001\001B\n\n\010_warning\"4\n\017TargetReferenc" + + "e\022\026\n\006target\030\221\343\371[ \001(\tH\000\210\001\001B\t\n\007_target\"P\n(" + + "TargetSslProxiesSetBackendServiceRequest" + + "\022\030\n\007service\030\265\215\217\262\001 \001(\tH\000\210\001\001B\n\n\010_service\"_" + + "\n(TargetSslProxiesSetCertificateMapReque" + + "st\022\037\n\017certificate_map\030\264\345\315J \001(\tH\000\210\001\001B\022\n\020_" + + "certificate_map\"\240\001\n%TargetSslProxiesSetP" + + "roxyHeaderRequest\022\034\n\014proxy_header\030\376\272\274L \001" + + "(\tH\000\210\001\001\"H\n\013ProxyHeader\022\032\n\026UNDEFINED_PROX" + + "Y_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237" + + "\001B\017\n\r_proxy_header\"I\n)TargetSslProxiesSe" + + "tSslCertificatesRequest\022\034\n\020ssl_certifica" + + "tes\030\217\242\303\256\001 \003(\t\"\230\004\n\016TargetSslProxy\022\037\n\017cert" + + "ificate_map\030\264\345\315J \001(\tH\000\210\001\001\022\"\n\022creation_ti" + + "mestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013description\030\374\207\326" + + "\311\001 \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367" + + "\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\034\n\014pro" + + "xy_header\030\376\272\274L \001(\tH\006\210\001\001\022\032\n\tself_link\030\215\222\305" + + "\331\001 \001(\tH\007\210\001\001\022\030\n\007service\030\265\215\217\262\001 \001(\tH\010\210\001\001\022\034\n" + + "\020ssl_certificates\030\217\242\303\256\001 \003(\t\022\033\n\nssl_polic" + + "y\030\305\375\340\214\001 \001(\tH\t\210\001\001\"H\n\013ProxyHeader\022\032\n\026UNDEF" + + "INED_PROXY_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROX" + + "Y_V1\020\254\244\267\237\001B\022\n\020_certificate_mapB\025\n\023_creat" + + "ion_timestampB\016\n\014_descriptionB\005\n\003_idB\007\n\005" + + "_kindB\007\n\005_nameB\017\n\r_proxy_headerB\014\n\n_self" + + "_linkB\n\n\010_serviceB\r\n\013_ssl_policy\"\255\002\n\022Tar" + + "getSslProxyList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0229\n\005ite" + "ms\030\300\317\367/ \003(\0132\'.google.cloud.compute.v1.Ta" - + "rgetInstance\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" + + "rgetSslProxy\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" + "xt_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link" + "\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .go" + "ogle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_i" + "dB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_" - + "linkB\n\n\010_warning\"\251\001\n\031TargetInstancesScop" - + "edList\022E\n\020target_instances\030\320\322\255\273\001 \003(\0132\'.g" - + "oogle.cloud.compute.v1.TargetInstance\0229\n" - + "\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compute" - + ".v1.WarningH\000\210\001\001B\n\n\010_warning\"\320\005\n\nTargetP" - + "ool\022\033\n\013backup_pool\030\371\310\360\025 \001(\tH\000\210\001\001\022\"\n\022crea" - + "tion_timestamp\030\266\217\307\016 \001(\tH\001\210\001\001\022\034\n\013descript" - + "ion\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\036\n\016failover_ratio\030\376\224\264" - + "e \001(\002H\003\210\001\001\022\031\n\rhealth_checks\030\256\257\346\325\001 \003(\t\022\020\n" - + "\002id\030\233\032 \001(\004H\004\210\001\001\022\024\n\tinstances\030\376\374\357\r \003(\t\022\024\n" - + "\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001" - + "\001\022\026\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022\032\n\tself_link\030\215" - + "\222\305\331\001 \001(\tH\010\210\001\001\022!\n\020session_affinity\030\261\301\231\335\001 " - + "\001(\tH\t\210\001\001\"\353\001\n\017SessionAffinity\022\036\n\032UNDEFINE" - + "D_SESSION_AFFINITY\020\000\022\021\n\tCLIENT_IP\020\233\334\351\244\001\022" - + "\037\n\030CLIENT_IP_NO_DESTINATION\020\224\232\3152\022\033\n\024CLIE" - + "NT_IP_PORT_PROTO\020\256\362\334i\022\026\n\017CLIENT_IP_PROTO" - + "\020\244\305\211\014\022\030\n\020GENERATED_COOKIE\020\264\316\312\260\001\022\023\n\014HEADE" - + "R_FIELD\020\250\211\334_\022\023\n\013HTTP_COOKIE\020\373\243\203\354\001\022\013\n\004NON" - + "E\020\270\316\222\001B\016\n\014_backup_poolB\025\n\023_creation_time" - + "stampB\016\n\014_descriptionB\021\n\017_failover_ratio" - + "B\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\t\n\007_regionB\014\n\n" - + "_self_linkB\023\n\021_session_affinity\"\277\003\n\030Targ" - + "etPoolAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022N" - + "\n\005items\030\300\317\367/ \003(\0132<.google.cloud.compute." - + "v1.TargetPoolAggregatedList.ItemsEntry\022\024" - + "\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030" - + "\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001" - + "\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337" - + "\226\030 \001(\0132 .google.cloud.compute.v1.Warning" - + "H\004\210\001\001\032\\\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005valu" - + "e\030\002 \001(\0132..google.cloud.compute.v1.Target" - + "PoolsScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_" - + "next_page_tokenB\014\n\n_self_linkB\n\n\010_warnin" - + "g\"{\n\030TargetPoolInstanceHealth\022@\n\rhealth_" - + "status\030\265\326\272\265\001 \003(\0132%.google.cloud.compute." - + "v1.HealthStatus\022\024\n\004kind\030\224\367\310\001 \001(\tH\000\210\001\001B\007\n" - + "\005_kind\"\245\002\n\016TargetPoolList\022\020\n\002id\030\233\032 \001(\tH\000" - + "\210\001\001\0225\n\005items\030\300\317\367/ \003(\0132#.google.cloud.com" - + "pute.v1.TargetPool\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001" - + "\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tsel" - + "f_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(" - + "\0132 .google.cloud.compute.v1.WarningH\004\210\001\001" - + "B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n" - + "_self_linkB\n\n\010_warning\"l\n TargetPoolsAdd" - + "HealthCheckRequest\022H\n\rhealth_checks\030\256\257\346\325" - + "\001 \003(\0132-.google.cloud.compute.v1.HealthCh" - + "eckReference\"a\n\035TargetPoolsAddInstanceRe" - + "quest\022@\n\tinstances\030\376\374\357\r \003(\0132*.google.clo" - + "ud.compute.v1.InstanceReference\"o\n#Targe" - + "tPoolsRemoveHealthCheckRequest\022H\n\rhealth" - + "_checks\030\256\257\346\325\001 \003(\0132-.google.cloud.compute" - + ".v1.HealthCheckReference\"d\n TargetPoolsR" - + "emoveInstanceRequest\022@\n\tinstances\030\376\374\357\r \003" - + "(\0132*.google.cloud.compute.v1.InstanceRef" - + "erence\"\235\001\n\025TargetPoolsScopedList\022=\n\014targ" - + "et_pools\030\251\237\240\240\001 \003(\0132#.google.cloud.comput" - + "e.v1.TargetPool\0229\n\007warning\030\234\337\226\030 \001(\0132 .go" - + "ogle.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_w" - + "arning\"4\n\017TargetReference\022\026\n\006target\030\221\343\371[" - + " \001(\tH\000\210\001\001B\t\n\007_target\"P\n(TargetSslProxies" - + "SetBackendServiceRequest\022\030\n\007service\030\265\215\217\262" - + "\001 \001(\tH\000\210\001\001B\n\n\010_service\"_\n(TargetSslProxi" - + "esSetCertificateMapRequest\022\037\n\017certificat" - + "e_map\030\264\345\315J \001(\tH\000\210\001\001B\022\n\020_certificate_map\"" - + "\240\001\n%TargetSslProxiesSetProxyHeaderReques" - + "t\022\034\n\014proxy_header\030\376\272\274L \001(\tH\000\210\001\001\"H\n\013Proxy" - + "Header\022\032\n\026UNDEFINED_PROXY_HEADER\020\000\022\013\n\004NO" - + "NE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237\001B\017\n\r_proxy_head" - + "er\"I\n)TargetSslProxiesSetSslCertificates" - + "Request\022\034\n\020ssl_certificates\030\217\242\303\256\001 \003(\t\"\230\004" - + "\n\016TargetSslProxy\022\037\n\017certificate_map\030\264\345\315J" - + " \001(\tH\000\210\001\001\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\t" - + "H\001\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\020\n\002i" - + "d\030\233\032 \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004n" - + "ame\030\213\365\315\001 \001(\tH\005\210\001\001\022\034\n\014proxy_header\030\376\272\274L \001" - + "(\tH\006\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\007\210\001\001\022\030\n\007s" - + "ervice\030\265\215\217\262\001 \001(\tH\010\210\001\001\022\034\n\020ssl_certificate" - + "s\030\217\242\303\256\001 \003(\t\022\033\n\nssl_policy\030\305\375\340\214\001 \001(\tH\t\210\001\001" - + "\"H\n\013ProxyHeader\022\032\n\026UNDEFINED_PROXY_HEADE" - + "R\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237\001B\022\n\020_c" - + "ertificate_mapB\025\n\023_creation_timestampB\016\n" - + "\014_descriptionB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\017" - + "\n\r_proxy_headerB\014\n\n_self_linkB\n\n\010_servic" - + "eB\r\n\013_ssl_policy\"\255\002\n\022TargetSslProxyList\022" - + "\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0229\n\005items\030\300\317\367/ \003(\0132\'.go" - + "ogle.cloud.compute.v1.TargetSslProxy\022\024\n\004" - + "kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272" - + "\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022" + + "linkB\n\n\010_warning\"\253\001\n\032TargetTcpProxiesSco" + + "pedList\022F\n\022target_tcp_proxies\030\200\327\372| \003(\0132\'" + + ".google.cloud.compute.v1.TargetTcpProxy\022" + "9\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.compu" - + "te.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_n" - + "ext_page_tokenB\014\n\n_self_linkB\n\n\010_warning" - + "\"\253\001\n\032TargetTcpProxiesScopedList\022F\n\022targe" - + "t_tcp_proxies\030\200\327\372| \003(\0132\'.google.cloud.co" - + "mpute.v1.TargetTcpProxy\0229\n\007warning\030\234\337\226\030 " - + "\001(\0132 .google.cloud.compute.v1.WarningH\000\210" - + "\001\001B\n\n\010_warning\"P\n(TargetTcpProxiesSetBac" - + "kendServiceRequest\022\030\n\007service\030\265\215\217\262\001 \001(\tH" - + "\000\210\001\001B\n\n\010_service\"\240\001\n%TargetTcpProxiesSet" - + "ProxyHeaderRequest\022\034\n\014proxy_header\030\376\272\274L " - + "\001(\tH\000\210\001\001\"H\n\013ProxyHeader\022\032\n\026UNDEFINED_PRO" - + "XY_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267" - + "\237\001B\017\n\r_proxy_header\"\350\003\n\016TargetTcpProxy\022\"" - + "\n\022creation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013de" - + "scription\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\020\n\002id\030\233\032 \001(\004H\002\210" - + "\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\003\210\001\001\022\024\n\004name\030\213\365\315\001 \001(" - + "\tH\004\210\001\001\022\033\n\nproxy_bind\030\356\316\261\210\001 \001(\010H\005\210\001\001\022\034\n\014p" - + "roxy_header\030\376\272\274L \001(\tH\006\210\001\001\022\026\n\006region\030\364\315\240B" - + " \001(\tH\007\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022\030\n" - + "\007service\030\265\215\217\262\001 \001(\tH\t\210\001\001\"H\n\013ProxyHeader\022\032" - + "\n\026UNDEFINED_PROXY_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001\022" - + "\020\n\010PROXY_V1\020\254\244\267\237\001B\025\n\023_creation_timestamp" - + "B\016\n\014_descriptionB\005\n\003_idB\007\n\005_kindB\007\n\005_nam" - + "eB\r\n\013_proxy_bindB\017\n\r_proxy_headerB\t\n\007_re" - + "gionB\014\n\n_self_linkB\n\n\010_service\"\314\003\n\034Targe" - + "tTcpProxyAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" - + "\001\022R\n\005items\030\300\317\367/ \003(\0132@.google.cloud.compu" - + "te.v1.TargetTcpProxyAggregatedList.Items" - + "Entry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page" - + "_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 " - + "\001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007war" - + "ning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1." - + "WarningH\004\210\001\001\032a\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022" - + "B\n\005value\030\002 \001(\01323.google.cloud.compute.v1" - + ".TargetTcpProxiesScopedList:\0028\001B\005\n\003_idB\007" + + "te.v1.WarningH\000\210\001\001B\n\n\010_warning\"P\n(Target" + + "TcpProxiesSetBackendServiceRequest\022\030\n\007se" + + "rvice\030\265\215\217\262\001 \001(\tH\000\210\001\001B\n\n\010_service\"\240\001\n%Tar" + + "getTcpProxiesSetProxyHeaderRequest\022\034\n\014pr" + + "oxy_header\030\376\272\274L \001(\tH\000\210\001\001\"H\n\013ProxyHeader\022" + + "\032\n\026UNDEFINED_PROXY_HEADER\020\000\022\013\n\004NONE\020\270\316\222\001" + + "\022\020\n\010PROXY_V1\020\254\244\267\237\001B\017\n\r_proxy_header\"\350\003\n\016" + + "TargetTcpProxy\022\"\n\022creation_timestamp\030\266\217\307" + + "\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001" + + "\022\020\n\002id\030\233\032 \001(\004H\002\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\003\210\001\001" + + "\022\024\n\004name\030\213\365\315\001 \001(\tH\004\210\001\001\022\033\n\nproxy_bind\030\356\316\261" + + "\210\001 \001(\010H\005\210\001\001\022\034\n\014proxy_header\030\376\272\274L \001(\tH\006\210\001" + + "\001\022\026\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022\032\n\tself_link\030\215" + + "\222\305\331\001 \001(\tH\010\210\001\001\022\030\n\007service\030\265\215\217\262\001 \001(\tH\t\210\001\001\"" + + "H\n\013ProxyHeader\022\032\n\026UNDEFINED_PROXY_HEADER" + + "\020\000\022\013\n\004NONE\020\270\316\222\001\022\020\n\010PROXY_V1\020\254\244\267\237\001B\025\n\023_cr" + + "eation_timestampB\016\n\014_descriptionB\005\n\003_idB" + + "\007\n\005_kindB\007\n\005_nameB\r\n\013_proxy_bindB\017\n\r_pro" + + "xy_headerB\t\n\007_regionB\014\n\n_self_linkB\n\n\010_s" + + "ervice\"\314\003\n\034TargetTcpProxyAggregatedList\022" + + "\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022R\n\005items\030\300\317\367/ \003(\0132@.go" + + "ogle.cloud.compute.v1.TargetTcpProxyAggr" + + "egatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001" + + "\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\t" + + "self_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables" + + "\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.c" + + "loud.compute.v1.WarningH\004\210\001\001\032a\n\nItemsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022B\n\005value\030\002 \001(\01323.google." + + "cloud.compute.v1.TargetTcpProxiesScopedL" + + "ist:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_to" + + "kenB\014\n\n_self_linkB\n\n\010_warning\"\255\002\n\022Target" + + "TcpProxyList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0229\n\005items\030" + + "\300\317\367/ \003(\0132\'.google.cloud.compute.v1.Targe" + + "tTcpProxy\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_" + + "page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222" + + "\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .googl" + + "e.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007" + "\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_lin" - + "kB\n\n\010_warning\"\255\002\n\022TargetTcpProxyList\022\020\n\002" - + "id\030\233\032 \001(\tH\000\210\001\001\0229\n\005items\030\300\317\367/ \003(\0132\'.googl" - + "e.cloud.compute.v1.TargetTcpProxy\022\024\n\004kin" - + "d\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& " - + "\001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007" - + "warning\030\234\337\226\030 \001(\0132 .google.cloud.compute." - + "v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next" - + "_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\373\003" - + "\n\020TargetVpnGateway\022\"\n\022creation_timestamp" - + "\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH" - + "\001\210\001\001\022\034\n\020forwarding_rules\030\265\232\314\226\001 \003(\t\022\020\n\002id" - + "\030\233\032 \001(\004H\002\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\003\210\001\001\022\024\n\004na" - + "me\030\213\365\315\001 \001(\tH\004\210\001\001\022\027\n\007network\030\256\264\205o \001(\tH\005\210\001" - + "\001\022\026\n\006region\030\364\315\240B \001(\tH\006\210\001\001\022\032\n\tself_link\030\215" - + "\222\305\331\001 \001(\tH\007\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\010\210\001\001\022\022\n" - + "\007tunnels\030\213\372\3551 \003(\t\"`\n\006Status\022\024\n\020UNDEFINED" - + "_STATUS\020\000\022\020\n\010CREATING\020\271\275\235\331\001\022\020\n\010DELETING\020" - + "\250\247\207\374\001\022\016\n\006FAILED\020\275\220\246\331\001\022\014\n\005READY\020\203\303\217%B\025\n\023_" - + "creation_timestampB\016\n\014_descriptionB\005\n\003_i" - + "dB\007\n\005_kindB\007\n\005_nameB\n\n\010_networkB\t\n\007_regi" - + "onB\014\n\n_self_linkB\t\n\007_status\"\321\003\n\036TargetVp" - + "nGatewayAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001" - + "\022T\n\005items\030\300\317\367/ \003(\0132B.google.cloud.comput" - + "e.v1.TargetVpnGatewayAggregatedList.Item" - + "sEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_pag" - + "e_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" - + " \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007wa" - + "rning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1" - + ".WarningH\004\210\001\001\032b\n\nItemsEntry\022\013\n\003key\030\001 \001(\t" - + "\022C\n\005value\030\002 \001(\01324.google.cloud.compute.v" - + "1.TargetVpnGatewaysScopedList:\0028\001B\005\n\003_id" - + "B\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_l" - + "inkB\n\n\010_warning\"\261\002\n\024TargetVpnGatewayList" - + "\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022;\n\005items\030\300\317\367/ \003(\0132).g" - + "oogle.cloud.compute.v1.TargetVpnGateway\022" - + "\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token" - + "\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210" - + "\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.co" - + "mpute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n" - + "\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_warn" - + "ing\"\260\001\n\033TargetVpnGatewaysScopedList\022J\n\023t" - + "arget_vpn_gateways\030\210\223\312\277\001 \003(\0132).google.cl" - + "oud.compute.v1.TargetVpnGateway\0229\n\007warni" - + "ng\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Wa" - + "rningH\000\210\001\001B\n\n\010_warning\"\223\004\n\013TestFailure\022\"" - + "\n\021actual_output_url\030\202\331\361\210\001 \001(\tH\000\210\001\001\022-\n\035ac" - + "tual_redirect_response_code\030\331\203\274\024 \001(\005H\001\210\001" - + "\001\022\037\n\016actual_service\030\204\322\376\321\001 \001(\tH\002\210\001\001\022$\n\023ex" - + "pected_output_url\030\230\242\367\316\001 \001(\tH\003\210\001\001\022/\n\037expe" - + "cted_redirect_response_code\030\357\352\200\t \001(\005H\004\210\001" - + "\001\022 \n\020expected_service\030\256\370\361? \001(\tH\005\210\001\001\022=\n\007h" - + "eaders\030\206\337\235{ \003(\0132).google.cloud.compute.v" - + "1.UrlMapTestHeader\022\024\n\004host\030\250\353\303\001 \001(\tH\006\210\001\001" - + "\022\024\n\004path\030\245\310\321\001 \001(\tH\007\210\001\001B\024\n\022_actual_output" - + "_urlB \n\036_actual_redirect_response_codeB\021" - + "\n\017_actual_serviceB\026\n\024_expected_output_ur" - + "lB\"\n _expected_redirect_response_codeB\023\n" - + "\021_expected_serviceB\007\n\005_hostB\007\n\005_path\"\315\001\n" - + "\035TestIamPermissionsDiskRequest\022\027\n\007projec" - + "t\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A" - + "\002\022c\n!test_permissions_request_resource\030\246" - + "\305\267\321\001 \001(\0132/.google.cloud.compute.v1.TestP" - + "ermissionsRequestB\003\340A\002\022\024\n\004zone\030\254\307\344\001 \001(\tB" - + "\003\340A\002\"\305\001\n+TestIamPermissionsExternalVpnGa" - + "tewayRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n" + + "kB\n\n\010_warning\"\373\003\n\020TargetVpnGateway\022\"\n\022cr" + + "eation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013descri" + + "ption\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\034\n\020forwarding_rules" + + "\030\265\232\314\226\001 \003(\t\022\020\n\002id\030\233\032 \001(\004H\002\210\001\001\022\024\n\004kind\030\224\367\310" + + "\001 \001(\tH\003\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\004\210\001\001\022\027\n\007netw" + + "ork\030\256\264\205o \001(\tH\005\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\006\210\001" + + "\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\007\210\001\001\022\026\n\006status\030" + + "\362\237\267V \001(\tH\010\210\001\001\022\022\n\007tunnels\030\213\372\3551 \003(\t\"`\n\006Sta" + + "tus\022\024\n\020UNDEFINED_STATUS\020\000\022\020\n\010CREATING\020\271\275" + + "\235\331\001\022\020\n\010DELETING\020\250\247\207\374\001\022\016\n\006FAILED\020\275\220\246\331\001\022\014\n" + + "\005READY\020\203\303\217%B\025\n\023_creation_timestampB\016\n\014_d" + + "escriptionB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB\n\n\010_" + + "networkB\t\n\007_regionB\014\n\n_self_linkB\t\n\007_sta" + + "tus\"\321\003\n\036TargetVpnGatewayAggregatedList\022\020" + + "\n\002id\030\233\032 \001(\tH\000\210\001\001\022T\n\005items\030\300\317\367/ \003(\0132B.goo" + + "gle.cloud.compute.v1.TargetVpnGatewayAgg" + + "regatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH" + + "\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n" + + "\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachable" + + "s\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google." + + "cloud.compute.v1.WarningH\004\210\001\001\032b\n\nItemsEn" + + "try\022\013\n\003key\030\001 \001(\t\022C\n\005value\030\002 \001(\01324.google" + + ".cloud.compute.v1.TargetVpnGatewaysScope" + + "dList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_" + + "tokenB\014\n\n_self_linkB\n\n\010_warning\"\261\002\n\024Targ" + + "etVpnGatewayList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022;\n\005it" + + "ems\030\300\317\367/ \003(\0132).google.cloud.compute.v1.T" + + "argetVpnGateway\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n" + + "\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_l" + + "ink\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 " + + ".google.cloud.compute.v1.WarningH\004\210\001\001B\005\n" + + "\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_se" + + "lf_linkB\n\n\010_warning\"\260\001\n\033TargetVpnGateway" + + "sScopedList\022J\n\023target_vpn_gateways\030\210\223\312\277\001" + + " \003(\0132).google.cloud.compute.v1.TargetVpn" + + "Gateway\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clo" + + "ud.compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\223" + + "\004\n\013TestFailure\022\"\n\021actual_output_url\030\202\331\361\210" + + "\001 \001(\tH\000\210\001\001\022-\n\035actual_redirect_response_c" + + "ode\030\331\203\274\024 \001(\005H\001\210\001\001\022\037\n\016actual_service\030\204\322\376\321" + + "\001 \001(\tH\002\210\001\001\022$\n\023expected_output_url\030\230\242\367\316\001 " + + "\001(\tH\003\210\001\001\022/\n\037expected_redirect_response_c" + + "ode\030\357\352\200\t \001(\005H\004\210\001\001\022 \n\020expected_service\030\256\370" + + "\361? \001(\tH\005\210\001\001\022=\n\007headers\030\206\337\235{ \003(\0132).google" + + ".cloud.compute.v1.UrlMapTestHeader\022\024\n\004ho" + + "st\030\250\353\303\001 \001(\tH\006\210\001\001\022\024\n\004path\030\245\310\321\001 \001(\tH\007\210\001\001B\024" + + "\n\022_actual_output_urlB \n\036_actual_redirect" + + "_response_codeB\021\n\017_actual_serviceB\026\n\024_ex" + + "pected_output_urlB\"\n _expected_redirect_" + + "response_codeB\023\n\021_expected_serviceB\007\n\005_h" + + "ostB\007\n\005_path\"\315\001\n\035TestIamPermissionsDiskR" + + "equest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resou" + + "rce\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permissions_re" + + "quest_resource\030\246\305\267\321\001 \001(\0132/.google.cloud." + + "compute.v1.TestPermissionsRequestB\003\340A\002\022\024" + + "\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\"\305\001\n+TestIamPermissi" + + "onsExternalVpnGatewayRequest\022\027\n\007project\030" + + "\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022" + + "c\n!test_permissions_request_resource\030\246\305\267" + + "\321\001 \001(\0132/.google.cloud.compute.v1.TestPer" + + "missionsRequestB\003\340A\002\"\250\001\n\'TestIamPermissi" + + "onsFirewallPolicyRequest\022\030\n\010resource\030\216\210\257" + + "] \001(\tB\003\340A\002\022c\n!test_permissions_request_r" + + "esource\030\246\305\267\321\001 \001(\0132/.google.cloud.compute" + + ".v1.TestPermissionsRequestB\003\340A\002\"\270\001\n\036Test" + + "IamPermissionsImageRequest\022\027\n\007project\030\231\226" + + "\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n" + + "!test_permissions_request_resource\030\246\305\267\321\001" + + " \001(\0132/.google.cloud.compute.v1.TestPermi" + + "ssionsRequestB\003\340A\002\"\321\001\n!TestIamPermission" + + "sInstanceRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A" + + "\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_perm" + + "issions_request_resource\030\246\305\267\321\001 \001(\0132/.goo" + + "gle.cloud.compute.v1.TestPermissionsRequ" + + "estB\003\340A\002\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\"\303\001\n)TestI" + + "amPermissionsInstanceTemplateRequest\022\027\n\007" + + "project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001" + + "(\tB\003\340A\002\022c\n!test_permissions_request_reso" + + "urce\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v1" + + ".TestPermissionsRequestB\003\340A\002\"\276\001\n$TestIam" + + "PermissionsLicenseCodeRequest\022\027\n\007project" + + "\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002" + + "\022c\n!test_permissions_request_resource\030\246\305" + + "\267\321\001 \001(\0132/.google.cloud.compute.v1.TestPe" + + "rmissionsRequestB\003\340A\002\"\272\001\n TestIamPermiss" + + "ionsLicenseRequest\022\027\n\007project\030\231\226\301l \001(\tB\003" + + "\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_pe" + + "rmissions_request_resource\030\246\305\267\321\001 \001(\0132/.g" + + "oogle.cloud.compute.v1.TestPermissionsRe" + + "questB\003\340A\002\"\277\001\n%TestIamPermissionsMachine" + + "ImageRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n" + "\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permissi" + "ons_request_resource\030\246\305\267\321\001 \001(\0132/.google." + "cloud.compute.v1.TestPermissionsRequestB" - + "\003\340A\002\"\250\001\n\'TestIamPermissionsFirewallPolic" - + "yRequest\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!te" - + "st_permissions_request_resource\030\246\305\267\321\001 \001(" - + "\0132/.google.cloud.compute.v1.TestPermissi" - + "onsRequestB\003\340A\002\"\270\001\n\036TestIamPermissionsIm" - + "ageRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010r" - + "esource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permission" - + "s_request_resource\030\246\305\267\321\001 \001(\0132/.google.cl" - + "oud.compute.v1.TestPermissionsRequestB\003\340" - + "A\002\"\321\001\n!TestIamPermissionsInstanceRequest" - + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210" - + "\257] \001(\tB\003\340A\002\022c\n!test_permissions_request_" - + "resource\030\246\305\267\321\001 \001(\0132/.google.cloud.comput" - + "e.v1.TestPermissionsRequestB\003\340A\002\022\024\n\004zone" - + "\030\254\307\344\001 \001(\tB\003\340A\002\"\303\001\n)TestIamPermissionsIns" - + "tanceTemplateRequest\022\027\n\007project\030\231\226\301l \001(\t" - + "B\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_" - + "permissions_request_resource\030\246\305\267\321\001 \001(\0132/" - + ".google.cloud.compute.v1.TestPermissions" - + "RequestB\003\340A\002\"\276\001\n$TestIamPermissionsLicen" - + "seCodeRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030" + + "\003\340A\002\"\334\001\n*TestIamPermissionsNetworkAttach" + + "mentRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006" + + "region\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(" + + "\tB\003\340A\002\022c\n!test_permissions_request_resou" + + "rce\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v1." + + "TestPermissionsRequestB\003\340A\002\"\335\001\n-TestIamP" + + "ermissionsNetworkEndpointGroupRequest\022\027\n" + + "\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] " + + "\001(\tB\003\340A\002\022c\n!test_permissions_request_res" + + "ource\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v" + + "1.TestPermissionsRequestB\003\340A\002\022\024\n\004zone\030\254\307" + + "\344\001 \001(\tB\003\340A\002\"\310\001\n.TestIamPermissionsNetwor" + + "kFirewallPolicyRequest\022\027\n\007project\030\231\226\301l \001" + + "(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!tes" + + "t_permissions_request_resource\030\246\305\267\321\001 \001(\013" + + "2/.google.cloud.compute.v1.TestPermissio" + + "nsRequestB\003\340A\002\"\322\001\n\"TestIamPermissionsNod" + + "eGroupRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030" + "\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permiss" + "ions_request_resource\030\246\305\267\321\001 \001(\0132/.google" + ".cloud.compute.v1.TestPermissionsRequest" - + "B\003\340A\002\"\272\001\n TestIamPermissionsLicenseReque" - + "st\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030" - + "\216\210\257] \001(\tB\003\340A\002\022c\n!test_permissions_reques" - + "t_resource\030\246\305\267\321\001 \001(\0132/.google.cloud.comp" - + "ute.v1.TestPermissionsRequestB\003\340A\002\"\277\001\n%T" - + "estIamPermissionsMachineImageRequest\022\027\n\007" + + "B\003\340A\002\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\"\327\001\n%TestIamP" + + "ermissionsNodeTemplateRequest\022\027\n\007project" + + "\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\030" + + "\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permiss" + + "ions_request_resource\030\246\305\267\321\001 \001(\0132/.google" + + ".cloud.compute.v1.TestPermissionsRequest" + + "B\003\340A\002\"\332\001\n(TestIamPermissionsPacketMirror" + + "ingRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006r" + + "egion\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\t" + + "B\003\340A\002\022c\n!test_permissions_request_resour" + + "ce\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v1.T" + + "estPermissionsRequestB\003\340A\002\"\325\001\n#TestIamPe" + + "rmissionsRegionDiskRequest\022\027\n\007project\030\231\226" + + "\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010r" + + "esource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permission" + + "s_request_resource\030\246\305\267\321\001 \001(\0132/.google.cl" + + "oud.compute.v1.TestPermissionsRequestB\003\340" + + "A\002\"\346\001\n4TestIamPermissionsRegionNetworkFi" + + "rewallPolicyRequest\022\027\n\007project\030\231\226\301l \001(\tB" + + "\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010resource" + + "\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permissions_reque" + + "st_resource\030\246\305\267\321\001 \001(\0132/.google.cloud.com" + + "pute.v1.TestPermissionsRequestB\003\340A\002\"\324\001\n$" + + "TestIamPermissionsReservationRequest\022\027\n\007" + "project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001" + "(\tB\003\340A\002\022c\n!test_permissions_request_reso" + "urce\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v1" - + ".TestPermissionsRequestB\003\340A\002\"\334\001\n*TestIam" - + "PermissionsNetworkAttachmentRequest\022\027\n\007p" - + "roject\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB" - + "\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_p" - + "ermissions_request_resource\030\246\305\267\321\001 \001(\0132/." - + "google.cloud.compute.v1.TestPermissionsR" - + "equestB\003\340A\002\"\335\001\n-TestIamPermissionsNetwor" - + "kEndpointGroupRequest\022\027\n\007project\030\231\226\301l \001(" + + ".TestPermissionsRequestB\003\340A\002\022\024\n\004zone\030\254\307\344" + + "\001 \001(\tB\003\340A\002\"\331\001\n\'TestIamPermissionsResourc" + + "ePolicyRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022" + + "\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257]" + + " \001(\tB\003\340A\002\022c\n!test_permissions_request_re" + + "source\030\246\305\267\321\001 \001(\0132/.google.cloud.compute." + + "v1.TestPermissionsRequestB\003\340A\002\"\334\001\n*TestI" + + "amPermissionsServiceAttachmentRequest\022\027\n" + + "\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(" + "\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test" + "_permissions_request_resource\030\246\305\267\321\001 \001(\0132" + "/.google.cloud.compute.v1.TestPermission" - + "sRequestB\003\340A\002\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\"\310\001\n." - + "TestIamPermissionsNetworkFirewallPolicyR" - + "equest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resou" - + "rce\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permissions_re" - + "quest_resource\030\246\305\267\321\001 \001(\0132/.google.cloud." - + "compute.v1.TestPermissionsRequestB\003\340A\002\"\322" - + "\001\n\"TestIamPermissionsNodeGroupRequest\022\027\n" - + "\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] " - + "\001(\tB\003\340A\002\022c\n!test_permissions_request_res" - + "ource\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v" - + "1.TestPermissionsRequestB\003\340A\002\022\024\n\004zone\030\254\307" - + "\344\001 \001(\tB\003\340A\002\"\327\001\n%TestIamPermissionsNodeTe" - + "mplateRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026" - + "\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] " - + "\001(\tB\003\340A\002\022c\n!test_permissions_request_res" - + "ource\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v" - + "1.TestPermissionsRequestB\003\340A\002\"\332\001\n(TestIa" - + "mPermissionsPacketMirroringRequest\022\027\n\007pr" - + "oject\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003" - + "\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_pe" - + "rmissions_request_resource\030\246\305\267\321\001 \001(\0132/.g" - + "oogle.cloud.compute.v1.TestPermissionsRe" - + "questB\003\340A\002\"\325\001\n#TestIamPermissionsRegionD" - + "iskRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006r" - + "egion\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\t" - + "B\003\340A\002\022c\n!test_permissions_request_resour" - + "ce\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v1.T" - + "estPermissionsRequestB\003\340A\002\"\346\001\n4TestIamPe" - + "rmissionsRegionNetworkFirewallPolicyRequ" - + "est\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364" - + "\315\240B \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c" - + "\n!test_permissions_request_resource\030\246\305\267\321" - + "\001 \001(\0132/.google.cloud.compute.v1.TestPerm" - + "issionsRequestB\003\340A\002\"\324\001\n$TestIamPermissio" - + "nsReservationRequest\022\027\n\007project\030\231\226\301l \001(\t" - + "B\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_" - + "permissions_request_resource\030\246\305\267\321\001 \001(\0132/" - + ".google.cloud.compute.v1.TestPermissions" - + "RequestB\003\340A\002\022\024\n\004zone\030\254\307\344\001 \001(\tB\003\340A\002\"\331\001\n\'T" - + "estIamPermissionsResourcePolicyRequest\022\027" - + "\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001" - + "(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!tes" - + "t_permissions_request_resource\030\246\305\267\321\001 \001(\013" - + "2/.google.cloud.compute.v1.TestPermissio" - + "nsRequestB\003\340A\002\"\334\001\n*TestIamPermissionsSer" - + "viceAttachmentRequest\022\027\n\007project\030\231\226\301l \001(" - + "\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010resour" - + "ce\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permissions_req" - + "uest_resource\030\246\305\267\321\001 \001(\0132/.google.cloud.c" - + "ompute.v1.TestPermissionsRequestB\003\340A\002\"\273\001" - + "\n!TestIamPermissionsSnapshotRequest\022\027\n\007p" - + "roject\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(" - + "\tB\003\340A\002\022c\n!test_permissions_request_resou" - + "rce\030\246\305\267\321\001 \001(\0132/.google.cloud.compute.v1." - + "TestPermissionsRequestB\003\340A\002\"\325\001\n#TestIamP" - + "ermissionsSubnetworkRequest\022\027\n\007project\030\231" - + "\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010" + + "sRequestB\003\340A\002\"\273\001\n!TestIamPermissionsSnap" + + "shotRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\010" + "resource\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permissio" + "ns_request_resource\030\246\305\267\321\001 \001(\0132/.google.c" + "loud.compute.v1.TestPermissionsRequestB\003" - + "\340A\002\"\325\001\n#TestIamPermissionsVpnGatewayRequ" + + "\340A\002\"\325\001\n#TestIamPermissionsSubnetworkRequ" + "est\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364" + "\315\240B \001(\tB\003\340A\002\022\030\n\010resource\030\216\210\257] \001(\tB\003\340A\002\022c" + "\n!test_permissions_request_resource\030\246\305\267\321" + "\001 \001(\0132/.google.cloud.compute.v1.TestPerm" - + "issionsRequestB\003\340A\002\"0\n\026TestPermissionsRe" - + "quest\022\026\n\013permissions\030\204\351\313\034 \003(\t\"1\n\027TestPer" - + "missionsResponse\022\026\n\013permissions\030\204\351\313\034 \003(\t" - + "\"D\n\007Uint128\022\024\n\004high\030\242\273\303\001 \001(\004H\000\210\001\001\022\022\n\003low" - + "\030\324\306\006 \001(\004H\001\210\001\001B\007\n\005_highB\006\n\004_low\"\234\002\n!Updat" - + "eAccessConfigInstanceRequest\022N\n\026access_c" - + "onfig_resource\030\220\377\366\270\001 \001(\0132%.google.cloud." - + "compute.v1.AccessConfigB\003\340A\002\022\030\n\010instance" - + "\030\225\251\332\010 \001(\tB\003\340A\002\022\"\n\021network_interface\030\350\300\235\256" - + "\001 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pr" - + "oject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zon" - + "e\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\372\001" - + "\n\027UpdateAutoscalerRequest\022\033\n\nautoscaler\030" - + "\327\375\322\366\001 \001(\tH\000\210\001\001\022H\n\023autoscaler_resource\030\366\360" - + "\377b \001(\0132#.google.cloud.compute.v1.Autosca" - + "lerB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" - + "ect\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\033\n\004zone\030" - + "\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_autoscalerB\r\n\013_" - + "request_id\"\334\001\n\032UpdateBackendBucketReques" - + "t\022\036\n\016backend_bucket\030\365\343\335+ \001(\tB\003\340A\002\022P\n\027bac" - + "kend_bucket_resource\030\230\316\307\265\001 \001(\0132&.google." - + "cloud.compute.v1.BackendBucketB\003\340A\002\022!\n\007p" - + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreques" - + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\341\001\n\033Up" - + "dateBackendServiceRequest\022 \n\017backend_ser" - + "vice\030\212\300\256\222\001 \001(\tB\003\340A\002\022R\n\030backend_service_r" - + "esource\030\243\201\337\245\001 \001(\0132\'.google.cloud.compute" - + ".v1.BackendServiceB\003\340A\002\022!\n\007project\030\231\226\301l " - + "\001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001B\r\n\013_request_id\"\241\002\n\021UpdateDiskRequ" - + "est\022\024\n\004disk\030\235\233\274\001 \001(\tB\003\340A\002\022<\n\rdisk_resour" - + "ce\030\360\320\253\014 \001(\0132\035.google.cloud.compute.v1.Di" - + "skB\003\340A\002\022\025\n\005paths\030\356\301\3402 \001(\tH\000\210\001\001\022!\n\007projec" - + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030" - + "\313\201\331\021 \001(\tH\001\210\001\001\022\034\n\013update_mask\030\242\271\272\356\001 \001(\tH\002" - + "\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\010\n\006_pat" - + "hsB\r\n\013_request_idB\016\n\014_update_mask\"\373\001\n\"Up" - + "dateDisplayDeviceInstanceRequest\022P\n\027disp" - + "lay_device_resource\030\332\204\221\212\001 \001(\0132&.google.c" - + "loud.compute.v1.DisplayDeviceB\003\340A\002\022\030\n\010in" - + "stance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" - + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" - + "\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_req" - + "uest_id\"\306\001\n\025UpdateFirewallRequest\022\031\n\010fir" - + "ewall\030\200\372\325\363\001 \001(\tB\003\340A\002\022D\n\021firewall_resourc" - + "e\030\355\260\340\023 \001(\0132!.google.cloud.compute.v1.Fir" - + "ewallB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pr" - + "oject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_re" - + "quest_id\"\324\001\n\030UpdateHealthCheckRequest\022\035\n" - + "\014health_check\030\345\252\244\223\001 \001(\tB\003\340A\002\022K\n\025health_c" - + "heck_resource\030\250\303\244` \001(\0132$.google.cloud.co" - + "mpute.v1.HealthCheckB\003\340A\002\022!\n\007project\030\231\226\301" - + "l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 " - + "\001(\tH\000\210\001\001B\r\n\013_request_id\"\345\003\n\025UpdateInstan" - + "ceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022D\n\021i" - + "nstance_resource\030\370\360\376f \001(\0132!.google.cloud" - + ".compute.v1.InstanceB\003\340A\002\022\037\n\016minimal_act" - + "ion\030\224\215\202\201\001 \001(\tH\000\210\001\001\022.\n\036most_disruptive_al" - + "lowed_action\030\215\316\302\037 \001(\tH\001\210\001\001\022!\n\007project\030\231\226" + + "issionsRequestB\003\340A\002\"\325\001\n#TestIamPermissio" + + "nsVpnGatewayRequest\022\027\n\007project\030\231\226\301l \001(\tB" + + "\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022\030\n\010resource" + + "\030\216\210\257] \001(\tB\003\340A\002\022c\n!test_permissions_reque" + + "st_resource\030\246\305\267\321\001 \001(\0132/.google.cloud.com" + + "pute.v1.TestPermissionsRequestB\003\340A\002\"0\n\026T" + + "estPermissionsRequest\022\026\n\013permissions\030\204\351\313" + + "\034 \003(\t\"1\n\027TestPermissionsResponse\022\026\n\013perm" + + "issions\030\204\351\313\034 \003(\t\"D\n\007Uint128\022\024\n\004high\030\242\273\303\001" + + " \001(\004H\000\210\001\001\022\022\n\003low\030\324\306\006 \001(\004H\001\210\001\001B\007\n\005_highB\006" + + "\n\004_low\"\234\002\n!UpdateAccessConfigInstanceReq" + + "uest\022N\n\026access_config_resource\030\220\377\366\270\001 \001(\013" + + "2%.google.cloud.compute.v1.AccessConfigB" + + "\003\340A\002\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022\"\n\021networ" + + "k_interface\030\350\300\235\256\001 \001(\tB\003\340A\002\022!\n\007project\030\231\226" + "\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021" - + " \001(\tH\002\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zone\"-", - "\n\rMinimalAction\022\034\n\030UNDEFINED_MINIMAL_ACT" - + "ION\020\000\"K\n\033MostDisruptiveAllowedAction\022,\n(" - + "UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION" - + "\020\000B\021\n\017_minimal_actionB!\n\037_most_disruptiv" - + "e_allowed_actionB\r\n\013_request_id\"\250\002\n%Upda" - + "teNetworkInterfaceInstanceRequest\022\030\n\010ins" - + "tance\030\225\251\332\010 \001(\tB\003\340A\002\022\"\n\021network_interface" - + "\030\350\300\235\256\001 \001(\tB\003\340A\002\022V\n\032network_interface_res" - + "ource\030\205\224\256\233\001 \001(\0132).google.cloud.compute.v" - + "1.NetworkInterfaceB\003\340A\002\022!\n\007project\030\231\226\301l " - + "\001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(" - + "\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_" - + "request_id\"\365\001\n\033UpdatePeeringNetworkReque" - + "st\022\027\n\007network\030\256\264\205o \001(\tB\003\340A\002\022o\n(networks_" - + "update_peering_request_resource\030\331\252\202k \001(\013" - + "25.google.cloud.compute.v1.NetworksUpdat" - + "ePeeringRequestB\003\340A\002\022!\n\007project\030\231\226\301l \001(\t" - + "B\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" - + "\210\001\001B\r\n\013_request_id\"\346\002\n3UpdatePerInstance" - + "ConfigsInstanceGroupManagerRequest\022&\n\026in" - + "stance_group_manager\030\303\367\363v \001(\tB\003\340A\002\022\233\001\n@i" - + "nstance_group_managers_update_per_instan" - + "ce_configs_req_resource\030\276\301\266C \001(\0132I.googl" - + "e.cloud.compute.v1.InstanceGroupManagers" - + "UpdatePerInstanceConfigsReqB\003\340A\002\022!\n\007proj" - + "ect\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_i" - + "d\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004" - + "zoneB\r\n\013_request_id\"\362\002\n9UpdatePerInstanc" - + "eConfigsRegionInstanceGroupManagerReques" - + "t\022&\n\026instance_group_manager\030\303\367\363v \001(\tB\003\340A" - + "\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006" - + "region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\235\001\nAregion" - + "_instance_group_manager_update_instance_" - + "config_req_resource\030\247\256\272* \001(\0132J.google.cl" - + "oud.compute.v1.RegionInstanceGroupManage" - + "rUpdateInstanceConfigReqB\003\340A\002\022\032\n\nrequest" - + "_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\204\002\n\035Upd" - + "ateRegionAutoscalerRequest\022\033\n\nautoscaler" - + "\030\327\375\322\366\001 \001(\tH\000\210\001\001\022H\n\023autoscaler_resource\030\366" - + "\360\377b \001(\0132#.google.cloud.compute.v1.Autosc" - + "alerB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007pro" - + "ject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n" - + "\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001B\r\n\013_autoscaler" - + "B\r\n\013_request_id\"\210\002\n!UpdateRegionBackendS" - + "erviceRequest\022 \n\017backend_service\030\212\300\256\222\001 \001" - + "(\tB\003\340A\002\022R\n\030backend_service_resource\030\243\201\337\245" - + "\001 \001(\0132\'.google.cloud.compute.v1.BackendS" - + "erviceB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" - + "roject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022" - + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_" - + "id\"\304\002\n\035UpdateRegionCommitmentRequest\022\033\n\n" - + "commitment\030\225\226\363\345\001 \001(\tB\003\340A\002\022H\n\023commitment_" - + "resource\030\370\243\273t \001(\0132#.google.cloud.compute" - + ".v1.CommitmentB\003\340A\002\022\025\n\005paths\030\356\301\3402 \001(\tH\000\210" - + "\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n" - + "\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nreques" - + "t_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\034\n\013update_mask\030\242\271\272\356\001 " - + "\001(\tH\002\210\001\001B\010\n\006_pathsB\r\n\013_request_idB\016\n\014_up" - + "date_mask\"\253\002\n\027UpdateRegionDiskRequest\022\024\n" - + "\004disk\030\235\233\274\001 \001(\tB\003\340A\002\022<\n\rdisk_resource\030\360\320\253" - + "\014 \001(\0132\035.google.cloud.compute.v1.DiskB\003\340A" - + "\002\022\025\n\005paths\030\356\301\3402 \001(\tH\000\210\001\001\022!\n\007project\030\231\226\301l" - + " \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014" - + "\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001" - + "\022\034\n\013update_mask\030\242\271\272\356\001 \001(\tH\002\210\001\001B\010\n\006_paths" - + "B\r\n\013_request_idB\016\n\014_update_mask\"\373\001\n\036Upda" - + "teRegionHealthCheckRequest\022\035\n\014health_che" - + "ck\030\345\252\244\223\001 \001(\tB\003\340A\002\022K\n\025health_check_resour" - + "ce\030\250\303\244` \001(\0132$.google.cloud.compute.v1.He" - + "althCheckB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362" - + "G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006regi" - + "on\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_reque" - + "st_id\"\347\001\n\031UpdateRegionUrlMapRequest\022!\n\007p" - + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region" - + "\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201" - + "\331\021 \001(\tH\000\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB\003\340A\002\022A\n" - + "\020url_map_resource\030\341\220\267P \001(\0132\037.google.clou" - + "d.compute.v1.UrlMapB\003\340A\002B\r\n\013_request_id\"" - + "\276\002\n\030UpdateReservationRequest\022\025\n\005paths\030\356\301" - + "\3402 \001(\tH\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" - + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\033\n\013re" - + "servation\030\314\207\325\026 \001(\tB\003\340A\002\022K\n\024reservation_r" - + "esource\030\241\356\364\207\001 \001(\0132$.google.cloud.compute" - + ".v1.ReservationB\003\340A\002\022\034\n\013update_mask\030\242\271\272\356" - + "\001 \001(\tH\002\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB" - + "\010\n\006_pathsB\r\n\013_request_idB\016\n\014_update_mask" - + "\"\336\001\n\023UpdateRouterRequest\022!\n\007project\030\231\226\301l" - + " \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014" - + "\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001" - + "\022\026\n\006router\030\311\256\356F \001(\tB\003\340A\002\022@\n\017router_resou" - + "rce\030\304\200\202J \001(\0132\037.google.cloud.compute.v1.R" - + "outerB\003\340A\002B\r\n\013_request_id\"\227\002\n+UpdateShie" - + "ldedInstanceConfigInstanceRequest\022\030\n\010ins" - + "tance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB" - + "\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210" - + "\001\001\022c\n!shielded_instance_config_resource\030" - + "\330\226\335\201\001 \001(\0132/.google.cloud.compute.v1.Shie" - + "ldedInstanceConfigB\003\340A\002\022\033\n\004zone\030\254\307\344\001 \001(\t" - + "B\n\340A\002\362G\004zoneB\r\n\013_request_id\"\300\001\n\023UpdateUr" + + " \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r" + + "\n\013_request_id\"\372\001\n\027UpdateAutoscalerReques" + + "t\022\033\n\nautoscaler\030\327\375\322\366\001 \001(\tH\000\210\001\001\022H\n\023autosc" + + "aler_resource\030\366\360\377b \001(\0132#.google.cloud.co" + + "mpute.v1.AutoscalerB\003\340A\002\022!\n\007project\030\231\226\301l" + + " \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021 \001" + + "(\tH\001\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013" + + "_autoscalerB\r\n\013_request_id\"\334\001\n\032UpdateBac" + + "kendBucketRequest\022\036\n\016backend_bucket\030\365\343\335+" + + " \001(\tB\003\340A\002\022P\n\027backend_bucket_resource\030\230\316\307" + + "\265\001 \001(\0132&.google.cloud.compute.v1.Backend" + + "BucketB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" + + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_r" + + "equest_id\"\341\001\n\033UpdateBackendServiceReques" + + "t\022 \n\017backend_service\030\212\300\256\222\001 \001(\tB\003\340A\002\022R\n\030b" + + "ackend_service_resource\030\243\201\337\245\001 \001(\0132\'.goog" + + "le.cloud.compute.v1.BackendServiceB\003\340A\002\022" + + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" + + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\241\002" + + "\n\021UpdateDiskRequest\022\024\n\004disk\030\235\233\274\001 \001(\tB\003\340A" + + "\002\022<\n\rdisk_resource\030\360\320\253\014 \001(\0132\035.google.clo" + + "ud.compute.v1.DiskB\003\340A\002\022\025\n\005paths\030\356\301\3402 \001(" + + "\tH\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007projec" + + "t\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\034\n\013update_" + + "mask\030\242\271\272\356\001 \001(\tH\002\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A" + + "\002\362G\004zoneB\010\n\006_pathsB\r\n\013_request_idB\016\n\014_up" + + "date_mask\"\373\001\n\"UpdateDisplayDeviceInstanc" + + "eRequest\022P\n\027display_device_resource\030\332\204\221\212" + + "\001 \001(\0132&.google.cloud.compute.v1.DisplayD" + + "eviceB\003\340A\002\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007" + + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreque" + + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A" + + "\002\362G\004zoneB\r\n\013_request_id\"\306\001\n\025UpdateFirewa" + + "llRequest\022\031\n\010firewall\030\200\372\325\363\001 \001(\tB\003\340A\002\022D\n\021" + + "firewall_resource\030\355\260\340\023 \001(\0132!.google.clou" + + "d.compute.v1.FirewallB\003\340A\002\022!\n\007project\030\231\226" + + "\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331\021" + + " \001(\tH\000\210\001\001B\r\n\013_request_id\"\324\001\n\030UpdateHealt" + + "hCheckRequest\022\035\n\014health_check\030\345\252\244\223\001 \001(\tB" + + "\003\340A\002\022K\n\025health_check_resource\030\250\303\244` \001(\0132$", + ".google.cloud.compute.v1.HealthCheckB\003\340A" + + "\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\n" + + "request_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"" + + "\345\003\n\025UpdateInstanceRequest\022\030\n\010instance\030\225\251" + + "\332\010 \001(\tB\003\340A\002\022D\n\021instance_resource\030\370\360\376f \001(" + + "\0132!.google.cloud.compute.v1.InstanceB\003\340A" + + "\002\022\037\n\016minimal_action\030\224\215\202\201\001 \001(\tH\000\210\001\001\022.\n\036mo" + + "st_disruptive_allowed_action\030\215\316\302\037 \001(\tH\001\210" + + "\001\001\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n" + + "\nrequest_id\030\313\201\331\021 \001(\tH\002\210\001\001\022\033\n\004zone\030\254\307\344\001 \001" + + "(\tB\n\340A\002\362G\004zone\"-\n\rMinimalAction\022\034\n\030UNDEF" + + "INED_MINIMAL_ACTION\020\000\"K\n\033MostDisruptiveA" + + "llowedAction\022,\n(UNDEFINED_MOST_DISRUPTIV" + + "E_ALLOWED_ACTION\020\000B\021\n\017_minimal_actionB!\n" + + "\037_most_disruptive_allowed_actionB\r\n\013_req" + + "uest_id\"\250\002\n%UpdateNetworkInterfaceInstan" + + "ceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022\"\n\021n" + + "etwork_interface\030\350\300\235\256\001 \001(\tB\003\340A\002\022V\n\032netwo" + + "rk_interface_resource\030\205\224\256\233\001 \001(\0132).google" + + ".cloud.compute.v1.NetworkInterfaceB\003\340A\002\022" + + "!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nre" + + "quest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030\254\307\344\001 \001(\tB" + + "\n\340A\002\362G\004zoneB\r\n\013_request_id\"\365\001\n\033UpdatePee" + + "ringNetworkRequest\022\027\n\007network\030\256\264\205o \001(\tB\003" + + "\340A\002\022o\n(networks_update_peering_request_r" + + "esource\030\331\252\202k \001(\01325.google.cloud.compute." + + "v1.NetworksUpdatePeeringRequestB\003\340A\002\022!\n\007" + + "project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreque" + + "st_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_request_id\"\346\002\n3U" + + "pdatePerInstanceConfigsInstanceGroupMana" + + "gerRequest\022&\n\026instance_group_manager\030\303\367\363" + + "v \001(\tB\003\340A\002\022\233\001\n@instance_group_managers_u" + + "pdate_per_instance_configs_req_resource\030" + + "\276\301\266C \001(\0132I.google.cloud.compute.v1.Insta" + + "nceGroupManagersUpdatePerInstanceConfigs" + + "ReqB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007proj" + + "ect\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\033\n\004zone\030" + + "\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request_id\"\362\002\n9" + + "UpdatePerInstanceConfigsRegionInstanceGr" + + "oupManagerRequest\022&\n\026instance_group_mana" + + "ger\030\303\367\363v \001(\tB\003\340A\002\022!\n\007project\030\231\226\301l \001(\tB\r\340" + + "A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006r" + + "egion\022\235\001\nAregion_instance_group_manager_" + + "update_instance_config_req_resource\030\247\256\272*" + + " \001(\0132J.google.cloud.compute.v1.RegionIns" + + "tanceGroupManagerUpdateInstanceConfigReq" + + "B\003\340A\002\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001B\r\n\013_re" + + "quest_id\"\204\002\n\035UpdateRegionAutoscalerReque" + + "st\022\033\n\nautoscaler\030\327\375\322\366\001 \001(\tH\000\210\001\001\022H\n\023autos" + + "caler_resource\030\366\360\377b \001(\0132#.google.cloud.c" + + "ompute.v1.AutoscalerB\003\340A\002\022!\n\007project\030\231\226\301" + + "l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB" + + "\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001" + + "\001B\r\n\013_autoscalerB\r\n\013_request_id\"\210\002\n!Upda" + + "teRegionBackendServiceRequest\022 \n\017backend" + + "_service\030\212\300\256\222\001 \001(\tB\003\340A\002\022R\n\030backend_servi" + + "ce_resource\030\243\201\337\245\001 \001(\0132\'.google.cloud.com" + + "pute.v1.BackendServiceB\003\340A\002\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(" + + "\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000" + + "\210\001\001B\r\n\013_request_id\"\304\002\n\035UpdateRegionCommi" + + "tmentRequest\022\033\n\ncommitment\030\225\226\363\345\001 \001(\tB\003\340A" + + "\002\022H\n\023commitment_resource\030\370\243\273t \001(\0132#.goog" + + "le.cloud.compute.v1.CommitmentB\003\340A\002\022\025\n\005p" + + "aths\030\356\301\3402 \001(\tH\000\210\001\001\022!\n\007project\030\231\226\301l \001(\tB\r" + + "\340A\002\362G\007project\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006" + + "region\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\001\210\001\001\022\034\n\013up" + + "date_mask\030\242\271\272\356\001 \001(\tH\002\210\001\001B\010\n\006_pathsB\r\n\013_r" + + "equest_idB\016\n\014_update_mask\"\253\002\n\027UpdateRegi" + + "onDiskRequest\022\024\n\004disk\030\235\233\274\001 \001(\tB\003\340A\002\022<\n\rd" + + "isk_resource\030\360\320\253\014 \001(\0132\035.google.cloud.com" + + "pute.v1.DiskB\003\340A\002\022\025\n\005paths\030\356\301\3402 \001(\tH\000\210\001\001" + + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006r" + + "egion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_" + + "id\030\313\201\331\021 \001(\tH\001\210\001\001\022\034\n\013update_mask\030\242\271\272\356\001 \001(" + + "\tH\002\210\001\001B\010\n\006_pathsB\r\n\013_request_idB\016\n\014_upda" + + "te_mask\"\373\001\n\036UpdateRegionHealthCheckReque" + + "st\022\035\n\014health_check\030\345\252\244\223\001 \001(\tB\003\340A\002\022K\n\025hea" + + "lth_check_resource\030\250\303\244` \001(\0132$.google.clo" + + "ud.compute.v1.HealthCheckB\003\340A\002\022!\n\007projec" + + "t\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006region\030\364\315\240B" + + " \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_id\030\313\201\331\021 \001(" + + "\tH\000\210\001\001B\r\n\013_request_id\"\347\001\n\031UpdateRegionUr" + "lMapRequest\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007p" - + "roject\022\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\030\n\007ur" - + "l_map\030\214\225\201\257\001 \001(\tB\003\340A\002\022A\n\020url_map_resource" - + "\030\341\220\267P \001(\0132\037.google.cloud.compute.v1.UrlM" - + "apB\003\340A\002B\r\n\013_request_id\"\337\006\n\006UrlMap\022\"\n\022cre" - + "ation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022O\n\024default" - + "_route_action\030\252\264\327\264\001 \001(\0132(.google.cloud.c" - + "ompute.v1.HttpRouteActionH\001\210\001\001\022 \n\017defaul" - + "t_service\030\267\345\305\260\001 \001(\tH\002\210\001\001\022R\n\024default_url_" - + "redirect\030\352\253\266\253\001 \001(\0132+.google.cloud.comput" - + "e.v1.HttpRedirectActionH\003\210\001\001\022\034\n\013descript" - + "ion\030\374\207\326\311\001 \001(\tH\004\210\001\001\022\033\n\013fingerprint\030\344\321\363o \001" - + "(\tH\005\210\001\001\022I\n\rheader_action\030\250\240\270\234\001 \001(\0132).goo" - + "gle.cloud.compute.v1.HttpHeaderActionH\006\210" - + "\001\001\0229\n\nhost_rules\030\240\207\327\224\001 \003(\0132!.google.clou" - + "d.compute.v1.HostRule\022\020\n\002id\030\233\032 \001(\004H\007\210\001\001\022" - + "\024\n\004kind\030\224\367\310\001 \001(\tH\010\210\001\001\022\024\n\004name\030\213\365\315\001 \001(\tH\t" - + "\210\001\001\022?\n\rpath_matchers\030\333\210\305\201\001 \003(\0132$.google." - + "cloud.compute.v1.PathMatcher\022\026\n\006region\030\364" - + "\315\240B \001(\tH\n\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\013\210\001\001" - + "\0225\n\005tests\030\241\234\3114 \003(\0132#.google.cloud.comput" - + "e.v1.UrlMapTestB\025\n\023_creation_timestampB\027" - + "\n\025_default_route_actionB\022\n\020_default_serv" - + "iceB\027\n\025_default_url_redirectB\016\n\014_descrip" - + "tionB\016\n\014_fingerprintB\020\n\016_header_actionB\005" - + "\n\003_idB\007\n\005_kindB\007\n\005_nameB\t\n\007_regionB\014\n\n_s" - + "elf_link\"\235\002\n\nUrlMapList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" - + "\001\0221\n\005items\030\300\317\367/ \003(\0132\037.google.cloud.compu" - + "te.v1.UrlMap\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017ne" - + "xt_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link" - + "\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .go" - + "ogle.cloud.compute.v1.WarningH\004\210\001\001B\005\n\003_i" - + "dB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_" - + "linkB\n\n\010_warning\"7\n\017UrlMapReference\022\030\n\007u" - + "rl_map\030\214\225\201\257\001 \001(\tH\000\210\001\001B\n\n\010_url_map\"\360\002\n\nUr" - + "lMapTest\022\034\n\013description\030\374\207\326\311\001 \001(\tH\000\210\001\001\022$" - + "\n\023expected_output_url\030\230\242\367\316\001 \001(\tH\001\210\001\001\022/\n\037" - + "expected_redirect_response_code\030\357\352\200\t \001(\005" - + "H\002\210\001\001\022=\n\007headers\030\206\337\235{ \003(\0132).google.cloud" - + ".compute.v1.UrlMapTestHeader\022\024\n\004host\030\250\353\303" - + "\001 \001(\tH\003\210\001\001\022\024\n\004path\030\245\310\321\001 \001(\tH\004\210\001\001\022\030\n\007serv" - + "ice\030\265\215\217\262\001 \001(\tH\005\210\001\001B\016\n\014_descriptionB\026\n\024_e" - + "xpected_output_urlB\"\n _expected_redirect" - + "_response_codeB\007\n\005_hostB\007\n\005_pathB\n\n\010_ser" - + "vice\"R\n\020UrlMapTestHeader\022\024\n\004name\030\213\365\315\001 \001(" - + "\tH\000\210\001\001\022\025\n\005value\030\361\242\2625 \001(\tH\001\210\001\001B\007\n\005_nameB\010" - + "\n\006_value\"\322\001\n\026UrlMapValidationResult\022\027\n\013l" - + "oad_errors\030\344\361\361\223\001 \003(\t\022\036\n\016load_succeeded\030\310" - + "\264\230= \001(\010H\000\210\001\001\022?\n\rtest_failures\030\266\342\237\361\001 \003(\0132" - + "$.google.cloud.compute.v1.TestFailure\022\033\n" - + "\013test_passed\030\275\201\362[ \001(\010H\001\210\001\001B\021\n\017_load_succ" - + "eededB\016\n\014_test_passed\"\265\003\n\025UrlMapsAggrega" - + "tedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022K\n\005items\030\300\317\367/ " - + "\003(\01329.google.cloud.compute.v1.UrlMapsAgg" - + "regatedList.ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH" - + "\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n" - + "\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachable" - + "s\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 .google." - + "cloud.compute.v1.WarningH\004\210\001\001\032X\n\nItemsEn" - + "try\022\013\n\003key\030\001 \001(\t\0229\n\005value\030\002 \001(\0132*.google" - + ".cloud.compute.v1.UrlMapsScopedList:\0028\001B" - + "\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n\n_" - + "self_linkB\n\n\010_warning\"\220\001\n\021UrlMapsScopedL" - + "ist\0224\n\010url_maps\030\347\216\2441 \003(\0132\037.google.cloud." - + "compute.v1.UrlMap\0229\n\007warning\030\234\337\226\030 \001(\0132 ." - + "google.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010" - + "_warning\"\230\002\n\026UrlMapsValidateRequest\022!\n\026l" - + "oad_balancing_schemes\030\257\205\201\003 \003(\t\0229\n\010resour" - + "ce\030\216\210\257] \001(\0132\037.google.cloud.compute.v1.Ur" - + "lMapH\000\210\001\001\"\222\001\n\024LoadBalancingSchemes\022$\n UN" - + "DEFINED_LOAD_BALANCING_SCHEMES\020\000\022\017\n\010EXTE" - + "RNAL\020\313\247\375\020\022\030\n\020EXTERNAL_MANAGED\020\213\266\222\364\001\022)\n!L" - + "OAD_BALANCING_SCHEME_UNSPECIFIED\020\274\273\207\373\001B\013" - + "\n\t_resource\"m\n\027UrlMapsValidateResponse\022G" - + "\n\006result\030\235\220\267B \001(\0132/.google.cloud.compute" - + ".v1.UrlMapValidationResultH\000\210\001\001B\t\n\007_resu" - + "lt\"x\n\nUrlRewrite\022\034\n\014host_rewrite\030\365\313\232L \001(" - + "\tH\000\210\001\001\022#\n\023path_prefix_rewrite\030\271\350\321\023 \001(\tH\001" - + "\210\001\001B\017\n\r_host_rewriteB\026\n\024_path_prefix_rew" - + "rite\"\242\007\n\020UsableSubnetwork\022$\n\024external_ip" - + "v6_prefix\030\366\222\266B \001(\tH\000\210\001\001\022%\n\024internal_ipv6" - + "_prefix\030\350\242\264\361\001 \001(\tH\001\210\001\001\022\035\n\rip_cidr_range\030" - + "\312\315\344. \001(\tH\002\210\001\001\022!\n\020ipv6_access_type\030\335\365\321\360\001 " - + "\001(\tH\003\210\001\001\022\027\n\007network\030\256\264\205o \001(\tH\004\210\001\001\022\030\n\007pur" - + "pose\030\236\372\357\226\001 \001(\tH\005\210\001\001\022\024\n\004role\030\366\200\326\001 \001(\tH\006\210\001" - + "\001\022W\n\023secondary_ip_ranges\030\343\377\224A \003(\01327.goog" - + "le.cloud.compute.v1.UsableSubnetworkSeco" - + "ndaryRange\022\033\n\nstack_type\030\221\265\213\313\001 \001(\tH\007\210\001\001\022" - + "\033\n\nsubnetwork\030\356\247\344\222\001 \001(\tH\010\210\001\001\"S\n\016Ipv6Acce" - + "ssType\022\036\n\032UNDEFINED_IPV6_ACCESS_TYPE\020\000\022\017" - + "\n\010EXTERNAL\020\313\247\375\020\022\020\n\010INTERNAL\020\275\355\226\205\001\"\256\001\n\007Pu" - + "rpose\022\025\n\021UNDEFINED_PURPOSE\020\000\022#\n\034INTERNAL" - + "_HTTPS_LOAD_BALANCER\020\331\266\316v\022\017\n\007PRIVATE\020\343\342\262" - + "\300\001\022\027\n\020PRIVATE_RFC_1918\020\333\376\305y\022\036\n\027PRIVATE_S" - + "ERVICE_CONNECT\020\304\364\371\026\022\035\n\026REGIONAL_MANAGED_" - + "PROXY\020\356\266\375H\":\n\004Role\022\022\n\016UNDEFINED_ROLE\020\000\022\016" - + "\n\006ACTIVE\020\206\346\211\226\001\022\016\n\006BACKUP\020\302\323\315\242\001\"I\n\tStackT" - + "ype\022\030\n\024UNDEFINED_STACK_TYPE\020\000\022\020\n\tIPV4_IP" - + "V6\020\201\350\312\n\022\020\n\tIPV4_ONLY\020\246\313\325\nB\027\n\025_external_i" - + "pv6_prefixB\027\n\025_internal_ipv6_prefixB\020\n\016_" - + "ip_cidr_rangeB\023\n\021_ipv6_access_typeB\n\n\010_n" - + "etworkB\n\n\010_purposeB\007\n\005_roleB\r\n\013_stack_ty" - + "peB\r\n\013_subnetwork\"}\n\036UsableSubnetworkSec" - + "ondaryRange\022\035\n\rip_cidr_range\030\312\315\344. \001(\tH\000\210" - + "\001\001\022\033\n\nrange_name\030\315\360\264\236\001 \001(\tH\001\210\001\001B\020\n\016_ip_c" - + "idr_rangeB\r\n\013_range_name\"\274\002\n\037UsableSubne" - + "tworksAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022;" - + "\n\005items\030\300\317\367/ \003(\0132).google.cloud.compute." - + "v1.UsableSubnetwork\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001" - + "\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tse" + + "roject\022\037\n\006region\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022" + + "\032\n\nrequest_id\030\313\201\331\021 \001(\tH\000\210\001\001\022\030\n\007url_map\030\214" + + "\225\201\257\001 \001(\tB\003\340A\002\022A\n\020url_map_resource\030\341\220\267P \001" + + "(\0132\037.google.cloud.compute.v1.UrlMapB\003\340A\002" + + "B\r\n\013_request_id\"\276\002\n\030UpdateReservationReq" + + "uest\022\025\n\005paths\030\356\301\3402 \001(\tH\000\210\001\001\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331" + + "\021 \001(\tH\001\210\001\001\022\033\n\013reservation\030\314\207\325\026 \001(\tB\003\340A\002\022" + + "K\n\024reservation_resource\030\241\356\364\207\001 \001(\0132$.goog" + + "le.cloud.compute.v1.ReservationB\003\340A\002\022\034\n\013" + + "update_mask\030\242\271\272\356\001 \001(\tH\002\210\001\001\022\033\n\004zone\030\254\307\344\001 " + + "\001(\tB\n\340A\002\362G\004zoneB\010\n\006_pathsB\r\n\013_request_id" + + "B\016\n\014_update_mask\"\336\001\n\023UpdateRouterRequest" + + "\022!\n\007project\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\037\n\006r" + + "egion\030\364\315\240B \001(\tB\014\340A\002\362G\006region\022\032\n\nrequest_" + + "id\030\313\201\331\021 \001(\tH\000\210\001\001\022\026\n\006router\030\311\256\356F \001(\tB\003\340A\002" + + "\022@\n\017router_resource\030\304\200\202J \001(\0132\037.google.cl" + + "oud.compute.v1.RouterB\003\340A\002B\r\n\013_request_i" + + "d\"\227\002\n+UpdateShieldedInstanceConfigInstan" + + "ceRequest\022\030\n\010instance\030\225\251\332\010 \001(\tB\003\340A\002\022!\n\007p" + + "roject\030\231\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nreques" + + "t_id\030\313\201\331\021 \001(\tH\000\210\001\001\022c\n!shielded_instance_" + + "config_resource\030\330\226\335\201\001 \001(\0132/.google.cloud" + + ".compute.v1.ShieldedInstanceConfigB\003\340A\002\022" + + "\033\n\004zone\030\254\307\344\001 \001(\tB\n\340A\002\362G\004zoneB\r\n\013_request" + + "_id\"\300\001\n\023UpdateUrlMapRequest\022!\n\007project\030\231" + + "\226\301l \001(\tB\r\340A\002\362G\007project\022\032\n\nrequest_id\030\313\201\331" + + "\021 \001(\tH\000\210\001\001\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB\003\340A\002\022A\n\020" + + "url_map_resource\030\341\220\267P \001(\0132\037.google.cloud" + + ".compute.v1.UrlMapB\003\340A\002B\r\n\013_request_id\"\337" + + "\006\n\006UrlMap\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\t" + + "H\000\210\001\001\022O\n\024default_route_action\030\252\264\327\264\001 \001(\0132" + + "(.google.cloud.compute.v1.HttpRouteActio" + + "nH\001\210\001\001\022 \n\017default_service\030\267\345\305\260\001 \001(\tH\002\210\001\001" + + "\022R\n\024default_url_redirect\030\352\253\266\253\001 \001(\0132+.goo" + + "gle.cloud.compute.v1.HttpRedirectActionH" + + "\003\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\004\210\001\001\022\033\n\013fi" + + "ngerprint\030\344\321\363o \001(\tH\005\210\001\001\022I\n\rheader_action" + + "\030\250\240\270\234\001 \001(\0132).google.cloud.compute.v1.Htt" + + "pHeaderActionH\006\210\001\001\0229\n\nhost_rules\030\240\207\327\224\001 \003" + + "(\0132!.google.cloud.compute.v1.HostRule\022\020\n" + + "\002id\030\233\032 \001(\004H\007\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\010\210\001\001\022\024\n" + + "\004name\030\213\365\315\001 \001(\tH\t\210\001\001\022?\n\rpath_matchers\030\333\210\305" + + "\201\001 \003(\0132$.google.cloud.compute.v1.PathMat" + + "cher\022\026\n\006region\030\364\315\240B \001(\tH\n\210\001\001\022\032\n\tself_lin" + + "k\030\215\222\305\331\001 \001(\tH\013\210\001\001\0225\n\005tests\030\241\234\3114 \003(\0132#.goo" + + "gle.cloud.compute.v1.UrlMapTestB\025\n\023_crea" + + "tion_timestampB\027\n\025_default_route_actionB" + + "\022\n\020_default_serviceB\027\n\025_default_url_redi" + + "rectB\016\n\014_descriptionB\016\n\014_fingerprintB\020\n\016" + + "_header_actionB\005\n\003_idB\007\n\005_kindB\007\n\005_nameB" + + "\t\n\007_regionB\014\n\n_self_link\"\235\002\n\nUrlMapList\022" + + "\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0221\n\005items\030\300\317\367/ \003(\0132\037.go" + + "ogle.cloud.compute.v1.UrlMap\022\024\n\004kind\030\224\367\310" + + "\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002" + + "\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warni" + + "ng\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Wa" + + "rningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page" + + "_tokenB\014\n\n_self_linkB\n\n\010_warning\"7\n\017UrlM" + + "apReference\022\030\n\007url_map\030\214\225\201\257\001 \001(\tH\000\210\001\001B\n\n" + + "\010_url_map\"\360\002\n\nUrlMapTest\022\034\n\013description\030" + + "\374\207\326\311\001 \001(\tH\000\210\001\001\022$\n\023expected_output_url\030\230\242" + + "\367\316\001 \001(\tH\001\210\001\001\022/\n\037expected_redirect_respon" + + "se_code\030\357\352\200\t \001(\005H\002\210\001\001\022=\n\007headers\030\206\337\235{ \003(" + + "\0132).google.cloud.compute.v1.UrlMapTestHe" + + "ader\022\024\n\004host\030\250\353\303\001 \001(\tH\003\210\001\001\022\024\n\004path\030\245\310\321\001 " + + "\001(\tH\004\210\001\001\022\030\n\007service\030\265\215\217\262\001 \001(\tH\005\210\001\001B\016\n\014_d" + + "escriptionB\026\n\024_expected_output_urlB\"\n _e" + + "xpected_redirect_response_codeB\007\n\005_hostB" + + "\007\n\005_pathB\n\n\010_service\"R\n\020UrlMapTestHeader" + + "\022\024\n\004name\030\213\365\315\001 \001(\tH\000\210\001\001\022\025\n\005value\030\361\242\2625 \001(\t" + + "H\001\210\001\001B\007\n\005_nameB\010\n\006_value\"\322\001\n\026UrlMapValid" + + "ationResult\022\027\n\013load_errors\030\344\361\361\223\001 \003(\t\022\036\n\016" + + "load_succeeded\030\310\264\230= \001(\010H\000\210\001\001\022?\n\rtest_fai" + + "lures\030\266\342\237\361\001 \003(\0132$.google.cloud.compute.v" + + "1.TestFailure\022\033\n\013test_passed\030\275\201\362[ \001(\010H\001\210" + + "\001\001B\021\n\017_load_succeededB\016\n\014_test_passed\"\265\003" + + "\n\025UrlMapsAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001" + + "\001\022K\n\005items\030\300\317\367/ \003(\01329.google.cloud.compu" + + "te.v1.UrlMapsAggregatedList.ItemsEntry\022\024" + + "\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030" + + "\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001" + + "\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337" + + "\226\030 \001(\0132 .google.cloud.compute.v1.Warning" + + "H\004\210\001\001\032X\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\0229\n\005valu" + + "e\030\002 \001(\0132*.google.cloud.compute.v1.UrlMap" + + "sScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next" + + "_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\220\001" + + "\n\021UrlMapsScopedList\0224\n\010url_maps\030\347\216\2441 \003(\013" + + "2\037.google.cloud.compute.v1.UrlMap\0229\n\007war" + + "ning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1." + + "WarningH\000\210\001\001B\n\n\010_warning\"\230\002\n\026UrlMapsVali" + + "dateRequest\022!\n\026load_balancing_schemes\030\257\205" + + "\201\003 \003(\t\0229\n\010resource\030\216\210\257] \001(\0132\037.google.clo" + + "ud.compute.v1.UrlMapH\000\210\001\001\"\222\001\n\024LoadBalanc" + + "ingSchemes\022$\n UNDEFINED_LOAD_BALANCING_S" + + "CHEMES\020\000\022\017\n\010EXTERNAL\020\313\247\375\020\022\030\n\020EXTERNAL_MA" + + "NAGED\020\213\266\222\364\001\022)\n!LOAD_BALANCING_SCHEME_UNS" + + "PECIFIED\020\274\273\207\373\001B\013\n\t_resource\"m\n\027UrlMapsVa" + + "lidateResponse\022G\n\006result\030\235\220\267B \001(\0132/.goog" + + "le.cloud.compute.v1.UrlMapValidationResu" + + "ltH\000\210\001\001B\t\n\007_result\"x\n\nUrlRewrite\022\034\n\014host" + + "_rewrite\030\365\313\232L \001(\tH\000\210\001\001\022#\n\023path_prefix_re" + + "write\030\271\350\321\023 \001(\tH\001\210\001\001B\017\n\r_host_rewriteB\026\n\024" + + "_path_prefix_rewrite\"\242\007\n\020UsableSubnetwor" + + "k\022$\n\024external_ipv6_prefix\030\366\222\266B \001(\tH\000\210\001\001\022" + + "%\n\024internal_ipv6_prefix\030\350\242\264\361\001 \001(\tH\001\210\001\001\022\035" + + "\n\rip_cidr_range\030\312\315\344. \001(\tH\002\210\001\001\022!\n\020ipv6_ac" + + "cess_type\030\335\365\321\360\001 \001(\tH\003\210\001\001\022\027\n\007network\030\256\264\205o" + + " \001(\tH\004\210\001\001\022\030\n\007purpose\030\236\372\357\226\001 \001(\tH\005\210\001\001\022\024\n\004r" + + "ole\030\366\200\326\001 \001(\tH\006\210\001\001\022W\n\023secondary_ip_ranges" + + "\030\343\377\224A \003(\01327.google.cloud.compute.v1.Usab" + + "leSubnetworkSecondaryRange\022\033\n\nstack_type" + + "\030\221\265\213\313\001 \001(\tH\007\210\001\001\022\033\n\nsubnetwork\030\356\247\344\222\001 \001(\tH" + + "\010\210\001\001\"S\n\016Ipv6AccessType\022\036\n\032UNDEFINED_IPV6" + + "_ACCESS_TYPE\020\000\022\017\n\010EXTERNAL\020\313\247\375\020\022\020\n\010INTER" + + "NAL\020\275\355\226\205\001\"\256\001\n\007Purpose\022\025\n\021UNDEFINED_PURPO" + + "SE\020\000\022#\n\034INTERNAL_HTTPS_LOAD_BALANCER\020\331\266\316" + + "v\022\017\n\007PRIVATE\020\343\342\262\300\001\022\027\n\020PRIVATE_RFC_1918\020\333" + + "\376\305y\022\036\n\027PRIVATE_SERVICE_CONNECT\020\304\364\371\026\022\035\n\026R" + + "EGIONAL_MANAGED_PROXY\020\356\266\375H\":\n\004Role\022\022\n\016UN" + + "DEFINED_ROLE\020\000\022\016\n\006ACTIVE\020\206\346\211\226\001\022\016\n\006BACKUP" + + "\020\302\323\315\242\001\"I\n\tStackType\022\030\n\024UNDEFINED_STACK_T" + + "YPE\020\000\022\020\n\tIPV4_IPV6\020\201\350\312\n\022\020\n\tIPV4_ONLY\020\246\313\325" + + "\nB\027\n\025_external_ipv6_prefixB\027\n\025_internal_" + + "ipv6_prefixB\020\n\016_ip_cidr_rangeB\023\n\021_ipv6_a" + + "ccess_typeB\n\n\010_networkB\n\n\010_purposeB\007\n\005_r" + + "oleB\r\n\013_stack_typeB\r\n\013_subnetwork\"}\n\036Usa" + + "bleSubnetworkSecondaryRange\022\035\n\rip_cidr_r" + + "ange\030\312\315\344. \001(\tH\000\210\001\001\022\033\n\nrange_name\030\315\360\264\236\001 \001" + + "(\tH\001\210\001\001B\020\n\016_ip_cidr_rangeB\r\n\013_range_name" + + "\"\274\002\n\037UsableSubnetworksAggregatedList\022\020\n\002" + + "id\030\233\032 \001(\tH\000\210\001\001\022;\n\005items\030\300\317\367/ \003(\0132).googl" + + "e.cloud.compute.v1.UsableSubnetwork\022\024\n\004k" + + "ind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206" + + "& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229" + + "\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comput" + + "e.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_ne" + + "xt_page_tokenB\014\n\n_self_linkB\n\n\010_warning\"" + + "\177\n\023UsageExportLocation\022\034\n\013bucket_name\030\300\227" + + "\236\207\001 \001(\tH\000\210\001\001\022#\n\022report_name_prefix\030\273\260\327\230\001" + + " \001(\tH\001\210\001\001B\016\n\014_bucket_nameB\025\n\023_report_nam" + + "e_prefix\"\332\001\n\033ValidateRegionUrlMapRequest" + + "\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B" + + " \001(\tB\003\340A\002\022p\n)region_url_maps_validate_re" + + "quest_resource\030\232\314\200\033 \001(\01325.google.cloud.c" + + "ompute.v1.RegionUrlMapsValidateRequestB\003" + + "\340A\002\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB\003\340A\002\"\260\001\n\025Valida" + + "teUrlMapRequest\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002" + + "\022\030\n\007url_map\030\214\225\201\257\001 \001(\tB\003\340A\002\022d\n\"url_maps_v" + + "alidate_request_resource\030\357\321\344\274\001 \001(\0132/.goo" + + "gle.cloud.compute.v1.UrlMapsValidateRequ" + + "estB\003\340A\002\"\257\001\n\025VmEndpointNatMappings\022\035\n\rin" + + "stance_name\030\365\347\330l \001(\tH\000\210\001\001\022e\n\026interface_n" + + "at_mappings\030\211\200\225z \003(\0132B.google.cloud.comp" + + "ute.v1.VmEndpointNatMappingsInterfaceNat" + + "MappingsB\020\n\016_instance_name\"\342\003\n)VmEndpoin" + + "tNatMappingsInterfaceNatMappings\022$\n\030drai" + + "n_nat_ip_port_ranges\030\301\343\307\274\001 \003(\t\022\036\n\022nat_ip" + + "_port_ranges\030\232\260\314\375\001 \003(\t\022*\n\031num_total_drai" + + "n_nat_ports\030\371\245\377\237\001 \001(\005H\000\210\001\001\022$\n\023num_total_" + + "nat_ports\030\200\333\200\217\001 \001(\005H\001\210\001\001\022l\n\rrule_mapping" + + "s\030\310\356\352\347\001 \003(\0132Q.google.cloud.compute.v1.Vm" + + "EndpointNatMappingsInterfaceNatMappingsN" + + "atRuleMappings\022&\n\025source_alias_ip_range\030" + + "\330\243\374\321\001 \001(\tH\002\210\001\001\022!\n\021source_virtual_ip\030\377\242\271G" + + " \001(\tH\003\210\001\001B\034\n\032_num_total_drain_nat_portsB" + + "\026\n\024_num_total_nat_portsB\030\n\026_source_alias" + + "_ip_rangeB\024\n\022_source_virtual_ip\"\266\002\n8VmEn" + + "dpointNatMappingsInterfaceNatMappingsNat" + + "RuleMappings\022$\n\030drain_nat_ip_port_ranges" + + "\030\301\343\307\274\001 \003(\t\022\036\n\022nat_ip_port_ranges\030\232\260\314\375\001 \003" + + "(\t\022*\n\031num_total_drain_nat_ports\030\371\245\377\237\001 \001(" + + "\005H\000\210\001\001\022$\n\023num_total_nat_ports\030\200\333\200\217\001 \001(\005H" + + "\001\210\001\001\022\034\n\013rule_number\030\354\333\232\377\001 \001(\005H\002\210\001\001B\034\n\032_n" + + "um_total_drain_nat_portsB\026\n\024_num_total_n" + + "at_portsB\016\n\014_rule_number\"\274\002\n\031VmEndpointN" + + "atMappingsList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022\024\n\004kind" + + "\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001" + + "(\tH\002\210\001\001\022A\n\006result\030\235\220\267B \003(\0132..google.clou" + + "d.compute.v1.VmEndpointNatMappings\022\032\n\tse" + "lf_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001" + "(\0132 .google.cloud.compute.v1.WarningH\004\210\001" + "\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB\014\n" - + "\n_self_linkB\n\n\010_warning\"\177\n\023UsageExportLo" - + "cation\022\034\n\013bucket_name\030\300\227\236\207\001 \001(\tH\000\210\001\001\022#\n\022" - + "report_name_prefix\030\273\260\327\230\001 \001(\tH\001\210\001\001B\016\n\014_bu" - + "cket_nameB\025\n\023_report_name_prefix\"\332\001\n\033Val" - + "idateRegionUrlMapRequest\022\027\n\007project\030\231\226\301l" - + " \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\022p\n)reg" - + "ion_url_maps_validate_request_resource\030\232" - + "\314\200\033 \001(\01325.google.cloud.compute.v1.Region" - + "UrlMapsValidateRequestB\003\340A\002\022\030\n\007url_map\030\214" - + "\225\201\257\001 \001(\tB\003\340A\002\"\260\001\n\025ValidateUrlMapRequest\022" - + "\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\030\n\007url_map\030\214\225\201\257" - + "\001 \001(\tB\003\340A\002\022d\n\"url_maps_validate_request_" - + "resource\030\357\321\344\274\001 \001(\0132/.google.cloud.comput" - + "e.v1.UrlMapsValidateRequestB\003\340A\002\"\257\001\n\025VmE" - + "ndpointNatMappings\022\035\n\rinstance_name\030\365\347\330l" - + " \001(\tH\000\210\001\001\022e\n\026interface_nat_mappings\030\211\200\225z" - + " \003(\0132B.google.cloud.compute.v1.VmEndpoin" - + "tNatMappingsInterfaceNatMappingsB\020\n\016_ins" - + "tance_name\"\342\003\n)VmEndpointNatMappingsInte" - + "rfaceNatMappings\022$\n\030drain_nat_ip_port_ra" - + "nges\030\301\343\307\274\001 \003(\t\022\036\n\022nat_ip_port_ranges\030\232\260\314" - + "\375\001 \003(\t\022*\n\031num_total_drain_nat_ports\030\371\245\377\237" - + "\001 \001(\005H\000\210\001\001\022$\n\023num_total_nat_ports\030\200\333\200\217\001 " - + "\001(\005H\001\210\001\001\022l\n\rrule_mappings\030\310\356\352\347\001 \003(\0132Q.go" - + "ogle.cloud.compute.v1.VmEndpointNatMappi" - + "ngsInterfaceNatMappingsNatRuleMappings\022&" - + "\n\025source_alias_ip_range\030\330\243\374\321\001 \001(\tH\002\210\001\001\022!" - + "\n\021source_virtual_ip\030\377\242\271G \001(\tH\003\210\001\001B\034\n\032_nu" - + "m_total_drain_nat_portsB\026\n\024_num_total_na" - + "t_portsB\030\n\026_source_alias_ip_rangeB\024\n\022_so" - + "urce_virtual_ip\"\266\002\n8VmEndpointNatMapping" - + "sInterfaceNatMappingsNatRuleMappings\022$\n\030" - + "drain_nat_ip_port_ranges\030\301\343\307\274\001 \003(\t\022\036\n\022na" - + "t_ip_port_ranges\030\232\260\314\375\001 \003(\t\022*\n\031num_total_" - + "drain_nat_ports\030\371\245\377\237\001 \001(\005H\000\210\001\001\022$\n\023num_to" - + "tal_nat_ports\030\200\333\200\217\001 \001(\005H\001\210\001\001\022\034\n\013rule_num" - + "ber\030\354\333\232\377\001 \001(\005H\002\210\001\001B\034\n\032_num_total_drain_n" - + "at_portsB\026\n\024_num_total_nat_portsB\016\n\014_rul" - + "e_number\"\274\002\n\031VmEndpointNatMappingsList\022\020" - + "\n\002id\030\233\032 \001(\tH\000\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037" - + "\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022A\n\006resul" - + "t\030\235\220\267B \003(\0132..google.cloud.compute.v1.VmE" - + "ndpointNatMappings\022\032\n\tself_link\030\215\222\305\331\001 \001(" - + "\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.clou" - + "d.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_kin" - + "dB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n\010_" - + "warning\"\265\005\n\nVpnGateway\022\"\n\022creation_times" - + "tamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 " - + "\001(\tH\001\210\001\001\022\020\n\002id\030\233\032 \001(\004H\002\210\001\001\022\024\n\004kind\030\224\367\310\001 " - + "\001(\tH\003\210\001\001\022!\n\021label_fingerprint\030\231\360\367T \001(\tH\004" - + "\210\001\001\022C\n\006labels\030\377\277\301\356\001 \003(\0132/.google.cloud.c" - + "ompute.v1.VpnGateway.LabelsEntry\022\024\n\004name" - + "\030\213\365\315\001 \001(\tH\005\210\001\001\022\027\n\007network\030\256\264\205o \001(\tH\006\210\001\001\022" - + "\026\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022\032\n\tself_link\030\215\222\305" - + "\331\001 \001(\tH\010\210\001\001\022\033\n\nstack_type\030\221\265\213\313\001 \001(\tH\t\210\001\001" - + "\022Q\n\016vpn_interfaces\030\205\315\345+ \003(\01326.google.clo" - + "ud.compute.v1.VpnGatewayVpnGatewayInterf" - + "ace\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001\"I\n\tStackType\022\030\n\024UNDEFINED_STA" - + "CK_TYPE\020\000\022\020\n\tIPV4_IPV6\020\201\350\312\n\022\020\n\tIPV4_ONLY" - + "\020\246\313\325\nB\025\n\023_creation_timestampB\016\n\014_descrip" - + "tionB\005\n\003_idB\007\n\005_kindB\024\n\022_label_fingerpri" - + "ntB\007\n\005_nameB\n\n\010_networkB\t\n\007_regionB\014\n\n_s" - + "elf_linkB\r\n\013_stack_type\"\277\003\n\030VpnGatewayAg" - + "gregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022N\n\005items\030" - + "\300\317\367/ \003(\0132<.google.cloud.compute.v1.VpnGa" - + "tewayAggregatedList.ItemsEntry\022\024\n\004kind\030\224" - + "\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\t" - + "H\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unr" - + "eachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001(\0132 " - + ".google.cloud.compute.v1.WarningH\004\210\001\001\032\\\n" - + "\nItemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132" - + "..google.cloud.compute.v1.VpnGatewaysSco" - + "pedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_pag" - + "e_tokenB\014\n\n_self_linkB\n\n\010_warning\"\245\002\n\016Vp" - + "nGatewayList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0225\n\005items\030" - + "\300\317\367/ \003(\0132#.google.cloud.compute.v1.VpnGa" - + "teway\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page" - + "_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 " - + "\001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cl" - + "oud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_k" - + "indB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n" - + "\010_warning\"g\n\020VpnGatewayStatus\022S\n\017vpn_con" - + "nections\030\212\355\276\321\001 \003(\01326.google.cloud.comput" - + "e.v1.VpnGatewayStatusVpnConnection\"\321\002\n0V" - + "pnGatewayStatusHighAvailabilityRequireme" - + "ntState\022\025\n\005state\030\221\211\2534 \001(\tH\000\210\001\001\022\"\n\022unsati" - + "sfied_reason\030\212\367\235\032 \001(\tH\001\210\001\001\"f\n\005State\022\023\n\017U" - + "NDEFINED_STATE\020\000\022!\n\031CONNECTION_REDUNDANC" - + "Y_MET\020\233\312\365\360\001\022%\n\035CONNECTION_REDUNDANCY_NOT" - + "_MET\020\217\324\211\364\001\"Y\n\021UnsatisfiedReason\022 \n\034UNDEF" - + "INED_UNSATISFIED_REASON\020\000\022\"\n\033INCOMPLETE_" - + "TUNNELS_COVERAGE\020\375\366\324\032B\010\n\006_stateB\025\n\023_unsa" - + "tisfied_reason\"\313\001\n\026VpnGatewayStatusTunne" - + "l\022\'\n\027local_gateway_interface\030\252\232\332K \001(\rH\000\210" - + "\001\001\022&\n\026peer_gateway_interface\030\341\336\234f \001(\rH\001\210" - + "\001\001\022\032\n\ntunnel_url\030\230\242\324% \001(\tH\002\210\001\001B\032\n\030_local" - + "_gateway_interfaceB\031\n\027_peer_gateway_inte" - + "rfaceB\r\n\013_tunnel_url\"\312\002\n\035VpnGatewayStatu" - + "sVpnConnection\022&\n\025peer_external_gateway\030" - + "\215\356\307\267\001 \001(\tH\000\210\001\001\022!\n\020peer_gcp_gateway\030\274\351\263\206\001" - + " \001(\tH\001\210\001\001\022`\n\005state\030\221\211\2534 \001(\0132I.google.clo" - + "ud.compute.v1.VpnGatewayStatusHighAvaila" - + "bilityRequirementStateH\002\210\001\001\022C\n\007tunnels\030\213" - + "\372\3551 \003(\0132/.google.cloud.compute.v1.VpnGat" - + "ewayStatusTunnelB\030\n\026_peer_external_gatew" - + "ayB\023\n\021_peer_gcp_gatewayB\010\n\006_state\"\252\001\n\035Vp" - + "nGatewayVpnGatewayInterface\022\020\n\002id\030\233\032 \001(\r" - + "H\000\210\001\001\022(\n\027interconnect_attachment\030\364\212\367\222\001 \001" - + "(\tH\001\210\001\001\022\033\n\nip_address\030\334\361\334\301\001 \001(\tH\002\210\001\001B\005\n\003" - + "_idB\032\n\030_interconnect_attachmentB\r\n\013_ip_a" - + "ddress\"l\n\034VpnGatewaysGetStatusResponse\022A" - + "\n\006result\030\235\220\267B \001(\0132).google.cloud.compute" - + ".v1.VpnGatewayStatusH\000\210\001\001B\t\n\007_result\"\234\001\n" - + "\025VpnGatewaysScopedList\022<\n\014vpn_gateways\030\232" - + "\373\312{ \003(\0132#.google.cloud.compute.v1.VpnGat" - + "eway\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud." - + "compute.v1.WarningH\000\210\001\001B\n\n\010_warning\"\357\n\n\t" - + "VpnTunnel\022\"\n\022creation_timestamp\030\266\217\307\016 \001(\t" - + "H\000\210\001\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\001\210\001\001\022 \n\017d" - + "etailed_status\030\341\244\203\237\001 \001(\tH\002\210\001\001\022\020\n\002id\030\233\032 \001" - + "(\004H\003\210\001\001\022\033\n\013ike_version\030\234\320\220h \001(\005H\004\210\001\001\022\024\n\004" - + "kind\030\224\367\310\001 \001(\tH\005\210\001\001\022\"\n\026local_traffic_sele" - + "ctor\030\265\254\247\227\001 \003(\t\022\024\n\004name\030\213\365\315\001 \001(\tH\006\210\001\001\022&\n\025" - + "peer_external_gateway\030\215\356\307\267\001 \001(\tH\007\210\001\001\0220\n\037" - + "peer_external_gateway_interface\030\207\345\362\327\001 \001(" - + "\005H\010\210\001\001\022!\n\020peer_gcp_gateway\030\274\351\263\206\001 \001(\tH\t\210\001" - + "\001\022\030\n\007peer_ip\030\244\332\337\266\001 \001(\tH\n\210\001\001\022\026\n\006region\030\364\315" - + "\240B \001(\tH\013\210\001\001\022#\n\027remote_traffic_selector\030\272" - + "\335\220\253\001 \003(\t\022\026\n\006router\030\311\256\356F \001(\tH\014\210\001\001\022\032\n\tself" - + "_link\030\215\222\305\331\001 \001(\tH\r\210\001\001\022\036\n\rshared_secret\030\312\247" - + "\217\266\001 \001(\tH\016\210\001\001\022#\n\022shared_secret_hash\030\343\350\231\276\001" - + " \001(\tH\017\210\001\001\022\026\n\006status\030\362\237\267V \001(\tH\020\210\001\001\022#\n\022tar" - + "get_vpn_gateway\030\313\200\366\375\001 \001(\tH\021\210\001\001\022\034\n\013vpn_ga" - + "teway\030\371\203\366\301\001 \001(\tH\022\210\001\001\022%\n\025vpn_gateway_inte" - + "rface\030\363\214\342- \001(\005H\023\210\001\001\"\323\002\n\006Status\022\024\n\020UNDEFI" - + "NED_STATUS\020\000\022\034\n\024ALLOCATING_RESOURCES\020\300\311\203" - + "\231\001\022\032\n\023AUTHORIZATION_ERROR\020\202\235\237\013\022\026\n\016DEPROV" - + "ISIONING\020\356\223\304\314\001\022\022\n\013ESTABLISHED\020\370\216\257*\022\016\n\006FA" - + "ILED\020\275\220\246\331\001\022\026\n\017FIRST_HANDSHAKE\020\350\331\241[\022\033\n\023NE" - + "GOTIATION_FAILURE\020\354\305\350\253\001\022\024\n\rNETWORK_ERROR" - + "\020\367\300\273\\\022\032\n\023NO_INCOMING_PACKETS\020\360\230\2339\022\024\n\014PRO" - + "VISIONING\020\355\365\332\212\001\022\017\n\010REJECTED\020\376\210\204S\022\017\n\007STOP" - + "PED\020\255\273\354\323\001\022\036\n\027WAITING_FOR_FULL_CONFIG\020\312\304\355" - + "\023B\025\n\023_creation_timestampB\016\n\014_description" - + "B\022\n\020_detailed_statusB\005\n\003_idB\016\n\014_ike_vers" - + "ionB\007\n\005_kindB\007\n\005_nameB\030\n\026_peer_external_" - + "gatewayB\"\n _peer_external_gateway_interf" - + "aceB\023\n\021_peer_gcp_gatewayB\n\n\010_peer_ipB\t\n\007" - + "_regionB\t\n\007_routerB\014\n\n_self_linkB\020\n\016_sha" - + "red_secretB\025\n\023_shared_secret_hashB\t\n\007_st" - + "atusB\025\n\023_target_vpn_gatewayB\016\n\014_vpn_gate" - + "wayB\030\n\026_vpn_gateway_interface\"\274\003\n\027VpnTun" - + "nelAggregatedList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022M\n\005i" - + "tems\030\300\317\367/ \003(\0132;.google.cloud.compute.v1." - + "VpnTunnelAggregatedList.ItemsEntry\022\024\n\004ki" - + "nd\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206&" - + " \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\022\027\n" - + "\014unreachables\030\237\240\206t \003(\t\0229\n\007warning\030\234\337\226\030 \001" - + "(\0132 .google.cloud.compute.v1.WarningH\004\210\001" - + "\001\032[\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 " - + "\001(\0132-.google.cloud.compute.v1.VpnTunnels" - + "ScopedList:\0028\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_" - + "page_tokenB\014\n\n_self_linkB\n\n\010_warning\"\243\002\n" - + "\rVpnTunnelList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0224\n\005item" - + "s\030\300\317\367/ \003(\0132\".google.cloud.compute.v1.Vpn" - + "Tunnel\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_pag" + + "\n_self_linkB\n\n\010_warning\"\265\005\n\nVpnGateway\022\"" + + "\n\022creation_timestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013de" + + "scription\030\374\207\326\311\001 \001(\tH\001\210\001\001\022\020\n\002id\030\233\032 \001(\004H\002\210" + + "\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\003\210\001\001\022!\n\021label_finger" + + "print\030\231\360\367T \001(\tH\004\210\001\001\022C\n\006labels\030\377\277\301\356\001 \003(\0132" + + "/.google.cloud.compute.v1.VpnGateway.Lab" + + "elsEntry\022\024\n\004name\030\213\365\315\001 \001(\tH\005\210\001\001\022\027\n\007networ" + + "k\030\256\264\205o \001(\tH\006\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\007\210\001\001\022" + + "\032\n\tself_link\030\215\222\305\331\001 \001(\tH\010\210\001\001\022\033\n\nstack_typ" + + "e\030\221\265\213\313\001 \001(\tH\t\210\001\001\022Q\n\016vpn_interfaces\030\205\315\345+ " + + "\003(\01326.google.cloud.compute.v1.VpnGateway" + + "VpnGatewayInterface\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"I\n\tStackType\022" + + "\030\n\024UNDEFINED_STACK_TYPE\020\000\022\020\n\tIPV4_IPV6\020\201" + + "\350\312\n\022\020\n\tIPV4_ONLY\020\246\313\325\nB\025\n\023_creation_times" + + "tampB\016\n\014_descriptionB\005\n\003_idB\007\n\005_kindB\024\n\022" + + "_label_fingerprintB\007\n\005_nameB\n\n\010_networkB" + + "\t\n\007_regionB\014\n\n_self_linkB\r\n\013_stack_type\"" + + "\277\003\n\030VpnGatewayAggregatedList\022\020\n\002id\030\233\032 \001(" + + "\tH\000\210\001\001\022N\n\005items\030\300\317\367/ \003(\0132<.google.cloud." + + "compute.v1.VpnGatewayAggregatedList.Item" + + "sEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_pag" + "e_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" - + " \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.c" - + "loud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_" - + "kindB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n" - + "\n\010_warning\"\231\001\n\024VpnTunnelsScopedList\022:\n\013v" - + "pn_tunnels\030\300\361\372M \003(\0132\".google.cloud.compu" - + "te.v1.VpnTunnel\0229\n\007warning\030\234\337\226\030 \001(\0132 .go" - + "ogle.cloud.compute.v1.WarningH\000\210\001\001B\n\n\010_w" - + "arning\"\214\001\n\020WafExpressionSet\022\022\n\007aliases\030\376" - + "\235\365K \003(\t\022K\n\013expressions\030\333\201\333S \003(\01323.google" - + ".cloud.compute.v1.WafExpressionSetExpres" - + "sion\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001B\005\n\003_id\"b\n\032WafExpr" - + "essionSetExpression\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\022\033\n" - + "\013sensitivity\030\237\275\220\r \001(\005H\001\210\001\001B\005\n\003_idB\016\n\014_se" - + "nsitivity\"P\n\032WaitGlobalOperationRequest\022" - + "\031\n\toperation\030\347\252\353\030 \001(\tB\003\340A\002\022\027\n\007project\030\231\226" - + "\301l \001(\tB\003\340A\002\"h\n\032WaitRegionOperationReques" + + " \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229\n\007wa" + + "rning\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1" + + ".WarningH\004\210\001\001\032\\\n\nItemsEntry\022\013\n\003key\030\001 \001(\t" + + "\022=\n\005value\030\002 \001(\0132..google.cloud.compute.v" + + "1.VpnGatewaysScopedList:\0028\001B\005\n\003_idB\007\n\005_k" + + "indB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n\n" + + "\010_warning\"\245\002\n\016VpnGatewayList\022\020\n\002id\030\233\032 \001(" + + "\tH\000\210\001\001\0225\n\005items\030\300\317\367/ \003(\0132#.google.cloud." + + "compute.v1.VpnGateway\022\024\n\004kind\030\224\367\310\001 \001(\tH\001" + + "\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\t" + + "self_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030" + + " \001(\0132 .google.cloud.compute.v1.WarningH\004" + + "\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_tokenB" + + "\014\n\n_self_linkB\n\n\010_warning\"g\n\020VpnGatewayS" + + "tatus\022S\n\017vpn_connections\030\212\355\276\321\001 \003(\01326.goo" + + "gle.cloud.compute.v1.VpnGatewayStatusVpn" + + "Connection\"\321\002\n0VpnGatewayStatusHighAvail" + + "abilityRequirementState\022\025\n\005state\030\221\211\2534 \001(" + + "\tH\000\210\001\001\022\"\n\022unsatisfied_reason\030\212\367\235\032 \001(\tH\001\210" + + "\001\001\"f\n\005State\022\023\n\017UNDEFINED_STATE\020\000\022!\n\031CONN" + + "ECTION_REDUNDANCY_MET\020\233\312\365\360\001\022%\n\035CONNECTIO" + + "N_REDUNDANCY_NOT_MET\020\217\324\211\364\001\"Y\n\021Unsatisfie" + + "dReason\022 \n\034UNDEFINED_UNSATISFIED_REASON\020" + + "\000\022\"\n\033INCOMPLETE_TUNNELS_COVERAGE\020\375\366\324\032B\010\n" + + "\006_stateB\025\n\023_unsatisfied_reason\"\313\001\n\026VpnGa" + + "tewayStatusTunnel\022\'\n\027local_gateway_inter" + + "face\030\252\232\332K \001(\rH\000\210\001\001\022&\n\026peer_gateway_inter" + + "face\030\341\336\234f \001(\rH\001\210\001\001\022\032\n\ntunnel_url\030\230\242\324% \001(" + + "\tH\002\210\001\001B\032\n\030_local_gateway_interfaceB\031\n\027_p" + + "eer_gateway_interfaceB\r\n\013_tunnel_url\"\312\002\n" + + "\035VpnGatewayStatusVpnConnection\022&\n\025peer_e" + + "xternal_gateway\030\215\356\307\267\001 \001(\tH\000\210\001\001\022!\n\020peer_g" + + "cp_gateway\030\274\351\263\206\001 \001(\tH\001\210\001\001\022`\n\005state\030\221\211\2534 " + + "\001(\0132I.google.cloud.compute.v1.VpnGateway" + + "StatusHighAvailabilityRequirementStateH\002" + + "\210\001\001\022C\n\007tunnels\030\213\372\3551 \003(\0132/.google.cloud.c" + + "ompute.v1.VpnGatewayStatusTunnelB\030\n\026_pee" + + "r_external_gatewayB\023\n\021_peer_gcp_gatewayB" + + "\010\n\006_state\"\252\001\n\035VpnGatewayVpnGatewayInterf" + + "ace\022\020\n\002id\030\233\032 \001(\rH\000\210\001\001\022(\n\027interconnect_at" + + "tachment\030\364\212\367\222\001 \001(\tH\001\210\001\001\022\033\n\nip_address\030\334\361" + + "\334\301\001 \001(\tH\002\210\001\001B\005\n\003_idB\032\n\030_interconnect_att" + + "achmentB\r\n\013_ip_address\"l\n\034VpnGatewaysGet" + + "StatusResponse\022A\n\006result\030\235\220\267B \001(\0132).goog" + + "le.cloud.compute.v1.VpnGatewayStatusH\000\210\001" + + "\001B\t\n\007_result\"\234\001\n\025VpnGatewaysScopedList\022<" + + "\n\014vpn_gateways\030\232\373\312{ \003(\0132#.google.cloud.c" + + "ompute.v1.VpnGateway\0229\n\007warning\030\234\337\226\030 \001(\013" + + "2 .google.cloud.compute.v1.WarningH\000\210\001\001B" + + "\n\n\010_warning\"\357\n\n\tVpnTunnel\022\"\n\022creation_ti" + + "mestamp\030\266\217\307\016 \001(\tH\000\210\001\001\022\034\n\013description\030\374\207\326" + + "\311\001 \001(\tH\001\210\001\001\022 \n\017detailed_status\030\341\244\203\237\001 \001(\t" + + "H\002\210\001\001\022\020\n\002id\030\233\032 \001(\004H\003\210\001\001\022\033\n\013ike_version\030\234" + + "\320\220h \001(\005H\004\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\005\210\001\001\022\"\n\026lo" + + "cal_traffic_selector\030\265\254\247\227\001 \003(\t\022\024\n\004name\030\213" + + "\365\315\001 \001(\tH\006\210\001\001\022&\n\025peer_external_gateway\030\215\356" + + "\307\267\001 \001(\tH\007\210\001\001\0220\n\037peer_external_gateway_in" + + "terface\030\207\345\362\327\001 \001(\005H\010\210\001\001\022!\n\020peer_gcp_gatew" + + "ay\030\274\351\263\206\001 \001(\tH\t\210\001\001\022\030\n\007peer_ip\030\244\332\337\266\001 \001(\tH\n" + + "\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\013\210\001\001\022#\n\027remote_tr" + + "affic_selector\030\272\335\220\253\001 \003(\t\022\026\n\006router\030\311\256\356F " + + "\001(\tH\014\210\001\001\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\r\210\001\001\022\036\n\r" + + "shared_secret\030\312\247\217\266\001 \001(\tH\016\210\001\001\022#\n\022shared_s" + + "ecret_hash\030\343\350\231\276\001 \001(\tH\017\210\001\001\022\026\n\006status\030\362\237\267V" + + " \001(\tH\020\210\001\001\022#\n\022target_vpn_gateway\030\313\200\366\375\001 \001(" + + "\tH\021\210\001\001\022\034\n\013vpn_gateway\030\371\203\366\301\001 \001(\tH\022\210\001\001\022%\n\025" + + "vpn_gateway_interface\030\363\214\342- \001(\005H\023\210\001\001\"\323\002\n\006" + + "Status\022\024\n\020UNDEFINED_STATUS\020\000\022\034\n\024ALLOCATI" + + "NG_RESOURCES\020\300\311\203\231\001\022\032\n\023AUTHORIZATION_ERRO" + + "R\020\202\235\237\013\022\026\n\016DEPROVISIONING\020\356\223\304\314\001\022\022\n\013ESTABL" + + "ISHED\020\370\216\257*\022\016\n\006FAILED\020\275\220\246\331\001\022\026\n\017FIRST_HAND" + + "SHAKE\020\350\331\241[\022\033\n\023NEGOTIATION_FAILURE\020\354\305\350\253\001\022" + + "\024\n\rNETWORK_ERROR\020\367\300\273\\\022\032\n\023NO_INCOMING_PAC" + + "KETS\020\360\230\2339\022\024\n\014PROVISIONING\020\355\365\332\212\001\022\017\n\010REJEC" + + "TED\020\376\210\204S\022\017\n\007STOPPED\020\255\273\354\323\001\022\036\n\027WAITING_FOR" + + "_FULL_CONFIG\020\312\304\355\023B\025\n\023_creation_timestamp" + + "B\016\n\014_descriptionB\022\n\020_detailed_statusB\005\n\003" + + "_idB\016\n\014_ike_versionB\007\n\005_kindB\007\n\005_nameB\030\n" + + "\026_peer_external_gatewayB\"\n _peer_externa" + + "l_gateway_interfaceB\023\n\021_peer_gcp_gateway" + + "B\n\n\010_peer_ipB\t\n\007_regionB\t\n\007_routerB\014\n\n_s" + + "elf_linkB\020\n\016_shared_secretB\025\n\023_shared_se" + + "cret_hashB\t\n\007_statusB\025\n\023_target_vpn_gate" + + "wayB\016\n\014_vpn_gatewayB\030\n\026_vpn_gateway_inte" + + "rface\"\274\003\n\027VpnTunnelAggregatedList\022\020\n\002id\030" + + "\233\032 \001(\tH\000\210\001\001\022M\n\005items\030\300\317\367/ \003(\0132;.google.c" + + "loud.compute.v1.VpnTunnelAggregatedList." + + "ItemsEntry\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next" + + "_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215" + + "\222\305\331\001 \001(\tH\003\210\001\001\022\027\n\014unreachables\030\237\240\206t \003(\t\0229" + + "\n\007warning\030\234\337\226\030 \001(\0132 .google.cloud.comput" + + "e.v1.WarningH\004\210\001\001\032[\n\nItemsEntry\022\013\n\003key\030\001" + + " \001(\t\022<\n\005value\030\002 \001(\0132-.google.cloud.compu" + + "te.v1.VpnTunnelsScopedList:\0028\001B\005\n\003_idB\007\n" + + "\005_kindB\022\n\020_next_page_tokenB\014\n\n_self_link" + + "B\n\n\010_warning\"\243\002\n\rVpnTunnelList\022\020\n\002id\030\233\032 " + + "\001(\tH\000\210\001\001\0224\n\005items\030\300\317\367/ \003(\0132\".google.clou" + + "d.compute.v1.VpnTunnel\022\024\n\004kind\030\224\367\310\001 \001(\tH" + + "\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n" + + "\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226" + + "\030 \001(\0132 .google.cloud.compute.v1.WarningH" + + "\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_token" + + "B\014\n\n_self_linkB\n\n\010_warning\"\231\001\n\024VpnTunnel" + + "sScopedList\022:\n\013vpn_tunnels\030\300\361\372M \003(\0132\".go" + + "ogle.cloud.compute.v1.VpnTunnel\0229\n\007warni" + + "ng\030\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Wa" + + "rningH\000\210\001\001B\n\n\010_warning\"\214\001\n\020WafExpression" + + "Set\022\022\n\007aliases\030\376\235\365K \003(\t\022K\n\013expressions\030\333" + + "\201\333S \003(\01323.google.cloud.compute.v1.WafExp", + "ressionSetExpression\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001B\005" + + "\n\003_id\"b\n\032WafExpressionSetExpression\022\020\n\002i" + + "d\030\233\032 \001(\tH\000\210\001\001\022\033\n\013sensitivity\030\237\275\220\r \001(\005H\001\210" + + "\001\001B\005\n\003_idB\016\n\014_sensitivity\"P\n\032WaitGlobalO" + + "perationRequest\022\031\n\toperation\030\347\252\353\030 \001(\tB\003\340" + + "A\002\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\"h\n\032WaitRegio" + + "nOperationRequest\022\031\n\toperation\030\347\252\353\030 \001(\tB" + + "\003\340A\002\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030" + + "\364\315\240B \001(\tB\003\340A\002\"d\n\030WaitZoneOperationReques" + "t\022\031\n\toperation\030\347\252\353\030 \001(\tB\003\340A\002\022\027\n\007project\030" - + "\231\226\301l \001(\tB\003\340A\002\022\026\n\006region\030\364\315\240B \001(\tB\003\340A\002\"d\n" - + "\030WaitZoneOperationRequest\022\031\n\toperation\030\347" - + "\252\353\030 \001(\tB\003\340A\002\022\027\n\007project\030\231\226\301l \001(\tB\003\340A\002\022\024\n", - "\004zone\030\254\307\344\001 \001(\tB\003\340A\002\"\272\010\n\007Warning\022\024\n\004code\030" - + "\355\333\272\001 \001(\tH\000\210\001\001\022.\n\004data\030\252\337\273\001 \003(\0132\035.google." - + "cloud.compute.v1.Data\022\030\n\007message\030\207\200\254\307\001 \001" - + "(\tH\001\210\001\001\"\271\007\n\004Code\022\022\n\016UNDEFINED_CODE\020\000\022\025\n\016" - + "CLEANUP_FAILED\020\330\214\326G\022 \n\030DEPRECATED_RESOUR" - + "CE_USED\020\302\337\353\272\001\022\034\n\024DEPRECATED_TYPE_USED\020\226\244" - + "\236\245\001\022(\n DISK_SIZE_LARGER_THAN_IMAGE_SIZE\020" - + "\227\201\225\260\001\022\036\n\026EXPERIMENTAL_TYPE_USED\020\213\216\301\327\001\022\033\n" - + "\024EXTERNAL_API_WARNING\020\303\277\332S\022\035\n\025FIELD_VALU" - + "E_OVERRIDEN\020\257\266\231\235\001\022#\n\033INJECTED_KERNELS_DE" - + "PRECATED\020\213\331\202\307\001\0224\n,INVALID_HEALTH_CHECK_F" - + "OR_DYNAMIC_WIEGHTED_LB\020\316\233\274\277\001\022 \n\030LARGE_DE" - + "PLOYMENT_WARNING\020\246\347\310\345\001\022\037\n\027MISSING_TYPE_D" - + "EPENDENCY\020\367\370\242\244\001\022%\n\035NEXT_HOP_ADDRESS_NOT_" - + "ASSIGNED\020\207\245\372\232\001\022\"\n\032NEXT_HOP_CANNOT_IP_FOR" - + "WARD\020\347\352\347\266\001\022.\n\'NEXT_HOP_INSTANCE_HAS_NO_I" - + "PV6_INTERFACE\020\222\350\374E\022#\n\033NEXT_HOP_INSTANCE_" - + "NOT_FOUND\020\316\314\257\335\001\022\'\n NEXT_HOP_INSTANCE_NOT" - + "_ON_NETWORK\020\302\350\235t\022\034\n\024NEXT_HOP_NOT_RUNNING" - + "\020\261\317\360\306\001\022\031\n\022NOT_CRITICAL_ERROR\020\324\250\2672\022\031\n\022NO_" - + "RESULTS_ON_PAGE\020\210\246\251\016\022\026\n\017PARTIAL_SUCCESS\020" - + "\205\256\207\023\022\035\n\026REQUIRED_TOS_AGREEMENT\020\203\316\344\001\0221\n)R" - + "ESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - + "\020\301\364\355\354\001\022\033\n\024RESOURCE_NOT_DELETED\020\274\267\262P\022!\n\031S" - + "CHEMA_VALIDATION_IGNORED\020\312\324\237\203\001\022(\n!SINGLE" - + "_INSTANCE_PROPERTY_TEMPLATE\020\321\211\370\177\022\035\n\025UNDE" - + "CLARED_PROPERTIES\020\237\206\233\272\001\022\022\n\013UNREACHABLE\020\264" - + "\275\255\006B\007\n\005_codeB\n\n\010_message\"\273\010\n\010Warnings\022\024\n" - + "\004code\030\355\333\272\001 \001(\tH\000\210\001\001\022.\n\004data\030\252\337\273\001 \003(\0132\035.g" - + "oogle.cloud.compute.v1.Data\022\030\n\007message\030\207" - + "\200\254\307\001 \001(\tH\001\210\001\001\"\271\007\n\004Code\022\022\n\016UNDEFINED_CODE" - + "\020\000\022\025\n\016CLEANUP_FAILED\020\330\214\326G\022 \n\030DEPRECATED_" - + "RESOURCE_USED\020\302\337\353\272\001\022\034\n\024DEPRECATED_TYPE_U" - + "SED\020\226\244\236\245\001\022(\n DISK_SIZE_LARGER_THAN_IMAGE" - + "_SIZE\020\227\201\225\260\001\022\036\n\026EXPERIMENTAL_TYPE_USED\020\213\216" - + "\301\327\001\022\033\n\024EXTERNAL_API_WARNING\020\303\277\332S\022\035\n\025FIEL" - + "D_VALUE_OVERRIDEN\020\257\266\231\235\001\022#\n\033INJECTED_KERN" - + "ELS_DEPRECATED\020\213\331\202\307\001\0224\n,INVALID_HEALTH_C" - + "HECK_FOR_DYNAMIC_WIEGHTED_LB\020\316\233\274\277\001\022 \n\030LA" - + "RGE_DEPLOYMENT_WARNING\020\246\347\310\345\001\022\037\n\027MISSING_" - + "TYPE_DEPENDENCY\020\367\370\242\244\001\022%\n\035NEXT_HOP_ADDRES" - + "S_NOT_ASSIGNED\020\207\245\372\232\001\022\"\n\032NEXT_HOP_CANNOT_" - + "IP_FORWARD\020\347\352\347\266\001\022.\n\'NEXT_HOP_INSTANCE_HA" - + "S_NO_IPV6_INTERFACE\020\222\350\374E\022#\n\033NEXT_HOP_INS" - + "TANCE_NOT_FOUND\020\316\314\257\335\001\022\'\n NEXT_HOP_INSTAN" - + "CE_NOT_ON_NETWORK\020\302\350\235t\022\034\n\024NEXT_HOP_NOT_R" - + "UNNING\020\261\317\360\306\001\022\031\n\022NOT_CRITICAL_ERROR\020\324\250\2672\022" - + "\031\n\022NO_RESULTS_ON_PAGE\020\210\246\251\016\022\026\n\017PARTIAL_SU" - + "CCESS\020\205\256\207\023\022\035\n\026REQUIRED_TOS_AGREEMENT\020\203\316\344" - + "\001\0221\n)RESOURCE_IN_USE_BY_OTHER_RESOURCE_W" - + "ARNING\020\301\364\355\354\001\022\033\n\024RESOURCE_NOT_DELETED\020\274\267\262" - + "P\022!\n\031SCHEMA_VALIDATION_IGNORED\020\312\324\237\203\001\022(\n!" - + "SINGLE_INSTANCE_PROPERTY_TEMPLATE\020\321\211\370\177\022\035" - + "\n\025UNDECLARED_PROPERTIES\020\237\206\233\272\001\022\022\n\013UNREACH" - + "ABLE\020\264\275\255\006B\007\n\005_codeB\n\n\010_message\"\317\001\n\026Weigh" - + "tedBackendService\022 \n\017backend_service\030\212\300\256" - + "\222\001 \001(\tH\000\210\001\001\022I\n\rheader_action\030\250\240\270\234\001 \001(\0132)" - + ".google.cloud.compute.v1.HttpHeaderActio" - + "nH\001\210\001\001\022\027\n\006weight\030\370\204\305\206\001 \001(\rH\002\210\001\001B\022\n\020_back" - + "end_serviceB\020\n\016_header_actionB\t\n\007_weight" - + "\"\237\002\n\013XpnHostList\022\020\n\002id\030\233\032 \001(\tH\000\210\001\001\0222\n\005it" - + "ems\030\300\317\367/ \003(\0132 .google.cloud.compute.v1.P" - + "roject\022\024\n\004kind\030\224\367\310\001 \001(\tH\001\210\001\001\022\037\n\017next_pag" - + "e_token\030\225\272\206& \001(\tH\002\210\001\001\022\032\n\tself_link\030\215\222\305\331\001" - + " \001(\tH\003\210\001\001\0229\n\007warning\030\234\337\226\030 \001(\0132 .google.c" - + "loud.compute.v1.WarningH\004\210\001\001B\005\n\003_idB\007\n\005_" - + "kindB\022\n\020_next_page_tokenB\014\n\n_self_linkB\n" - + "\n\010_warning\"\232\001\n\rXpnResourceId\022\020\n\002id\030\233\032 \001(" - + "\tH\000\210\001\001\022\024\n\004type\030\272\236\332\001 \001(\tH\001\210\001\001\"Q\n\004Type\022\022\n\016" - + "UNDEFINED_TYPE\020\000\022\017\n\007PROJECT\020\371\255\357\302\001\022$\n\035XPN" - + "_RESOURCE_TYPE_UNSPECIFIED\020\372\255\245HB\005\n\003_idB\007" - + "\n\005_type\"\227\004\n\004Zone\022\"\n\027available_cpu_platfo" - + "rms\030\223\363\331S \003(\t\022\"\n\022creation_timestamp\030\266\217\307\016 " - + "\001(\tH\000\210\001\001\022G\n\ndeprecated\030\263\313\321\365\001 \001(\0132*.googl" - + "e.cloud.compute.v1.DeprecationStatusH\001\210\001" - + "\001\022\034\n\013description\030\374\207\326\311\001 \001(\tH\002\210\001\001\022\020\n\002id\030\233\032" - + " \001(\004H\003\210\001\001\022\024\n\004kind\030\224\367\310\001 \001(\tH\004\210\001\001\022\024\n\004name\030" - + "\213\365\315\001 \001(\tH\005\210\001\001\022\026\n\006region\030\364\315\240B \001(\tH\006\210\001\001\022\032\n" - + "\tself_link\030\215\222\305\331\001 \001(\tH\007\210\001\001\022\026\n\006status\030\362\237\267V" - + " \001(\tH\010\210\001\001\022\034\n\014supports_pzs\030\356\366\205( \001(\010H\t\210\001\001\"" - + "4\n\006Status\022\024\n\020UNDEFINED_STATUS\020\000\022\013\n\004DOWN\020" - + "\242\271\200\001\022\007\n\002UP\020\233\025B\025\n\023_creation_timestampB\r\n\013" - + "_deprecatedB\016\n\014_descriptionB\005\n\003_idB\007\n\005_k" - + "indB\007\n\005_nameB\t\n\007_regionB\014\n\n_self_linkB\t\n" - + "\007_statusB\017\n\r_supports_pzs\"\231\002\n\010ZoneList\022\020" - + "\n\002id\030\233\032 \001(\tH\000\210\001\001\022/\n\005items\030\300\317\367/ \003(\0132\035.goo" - + "gle.cloud.compute.v1.Zone\022\024\n\004kind\030\224\367\310\001 \001" - + "(\tH\001\210\001\001\022\037\n\017next_page_token\030\225\272\206& \001(\tH\002\210\001\001" - + "\022\032\n\tself_link\030\215\222\305\331\001 \001(\tH\003\210\001\001\0229\n\007warning\030" - + "\234\337\226\030 \001(\0132 .google.cloud.compute.v1.Warni" - + "ngH\004\210\001\001B\005\n\003_idB\007\n\005_kindB\022\n\020_next_page_to" - + "kenB\014\n\n_self_linkB\n\n\010_warning\"\315\001\n\024ZoneSe" - + "tLabelsRequest\022!\n\021label_fingerprint\030\231\360\367T" - + " \001(\tH\000\210\001\001\022M\n\006labels\030\377\277\301\356\001 \003(\01329.google.c" - + "loud.compute.v1.ZoneSetLabelsRequest.Lab" - + "elsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" - + "value\030\002 \001(\t:\0028\001B\024\n\022_label_fingerprint\"\261\001" - + "\n\024ZoneSetPolicyRequest\0226\n\010bindings\030\216\305\244\300\001" - + " \003(\0132 .google.cloud.compute.v1.Binding\022\024" - + "\n\004etag\030\225\322\276\001 \001(\tH\000\210\001\001\0227\n\006policy\030\262\312\266+ \001(\0132" - + "\037.google.cloud.compute.v1.PolicyH\001\210\001\001B\007\n" - + "\005_etagB\t\n\007_policy2\263\006\n\020AcceleratorTypes\022\326" - + "\001\n\016AggregatedList\022>.google.cloud.compute" - + ".v1.AggregatedListAcceleratorTypesReques" - + "t\0326.google.cloud.compute.v1.AcceleratorT" - + "ypeAggregatedList\"L\202\323\344\223\002<\022:/compute/v1/p" - + "rojects/{project}/aggregated/accelerator" - + "Types\332A\007project\022\334\001\n\003Get\0222.google.cloud.c" - + "ompute.v1.GetAcceleratorTypeRequest\032(.go" - + "ogle.cloud.compute.v1.AcceleratorType\"w\202" - + "\323\344\223\002Q\022O/compute/v1/projects/{project}/zo" - + "nes/{zone}/acceleratorTypes/{accelerator" - + "_type}\332A\035project,zone,accelerator_type\022\277" - + "\001\n\004List\0224.google.cloud.compute.v1.ListAc" - + "celeratorTypesRequest\032,.google.cloud.com" - + "pute.v1.AcceleratorTypeList\"S\202\323\344\223\002>\022.goog" + + "le.cloud.compute.v1.AggregatedListAccele" + + "ratorTypesRequest\0326.google.cloud.compute" + + ".v1.AcceleratorTypeAggregatedList\"L\202\323\344\223\002" + + "<\022:/compute/v1/projects/{project}/aggreg" + + "ated/acceleratorTypes\332A\007project\022\334\001\n\003Get\022" + + "2.google.cloud.compute.v1.GetAccelerator" + + "TypeRequest\032(.google.cloud.compute.v1.Ac" + + "celeratorType\"w\202\323\344\223\002Q\022O/compute/v1/proje" + + "cts/{project}/zones/{zone}/acceleratorTy" + + "pes/{accelerator_type}\332A\035project,zone,ac" + + "celerator_type\022\277\001\n\004List\0224.google.cloud.c" + + "ompute.v1.ListAcceleratorTypesRequest\032,." + + "google.cloud.compute.v1.AcceleratorTypeL" + + "ist\"S\202\323\344\223\002>\022project,z" - + "one,disk,disks_add_resource_policies_req" - + "uest_resource\212N\016ZoneOperations\022\265\001\n\016Aggre" - + "gatedList\0223.google.cloud.compute.v1.Aggr" - + "egatedListDisksRequest\032+.google.cloud.co" - + "mpute.v1.DiskAggregatedList\"A\202\323\344\223\0021\022//co" - + "mpute/v1/projects/{project}/aggregated/d" - + "isks\332A\007project\022\204\002\n\016CreateSnapshot\0222.goog" - + "le.cloud.compute.v1.CreateSnapshotDiskRe" - + "quest\032\".google.cloud.compute.v1.Operatio" - + "n\"\231\001\202\323\344\223\002\\\"G/compute/v1/projects/{projec" - + "t}/zones/{zone}/disks/{disk}/createSnaps" - + "hot:\021snapshot_resource\332A#project,zone,di" - + "sk,snapshot_resource\212N\016ZoneOperations\022\277\001" - + "\n\006Delete\022*.google.cloud.compute.v1.Delet" - + "eDiskRequest\032\".google.cloud.compute.v1.O" - + "peration\"e\202\323\344\223\002:*8/compute/v1/projects/{" - + "project}/zones/{zone}/disks/{disk}\332A\021pro" - + "ject,zone,disk\212N\016ZoneOperations\022\243\001\n\003Get\022", - "\'.google.cloud.compute.v1.GetDiskRequest" - + "\032\035.google.cloud.compute.v1.Disk\"T\202\323\344\223\002:\022" - + "8/compute/v1/projects/{project}/zones/{z" - + "one}/disks/{disk}\332A\021project,zone,disk\022\314\001" - + "\n\014GetIamPolicy\0220.google.cloud.compute.v1" - + ".GetIamPolicyDiskRequest\032\037.google.cloud." - + "compute.v1.Policy\"i\202\323\344\223\002K\022I/compute/v1/p" - + "rojects/{project}/zones/{zone}/disks/{re" - + "source}/getIamPolicy\332A\025project,zone,reso" - + "urce\022\320\001\n\006Insert\022*.google.cloud.compute.v" - + "1.InsertDiskRequest\032\".google.cloud.compu" - + "te.v1.Operation\"v\202\323\344\223\002B\"1/compute/v1/pro" - + "jects/{project}/zones/{zone}/disks:\rdisk" - + "_resource\332A\032project,zone,disk_resource\212N" - + "\016ZoneOperations\022\236\001\n\004List\022).google.cloud." - + "compute.v1.ListDisksRequest\032!.google.clo" - + "ud.compute.v1.DiskList\"H\202\323\344\223\0023\0221/compute" - + "/v1/projects/{project}/zones/{zone}/disk" - + "s\332A\014project,zone\022\331\002\n\026RemoveResourcePolic" - + "ies\022:.google.cloud.compute.v1.RemoveReso" - + "urcePoliciesDiskRequest\032\".google.cloud.c" - + "ompute.v1.Operation\"\336\001\202\323\344\223\002\202\001\"O/compute/" - + "v1/projects/{project}/zones/{zone}/disks" - + "/{disk}/removeResourcePolicies:/disks_re" - + "move_resource_policies_request_resource\332" - + "AAproject,zone,disk,disks_remove_resourc" - + "e_policies_request_resource\212N\016ZoneOperat" - + "ions\022\204\002\n\006Resize\022*.google.cloud.compute.v" - + "1.ResizeDiskRequest\032\".google.cloud.compu" - + "te.v1.Operation\"\251\001\202\323\344\223\002`\"?/compute/v1/pr" - + "ojects/{project}/zones/{zone}/disks/{dis" - + "k}/resize:\035disks_resize_request_resource" - + "\332A/project,zone,disk,disks_resize_reques" - + "t_resource\212N\016ZoneOperations\022\220\002\n\014SetIamPo" - + "licy\0220.google.cloud.compute.v1.SetIamPol" - + "icyDiskRequest\032\037.google.cloud.compute.v1" - + ".Policy\"\254\001\202\323\344\223\002m\"I/compute/v1/projects/{" - + "project}/zones/{zone}/disks/{resource}/s" - + "etIamPolicy: zone_set_policy_request_res" - + "ource\332A6project,zone,resource,zone_set_p" - + "olicy_request_resource\022\233\002\n\tSetLabels\022-.g" - + "oogle.cloud.compute.v1.SetLabelsDiskRequ" - + "est\032\".google.cloud.compute.v1.Operation\"" - + "\272\001\202\323\344\223\002j\"F/compute/v1/projects/{project}" - + "/zones/{zone}/disks/{resource}/setLabels" - + ": zone_set_labels_request_resource\332A6pro" - + "ject,zone,resource,zone_set_labels_reque" - + "st_resource\212N\016ZoneOperations\022\265\002\n\022TestIam" - + "Permissions\0226.google.cloud.compute.v1.Te" - + "stIamPermissionsDiskRequest\0320.google.clo" - + "ud.compute.v1.TestPermissionsResponse\"\264\001" - + "\202\323\344\223\002t\"O/compute/v1/projects/{project}/z" - + "ones/{zone}/disks/{resource}/testIamPerm" - + "issions:!test_permissions_request_resour" - + "ce\332A7project,zone,resource,test_permissi" - + "ons_request_resource\022\335\001\n\006Update\022*.google" - + ".cloud.compute.v1.UpdateDiskRequest\032\".go" - + "ogle.cloud.compute.v1.Operation\"\202\001\202\323\344\223\002I" - + "28/compute/v1/projects/{project}/zones/{" - + "zone}/disks/{disk}:\rdisk_resource\332A\037proj" - + "ect,zone,disk,disk_resource\212N\016ZoneOperat" - + "ions\032r\312A\026compute.googleapis.com\322AVhttps:" - + "//www.googleapis.com/auth/compute,https:" - + "//www.googleapis.com/auth/cloud-platform" - + "2\251\r\n\023ExternalVpnGateways\022\363\001\n\006Delete\0228.go" - + "ogle.cloud.compute.v1.DeleteExternalVpnG" - + "atewayRequest\032\".google.cloud.compute.v1." - + "Operation\"\212\001\202\323\344\223\002R*P/compute/v1/projects" - + "/{project}/global/externalVpnGateways/{e" - + "xternal_vpn_gateway}\332A\034project,external_" - + "vpn_gateway\212N\020GlobalOperations\022\342\001\n\003Get\0225" - + ".google.cloud.compute.v1.GetExternalVpnG" - + "atewayRequest\032+.google.cloud.compute.v1." - + "ExternalVpnGateway\"w\202\323\344\223\002R\022P/compute/v1/" - + "projects/{project}/global/externalVpnGat" - + "eways/{external_vpn_gateway}\332A\034project,e" - + "xternal_vpn_gateway\022\204\002\n\006Insert\0228.google." - + "cloud.compute.v1.InsertExternalVpnGatewa" - + "yRequest\032\".google.cloud.compute.v1.Opera" - + "tion\"\233\001\202\323\344\223\002Z\"9/compute/v1/projects/{pro" - + "ject}/global/externalVpnGateways:\035extern" - + "al_vpn_gateway_resource\332A%project,extern" - + "al_vpn_gateway_resource\212N\020GlobalOperatio" - + "ns\022\275\001\n\004List\0227.google.cloud.compute.v1.Li" - + "stExternalVpnGatewaysRequest\032/.google.cl" - + "oud.compute.v1.ExternalVpnGatewayList\"K\202" - + "\323\344\223\002;\0229/compute/v1/projects/{project}/gl" - + "obal/externalVpnGateways\332A\007project\022\262\002\n\tS" - + "etLabels\022;.google.cloud.compute.v1.SetLa" - + "belsExternalVpnGatewayRequest\032\".google.c" - + "loud.compute.v1.Operation\"\303\001\202\323\344\223\002t\"N/com" + + "/{backend_service}\332A\027project,backend_ser" + + "vice\022\263\002\n\tGetHealth\0227.google.cloud.comput" + + "e.v1.GetHealthBackendServiceRequest\0322.go" + + "ogle.cloud.compute.v1.BackendServiceGrou" + + "pHealth\"\270\001\202\323\344\223\002v\"Q/compute/v1/projects/{" + + "project}/global/backendServices/{backend" + + "_service}/getHealth:!resource_group_refe" + + "rence_resource\332A9project,backend_service" + + ",resource_group_reference_resource\022\325\001\n\014G" + + "etIamPolicy\022:.google.cloud.compute.v1.Ge" + + "tIamPolicyBackendServiceRequest\032\037.google" + + ".cloud.compute.v1.Policy\"h\202\323\344\223\002O\022M/compu" + + "te/v1/projects/{project}/global/backendS" + + "ervices/{resource}/getIamPolicy\332A\020projec" + + "t,resource\022\362\001\n\006Insert\0224.google.cloud.com" + + "pute.v1.InsertBackendServiceRequest\032\".go" + + "ogle.cloud.compute.v1.Operation\"\215\001\202\323\344\223\002Q" + + "\"5/compute/v1/projects/{project}/global/" + + "backendServices:\030backend_service_resourc" + + "e\332A project,backend_service_resource\212N\020G" + + "lobalOperations\022\261\001\n\004List\0223.google.cloud." + + "compute.v1.ListBackendServicesRequest\032+." + + "google.cloud.compute.v1.BackendServiceLi" + + "st\"G\202\323\344\223\0027\0225/compute/v1/projects/{projec" + + "t}/global/backendServices\332A\007project\022\222\002\n\005" + + "Patch\0223.google.cloud.compute.v1.PatchBac" + + "kendServiceRequest\032\".google.cloud.comput" + + "e.v1.Operation\"\257\001\202\323\344\223\002c2G/compute/v1/pro" + + "jects/{project}/global/backendServices/{" + + "backend_service}:\030backend_service_resour" + + "ce\332A0project,backend_service,backend_ser" + + "vice_resource\212N\020GlobalOperations\022\335\002\n\025Set" + + "EdgeSecurityPolicy\022C.google.cloud.comput" + + "e.v1.SetEdgeSecurityPolicyBackendService" + + "Request\032\".google.cloud.compute.v1.Operat" + + "ion\"\332\001\202\323\344\223\002\203\001\"]/compute/v1/projects/{pro" + + "ject}/global/backendServices/{backend_se" + + "rvice}/setEdgeSecurityPolicy:\"security_p" + + "olicy_reference_resource\332A:project,backe" + + "nd_service,security_policy_reference_res" + + "ource\212N\020GlobalOperations\022\235\002\n\014SetIamPolic" + + "y\022:.google.cloud.compute.v1.SetIamPolicy" + + "BackendServiceRequest\032\037.google.cloud.com" + + "pute.v1.Policy\"\257\001\202\323\344\223\002s\"M/compute/v1/pro" + + "jects/{project}/global/backendServices/{" + + "resource}/setIamPolicy:\"global_set_polic" + + "y_request_resource\332A3project,resource,gl" + + "obal_set_policy_request_resource\022\320\002\n\021Set" + + "SecurityPolicy\022?.google.cloud.compute.v1" + + ".SetSecurityPolicyBackendServiceRequest\032" + + "\".google.cloud.compute.v1.Operation\"\325\001\202\323" + + "\344\223\002\177\"Y/compute/v1/projects/{project}/glo" + + "bal/backendServices/{backend_service}/se" + + "tSecurityPolicy:\"security_policy_referen" + + "ce_resource\332A:project,backend_service,se" + + "curity_policy_reference_resource\212N\020Globa" + + "lOperations\022\224\002\n\006Update\0224.google.cloud.co" + + "mpute.v1.UpdateBackendServiceRequest\032\".g" + + "oogle.cloud.compute.v1.Operation\"\257\001\202\323\344\223\002" + + "c\032G/compute/v1/projects/{project}/global" + + "/backendServices/{backend_service}:\030back" + + "end_service_resource\332A0project,backend_s" + + "ervice,backend_service_resource\212N\020Global" + + "Operations\032r\312A\026compute.googleapis.com\322AV" + + "https://www.googleapis.com/auth/compute," + + "https://www.googleapis.com/auth/cloud-pl" + + "atform2\337\005\n\tDiskTypes\022\301\001\n\016AggregatedList\022" + + "7.google.cloud.compute.v1.AggregatedList" + + "DiskTypesRequest\032/.google.cloud.compute." + + "v1.DiskTypeAggregatedList\"E\202\323\344\223\0025\0223/comp" + + "ute/v1/projects/{project}/aggregated/dis" + + "kTypes\332A\007project\022\271\001\n\003Get\022+.google.cloud." + + "compute.v1.GetDiskTypeRequest\032!.google.c" + + "loud.compute.v1.DiskType\"b\202\323\344\223\002C\022A/compu" + + "te/v1/projects/{project}/zones/{zone}/di" + + "skTypes/{disk_type}\332A\026project,zone,disk_" + + "type\022\252\001\n\004List\022-.google.cloud.compute.v1." + + "ListDiskTypesRequest\032%.google.cloud.comp" + + "ute.v1.DiskTypeList\"L\202\323\344\223\0027\0225/compute/v1" + + "/projects/{project}/zones/{zone}/diskTyp" + + "es\332A\014project,zone\032\244\001\312A\026compute.googleapi" + + "s.com\322A\207\001https://www.googleapis.com/auth" + + "/compute.readonly,https://www.googleapis" + + ".com/auth/compute,https://www.googleapis" + + ".com/auth/cloud-platform2\335\033\n\005Disks\022\311\002\n\023A" + + "ddResourcePolicies\0227.google.cloud.comput" + + "e.v1.AddResourcePoliciesDiskRequest\032\".go" + + "ogle.cloud.compute.v1.Operation\"\324\001\202\323\344\223\002|" + + "\"L/compute/v1/projects/{project}/zones/{" + + "zone}/disks/{disk}/addResourcePolicies:," + + "disks_add_resource_policies_request_reso" + + "urce\332A>project,zone,disk,disks_add_resou" + + "rce_policies_request_resource\212N\016ZoneOper" + + "ations\022\265\001\n\016AggregatedList\0223.google.cloud" + + ".compute.v1.AggregatedListDisksRequest\032+" + + ".google.cloud.compute.v1.DiskAggregatedL" + + "ist\"A\202\323\344\223\0021\022//compute/v1/projects/{proje" + + "ct}/aggregated/disks\332A\007project\022\204\002\n\016Creat" + + "eSnapshot\0222.google.cloud.compute.v1.Crea", + "teSnapshotDiskRequest\032\".google.cloud.com" + + "pute.v1.Operation\"\231\001\202\323\344\223\002\\\"G/compute/v1/" + + "projects/{project}/zones/{zone}/disks/{d" + + "isk}/createSnapshot:\021snapshot_resource\332A" + + "#project,zone,disk,snapshot_resource\212N\016Z" + + "oneOperations\022\277\001\n\006Delete\022*.google.cloud." + + "compute.v1.DeleteDiskRequest\032\".google.cl" + + "oud.compute.v1.Operation\"e\202\323\344\223\002:*8/compu" + + "te/v1/projects/{project}/zones/{zone}/di" + + "sks/{disk}\332A\021project,zone,disk\212N\016ZoneOpe" + + "rations\022\243\001\n\003Get\022\'.google.cloud.compute.v" + + "1.GetDiskRequest\032\035.google.cloud.compute." + + "v1.Disk\"T\202\323\344\223\002:\0228/compute/v1/projects/{p" + + "roject}/zones/{zone}/disks/{disk}\332A\021proj" + + "ect,zone,disk\022\314\001\n\014GetIamPolicy\0220.google." + + "cloud.compute.v1.GetIamPolicyDiskRequest" + + "\032\037.google.cloud.compute.v1.Policy\"i\202\323\344\223\002" + + "K\022I/compute/v1/projects/{project}/zones/" + + "{zone}/disks/{resource}/getIamPolicy\332A\025p" + + "roject,zone,resource\022\320\001\n\006Insert\022*.google" + + ".cloud.compute.v1.InsertDiskRequest\032\".go" + + "ogle.cloud.compute.v1.Operation\"v\202\323\344\223\002B\"" + + "1/compute/v1/projects/{project}/zones/{z" + + "one}/disks:\rdisk_resource\332A\032project,zone" + + ",disk_resource\212N\016ZoneOperations\022\236\001\n\004List" + + "\022).google.cloud.compute.v1.ListDisksRequ" + + "est\032!.google.cloud.compute.v1.DiskList\"H" + + "\202\323\344\223\0023\0221/compute/v1/projects/{project}/z" + + "ones/{zone}/disks\332A\014project,zone\022\331\002\n\026Rem" + + "oveResourcePolicies\022:.google.cloud.compu" + + "te.v1.RemoveResourcePoliciesDiskRequest\032" + + "\".google.cloud.compute.v1.Operation\"\336\001\202\323" + + "\344\223\002\202\001\"O/compute/v1/projects/{project}/zo" + + "nes/{zone}/disks/{disk}/removeResourcePo" + + "licies:/disks_remove_resource_policies_r" + + "equest_resource\332AAproject,zone,disk,disk" + + "s_remove_resource_policies_request_resou" + + "rce\212N\016ZoneOperations\022\204\002\n\006Resize\022*.google" + + ".cloud.compute.v1.ResizeDiskRequest\032\".go" + + "ogle.cloud.compute.v1.Operation\"\251\001\202\323\344\223\002`" + + "\"?/compute/v1/projects/{project}/zones/{" + + "zone}/disks/{disk}/resize:\035disks_resize_" + + "request_resource\332A/project,zone,disk,dis" + + "ks_resize_request_resource\212N\016ZoneOperati" + + "ons\022\220\002\n\014SetIamPolicy\0220.google.cloud.comp" + + "ute.v1.SetIamPolicyDiskRequest\032\037.google." + + "cloud.compute.v1.Policy\"\254\001\202\323\344\223\002m\"I/compu" + + "te/v1/projects/{project}/zones/{zone}/di" + + "sks/{resource}/setIamPolicy: zone_set_po" + + "licy_request_resource\332A6project,zone,res" + + "ource,zone_set_policy_request_resource\022\233" + + "\002\n\tSetLabels\022-.google.cloud.compute.v1.S" + + "etLabelsDiskRequest\032\".google.cloud.compu" + + "te.v1.Operation\"\272\001\202\323\344\223\002j\"F/compute/v1/pr" + + "ojects/{project}/zones/{zone}/disks/{res" + + "ource}/setLabels: zone_set_labels_reques" + + "t_resource\332A6project,zone,resource,zone_" + + "set_labels_request_resource\212N\016ZoneOperat" + + "ions\022\265\002\n\022TestIamPermissions\0226.google.clo" + + "ud.compute.v1.TestIamPermissionsDiskRequ" + + "est\0320.google.cloud.compute.v1.TestPermis" + + "sionsResponse\"\264\001\202\323\344\223\002t\"O/compute/v1/proj" + + "ects/{project}/zones/{zone}/disks/{resou" + + "rce}/testIamPermissions:!test_permission" + + "s_request_resource\332A7project,zone,resour" + + "ce,test_permissions_request_resource\022\335\001\n" + + "\006Update\022*.google.cloud.compute.v1.Update" + + "DiskRequest\032\".google.cloud.compute.v1.Op" + + "eration\"\202\001\202\323\344\223\002I28/compute/v1/projects/{" + + "project}/zones/{zone}/disks/{disk}:\rdisk" + + "_resource\332A\037project,zone,disk,disk_resou" + + "rce\212N\016ZoneOperations\032r\312A\026compute.googlea" + + "pis.com\322AVhttps://www.googleapis.com/aut" + + "h/compute,https://www.googleapis.com/aut" + + "h/cloud-platform2\251\r\n\023ExternalVpnGateways" + + "\022\363\001\n\006Delete\0228.google.cloud.compute.v1.De" + + "leteExternalVpnGatewayRequest\032\".google.c" + + "loud.compute.v1.Operation\"\212\001\202\323\344\223\002R*P/com" + "pute/v1/projects/{project}/global/extern" - + "alVpnGateways/{resource}/setLabels:\"glob" - + "al_set_labels_request_resource\332A3project" - + ",resource,global_set_labels_request_reso" - + "urce\212N\020GlobalOperations\022\306\002\n\022TestIamPermi" - + "ssions\022D.google.cloud.compute.v1.TestIam" - + "PermissionsExternalVpnGatewayRequest\0320.g" - + "oogle.cloud.compute.v1.TestPermissionsRe" - + "sponse\"\267\001\202\323\344\223\002|\"W/compute/v1/projects/{p" - + "roject}/global/externalVpnGateways/{reso" - + "urce}/testIamPermissions:!test_permissio" - + "ns_request_resource\332A2project,resource,t" - + "est_permissions_request_resource\032r\312A\026com" - + "pute.googleapis.com\322AVhttps://www.google" - + "apis.com/auth/compute,https://www.google" - + "apis.com/auth/cloud-platform2\225$\n\020Firewal" - + "lPolicies\022\307\002\n\016AddAssociation\022<.google.cl" - + "oud.compute.v1.AddAssociationFirewallPol" - + "icyRequest\032\".google.cloud.compute.v1.Ope" - + "ration\"\322\001\202\323\344\223\002v\"N/compute/v1/locations/g" - + "lobal/firewallPolicies/{firewall_policy}" - + "/addAssociation:$firewall_policy_associa" - + "tion_resource\332A4firewall_policy,firewall" - + "_policy_association_resource\212N\034GlobalOrg" - + "anizationOperations\022\244\002\n\007AddRule\0225.google" - + ".cloud.compute.v1.AddRuleFirewallPolicyR" - + "equest\032\".google.cloud.compute.v1.Operati" - + "on\"\275\001\202\323\344\223\002h\"G/compute/v1/locations/globa" - + "l/firewallPolicies/{firewall_policy}/add" - + "Rule:\035firewall_policy_rule_resource\332A-fi" - + "rewall_policy,firewall_policy_rule_resou" - + "rce\212N\034GlobalOrganizationOperations\022\360\001\n\nC" - + "loneRules\0228.google.cloud.compute.v1.Clon" - + "eRulesFirewallPolicyRequest\032\".google.clo" - + "ud.compute.v1.Operation\"\203\001\202\323\344\223\002L\"J/compu" - + "te/v1/locations/global/firewallPolicies/" - + "{firewall_policy}/cloneRules\332A\017firewall_" - + "policy\212N\034GlobalOrganizationOperations\022\334\001" - + "\n\006Delete\0224.google.cloud.compute.v1.Delet" + + "alVpnGateways/{external_vpn_gateway}\332A\034p" + + "roject,external_vpn_gateway\212N\020GlobalOper" + + "ations\022\342\001\n\003Get\0225.google.cloud.compute.v1" + + ".GetExternalVpnGatewayRequest\032+.google.c" + + "loud.compute.v1.ExternalVpnGateway\"w\202\323\344\223" + + "\002R\022P/compute/v1/projects/{project}/globa" + + "l/externalVpnGateways/{external_vpn_gate" + + "way}\332A\034project,external_vpn_gateway\022\204\002\n\006" + + "Insert\0228.google.cloud.compute.v1.InsertE" + + "xternalVpnGatewayRequest\032\".google.cloud." + + "compute.v1.Operation\"\233\001\202\323\344\223\002Z\"9/compute/" + + "v1/projects/{project}/global/externalVpn" + + "Gateways:\035external_vpn_gateway_resource\332" + + "A%project,external_vpn_gateway_resource\212" + + "N\020GlobalOperations\022\275\001\n\004List\0227.google.clo" + + "ud.compute.v1.ListExternalVpnGatewaysReq" + + "uest\032/.google.cloud.compute.v1.ExternalV" + + "pnGatewayList\"K\202\323\344\223\002;\0229/compute/v1/proje" + + "cts/{project}/global/externalVpnGateways" + + "\332A\007project\022\262\002\n\tSetLabels\022;.google.cloud." + + "compute.v1.SetLabelsExternalVpnGatewayRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"\303\001\202\323\344\223\002t\"N/compute/v1/projects/{projec" + + "t}/global/externalVpnGateways/{resource}" + + "/setLabels:\"global_set_labels_request_re" + + "source\332A3project,resource,global_set_lab" + + "els_request_resource\212N\020GlobalOperations\022" + + "\306\002\n\022TestIamPermissions\022D.google.cloud.co" + + "mpute.v1.TestIamPermissionsExternalVpnGa" + + "tewayRequest\0320.google.cloud.compute.v1.T" + + "estPermissionsResponse\"\267\001\202\323\344\223\002|\"W/comput" + + "e/v1/projects/{project}/global/externalV" + + "pnGateways/{resource}/testIamPermissions" + + ":!test_permissions_request_resource\332A2pr" + + "oject,resource,test_permissions_request_" + + "resource\032r\312A\026compute.googleapis.com\322AVht" + + "tps://www.googleapis.com/auth/compute,ht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "form2\225$\n\020FirewallPolicies\022\307\002\n\016AddAssocia" + + "tion\022<.google.cloud.compute.v1.AddAssoci" + + "ationFirewallPolicyRequest\032\".google.clou" + + "d.compute.v1.Operation\"\322\001\202\323\344\223\002v\"N/comput" + + "e/v1/locations/global/firewallPolicies/{" + + "firewall_policy}/addAssociation:$firewal" + + "l_policy_association_resource\332A4firewall" + + "_policy,firewall_policy_association_reso" + + "urce\212N\034GlobalOrganizationOperations\022\244\002\n\007" + + "AddRule\0225.google.cloud.compute.v1.AddRul" + "eFirewallPolicyRequest\032\".google.cloud.co" - + "mpute.v1.Operation\"x\202\323\344\223\002A*?/compute/v1/" - + "locations/global/firewallPolicies/{firew" - + "all_policy}\332A\017firewall_policy\212N\034GlobalOr" - + "ganizationOperations\022\274\001\n\003Get\0221.google.cl" - + "oud.compute.v1.GetFirewallPolicyRequest\032" - + "\'.google.cloud.compute.v1.FirewallPolicy" - + "\"Y\202\323\344\223\002A\022?/compute/v1/locations/global/f" - + "irewallPolicies/{firewall_policy}\332A\017fire" - + "wall_policy\022\354\001\n\016GetAssociation\022<.google." - + "cloud.compute.v1.GetAssociationFirewallP" - + "olicyRequest\0322.google.cloud.compute.v1.F" - + "irewallPolicyAssociation\"h\202\323\344\223\002P\022N/compu" - + "te/v1/locations/global/firewallPolicies/" - + "{firewall_policy}/getAssociation\332A\017firew" - + "all_policy\022\305\001\n\014GetIamPolicy\022:.google.clo" - + "ud.compute.v1.GetIamPolicyFirewallPolicy" - + "Request\032\037.google.cloud.compute.v1.Policy" - + "\"X\202\323\344\223\002G\022E/compute/v1/locations/global/f" - + "irewallPolicies/{resource}/getIamPolicy\332" - + "A\010resource\022\320\001\n\007GetRule\0225.google.cloud.co" - + "mpute.v1.GetRuleFirewallPolicyRequest\032+." - + "google.cloud.compute.v1.FirewallPolicyRu" - + "le\"a\202\323\344\223\002I\022G/compute/v1/locations/global" - + "/firewallPolicies/{firewall_policy}/getR" - + "ule\332A\017firewall_policy\022\370\001\n\006Insert\0224.googl" - + "e.cloud.compute.v1.InsertFirewallPolicyR" - + "equest\032\".google.cloud.compute.v1.Operati" - + "on\"\223\001\202\323\344\223\002I\"-/compute/v1/locations/globa" - + "l/firewallPolicies:\030firewall_policy_reso" - + "urce\332A\"parent_id,firewall_policy_resourc" - + "e\212N\034GlobalOrganizationOperations\022\243\001\n\004Lis" - + "t\0224.google.cloud.compute.v1.ListFirewall" - + "PoliciesRequest\032+.google.cloud.compute.v" - + "1.FirewallPolicyList\"8\202\323\344\223\002/\022-/compute/v" - + "1/locations/global/firewallPolicies\332A\000\022\340" - + "\001\n\020ListAssociations\022>.google.cloud.compu" - + "te.v1.ListAssociationsFirewallPolicyRequ" - + "est\032A.google.cloud.compute.v1.FirewallPo" - + "liciesListAssociationsResponse\"I\202\323\344\223\002@\022>" - + "/compute/v1/locations/global/firewallPol" - + "icies/listAssociations\332A\000\022\350\001\n\004Move\0222.goo" - + "gle.cloud.compute.v1.MoveFirewallPolicyR" - + "equest\032\".google.cloud.compute.v1.Operati" - + "on\"\207\001\202\323\344\223\002F\"D/compute/v1/locations/globa" - + "l/firewallPolicies/{firewall_policy}/mov" - + "e\332A\031firewall_policy,parent_id\212N\034GlobalOr" - + "ganizationOperations\022\216\002\n\005Patch\0223.google." - + "cloud.compute.v1.PatchFirewallPolicyRequ" + + "mpute.v1.Operation\"\275\001\202\323\344\223\002h\"G/compute/v1" + + "/locations/global/firewallPolicies/{fire" + + "wall_policy}/addRule:\035firewall_policy_ru" + + "le_resource\332A-firewall_policy,firewall_p" + + "olicy_rule_resource\212N\034GlobalOrganization" + + "Operations\022\360\001\n\nCloneRules\0228.google.cloud" + + ".compute.v1.CloneRulesFirewallPolicyRequ" + "est\032\".google.cloud.compute.v1.Operation\"" - + "\253\001\202\323\344\223\002[2?/compute/v1/locations/global/f" - + "irewallPolicies/{firewall_policy}:\030firew" - + "all_policy_resource\332A(firewall_policy,fi" - + "rewall_policy_resource\212N\034GlobalOrganizat" - + "ionOperations\022\252\002\n\tPatchRule\0227.google.clo" - + "ud.compute.v1.PatchRuleFirewallPolicyReq" - + "uest\032\".google.cloud.compute.v1.Operation" - + "\"\277\001\202\323\344\223\002j\"I/compute/v1/locations/global/" - + "firewallPolicies/{firewall_policy}/patch" - + "Rule:\035firewall_policy_rule_resource\332A-fi" - + "rewall_policy,firewall_policy_rule_resou" - + "rce\212N\034GlobalOrganizationOperations\022\205\002\n\021R" - + "emoveAssociation\022?.google.cloud.compute." - + "v1.RemoveAssociationFirewallPolicyReques" - + "t\032\".google.cloud.compute.v1.Operation\"\212\001" - + "\202\323\344\223\002S\"Q/compute/v1/locations/global/fir" - + "ewallPolicies/{firewall_policy}/removeAs" - + "sociation\332A\017firewall_policy\212N\034GlobalOrga" - + "nizationOperations\022\360\001\n\nRemoveRule\0228.goog" - + "le.cloud.compute.v1.RemoveRuleFirewallPo" - + "licyRequest\032\".google.cloud.compute.v1.Op" - + "eration\"\203\001\202\323\344\223\002L\"J/compute/v1/locations/" - + "global/firewallPolicies/{firewall_policy" - + "}/removeRule\332A\017firewall_policy\212N\034GlobalO" - + "rganizationOperations\022\247\002\n\014SetIamPolicy\022:" - + ".google.cloud.compute.v1.SetIamPolicyFir" - + "ewallPolicyRequest\032\037.google.cloud.comput" - + "e.v1.Policy\"\271\001\202\323\344\223\002x\"E/compute/v1/locati" - + "ons/global/firewallPolicies/{resource}/s" - + "etIamPolicy:/global_organization_set_pol" - + "icy_request_resource\332A8resource,global_o" - + "rganization_set_policy_request_resource\022" - + "\256\002\n\022TestIamPermissions\022@.google.cloud.co" - + "mpute.v1.TestIamPermissionsFirewallPolic" - + "yRequest\0320.google.cloud.compute.v1.TestP" - + "ermissionsResponse\"\243\001\202\323\344\223\002p\"K/compute/v1" - + "/locations/global/firewallPolicies/{reso" - + "urce}/testIamPermissions:!test_permissio" - + "ns_request_resource\332A*resource,test_perm" - + "issions_request_resource\032r\312A\026compute.goo" - + "gleapis.com\322AVhttps://www.googleapis.com" - + "/auth/compute,https://www.googleapis.com" - + "/auth/cloud-platform2\317\n\n\tFirewalls\022\306\001\n\006D" - + "elete\022..google.cloud.compute.v1.DeleteFi" - + "rewallRequest\032\".google.cloud.compute.v1." - + "Operation\"h\202\323\344\223\002<*:/compute/v1/projects/" - + "{project}/global/firewalls/{firewall}\332A\020" - + "project,firewall\212N\020GlobalOperations\022\254\001\n\003" - + "Get\022+.google.cloud.compute.v1.GetFirewal" - + "lRequest\032!.google.cloud.compute.v1.Firew" - + "all\"U\202\323\344\223\002<\022:/compute/v1/projects/{proje" - + "ct}/global/firewalls/{firewall}\332A\020projec" - + "t,firewall\022\327\001\n\006Insert\022..google.cloud.com" - + "pute.v1.InsertFirewallRequest\032\".google.c" - + "loud.compute.v1.Operation\"y\202\323\344\223\002D\"//comp" + + "\203\001\202\323\344\223\002L\"J/compute/v1/locations/global/f" + + "irewallPolicies/{firewall_policy}/cloneR" + + "ules\332A\017firewall_policy\212N\034GlobalOrganizat" + + "ionOperations\022\334\001\n\006Delete\0224.google.cloud." + + "compute.v1.DeleteFirewallPolicyRequest\032\"" + + ".google.cloud.compute.v1.Operation\"x\202\323\344\223" + + "\002A*?/compute/v1/locations/global/firewal" + + "lPolicies/{firewall_policy}\332A\017firewall_p" + + "olicy\212N\034GlobalOrganizationOperations\022\274\001\n" + + "\003Get\0221.google.cloud.compute.v1.GetFirewa" + + "llPolicyRequest\032\'.google.cloud.compute.v" + + "1.FirewallPolicy\"Y\202\323\344\223\002A\022?/compute/v1/lo" + + "cations/global/firewallPolicies/{firewal" + + "l_policy}\332A\017firewall_policy\022\354\001\n\016GetAssoc" + + "iation\022<.google.cloud.compute.v1.GetAsso" + + "ciationFirewallPolicyRequest\0322.google.cl" + + "oud.compute.v1.FirewallPolicyAssociation" + + "\"h\202\323\344\223\002P\022N/compute/v1/locations/global/f" + + "irewallPolicies/{firewall_policy}/getAss" + + "ociation\332A\017firewall_policy\022\305\001\n\014GetIamPol" + + "icy\022:.google.cloud.compute.v1.GetIamPoli" + + "cyFirewallPolicyRequest\032\037.google.cloud.c" + + "ompute.v1.Policy\"X\202\323\344\223\002G\022E/compute/v1/lo" + + "cations/global/firewallPolicies/{resourc" + + "e}/getIamPolicy\332A\010resource\022\320\001\n\007GetRule\0225" + + ".google.cloud.compute.v1.GetRuleFirewall" + + "PolicyRequest\032+.google.cloud.compute.v1." + + "FirewallPolicyRule\"a\202\323\344\223\002I\022G/compute/v1/" + + "locations/global/firewallPolicies/{firew" + + "all_policy}/getRule\332A\017firewall_policy\022\370\001" + + "\n\006Insert\0224.google.cloud.compute.v1.Inser" + + "tFirewallPolicyRequest\032\".google.cloud.co" + + "mpute.v1.Operation\"\223\001\202\323\344\223\002I\"-/compute/v1" + + "/locations/global/firewallPolicies:\030fire" + + "wall_policy_resource\332A\"parent_id,firewal" + + "l_policy_resource\212N\034GlobalOrganizationOp" + + "erations\022\243\001\n\004List\0224.google.cloud.compute" + + ".v1.ListFirewallPoliciesRequest\032+.google" + + ".cloud.compute.v1.FirewallPolicyList\"8\202\323" + + "\344\223\002/\022-/compute/v1/locations/global/firew" + + "allPolicies\332A\000\022\340\001\n\020ListAssociations\022>.go" + + "ogle.cloud.compute.v1.ListAssociationsFi" + + "rewallPolicyRequest\032A.google.cloud.compu" + + "te.v1.FirewallPoliciesListAssociationsRe" + + "sponse\"I\202\323\344\223\002@\022>/compute/v1/locations/gl" + + "obal/firewallPolicies/listAssociations\332A" + + "\000\022\350\001\n\004Move\0222.google.cloud.compute.v1.Mov" + + "eFirewallPolicyRequest\032\".google.cloud.co" + + "mpute.v1.Operation\"\207\001\202\323\344\223\002F\"D/compute/v1" + + "/locations/global/firewallPolicies/{fire" + + "wall_policy}/move\332A\031firewall_policy,pare" + + "nt_id\212N\034GlobalOrganizationOperations\022\216\002\n" + + "\005Patch\0223.google.cloud.compute.v1.PatchFi" + + "rewallPolicyRequest\032\".google.cloud.compu" + + "te.v1.Operation\"\253\001\202\323\344\223\002[2?/compute/v1/lo" + + "cations/global/firewallPolicies/{firewal" + + "l_policy}:\030firewall_policy_resource\332A(fi" + + "rewall_policy,firewall_policy_resource\212N" + + "\034GlobalOrganizationOperations\022\252\002\n\tPatchR" + + "ule\0227.google.cloud.compute.v1.PatchRuleF" + + "irewallPolicyRequest\032\".google.cloud.comp" + + "ute.v1.Operation\"\277\001\202\323\344\223\002j\"I/compute/v1/l" + + "ocations/global/firewallPolicies/{firewa" + + "ll_policy}/patchRule:\035firewall_policy_ru" + + "le_resource\332A-firewall_policy,firewall_p" + + "olicy_rule_resource\212N\034GlobalOrganization" + + "Operations\022\205\002\n\021RemoveAssociation\022?.googl" + + "e.cloud.compute.v1.RemoveAssociationFire" + + "wallPolicyRequest\032\".google.cloud.compute" + + ".v1.Operation\"\212\001\202\323\344\223\002S\"Q/compute/v1/loca" + + "tions/global/firewallPolicies/{firewall_" + + "policy}/removeAssociation\332A\017firewall_pol" + + "icy\212N\034GlobalOrganizationOperations\022\360\001\n\nR" + + "emoveRule\0228.google.cloud.compute.v1.Remo" + + "veRuleFirewallPolicyRequest\032\".google.clo" + + "ud.compute.v1.Operation\"\203\001\202\323\344\223\002L\"J/compu" + + "te/v1/locations/global/firewallPolicies/" + + "{firewall_policy}/removeRule\332A\017firewall_" + + "policy\212N\034GlobalOrganizationOperations\022\247\002" + + "\n\014SetIamPolicy\022:.google.cloud.compute.v1" + + ".SetIamPolicyFirewallPolicyRequest\032\037.goo" + + "gle.cloud.compute.v1.Policy\"\271\001\202\323\344\223\002x\"E/c" + + "ompute/v1/locations/global/firewallPolic" + + "ies/{resource}/setIamPolicy:/global_orga" + + "nization_set_policy_request_resource\332A8r" + + "esource,global_organization_set_policy_r" + + "equest_resource\022\256\002\n\022TestIamPermissions\022@" + + ".google.cloud.compute.v1.TestIamPermissi" + + "onsFirewallPolicyRequest\0320.google.cloud." + + "compute.v1.TestPermissionsResponse\"\243\001\202\323\344" + + "\223\002p\"K/compute/v1/locations/global/firewa" + + "llPolicies/{resource}/testIamPermissions" + + ":!test_permissions_request_resource\332A*re" + + "source,test_permissions_request_resource" + + "\032r\312A\026compute.googleapis.com\322AVhttps://ww" + + "w.googleapis.com/auth/compute,https://ww" + + "w.googleapis.com/auth/cloud-platform2\317\n\n" + + "\tFirewalls\022\306\001\n\006Delete\022..google.cloud.com" + + "pute.v1.DeleteFirewallRequest\032\".google.c" + + "loud.compute.v1.Operation\"h\202\323\344\223\002<*:/comp" + "ute/v1/projects/{project}/global/firewal" - + "ls:\021firewall_resource\332A\031project,firewall" - + "_resource\212N\020GlobalOperations\022\237\001\n\004List\022-." - + "google.cloud.compute.v1.ListFirewallsReq" - + "uest\032%.google.cloud.compute.v1.FirewallL" - + "ist\"A\202\323\344\223\0021\022//compute/v1/projects/{proje" - + "ct}/global/firewalls\332A\007project\022\352\001\n\005Patch" - + "\022-.google.cloud.compute.v1.PatchFirewall" - + "Request\032\".google.cloud.compute.v1.Operat" - + "ion\"\215\001\202\323\344\223\002O2:/compute/v1/projects/{proj" - + "ect}/global/firewalls/{firewall}:\021firewa" - + "ll_resource\332A\"project,firewall,firewall_" - + "resource\212N\020GlobalOperations\022\354\001\n\006Update\022." - + ".google.cloud.compute.v1.UpdateFirewallR" - + "equest\032\".google.cloud.compute.v1.Operati" - + "on\"\215\001\202\323\344\223\002O\032:/compute/v1/projects/{proje" - + "ct}/global/firewalls/{firewall}:\021firewal" - + "l_resource\332A\"project,firewall,firewall_r" - + "esource\212N\020GlobalOperations\032r\312A\026compute.g" - + "oogleapis.com\322AVhttps://www.googleapis.c" - + "om/auth/compute,https://www.googleapis.c" - + "om/auth/cloud-platform2\231\021\n\017ForwardingRul" - + "es\022\323\001\n\016AggregatedList\022=.google.cloud.com" - + "pute.v1.AggregatedListForwardingRulesReq" - + "uest\0325.google.cloud.compute.v1.Forwardin" - + "gRuleAggregatedList\"K\202\323\344\223\002;\0229/compute/v1" - + "/projects/{project}/aggregated/forwardin" - + "gRules\332A\007project\022\362\001\n\006Delete\0224.google.clo" - + "ud.compute.v1.DeleteForwardingRuleReques" - + "t\032\".google.cloud.compute.v1.Operation\"\215\001" - + "\202\323\344\223\002S*Q/compute/v1/projects/{project}/r" - + "egions/{region}/forwardingRules/{forward" - + "ing_rule}\332A\036project,region,forwarding_ru" - + "le\212N\020RegionOperations\022\335\001\n\003Get\0221.google.c" - + "loud.compute.v1.GetForwardingRuleRequest" - + "\032\'.google.cloud.compute.v1.ForwardingRul" - + "e\"z\202\323\344\223\002S\022Q/compute/v1/projects/{project" - + "}/regions/{region}/forwardingRules/{forw" - + "arding_rule}\332A\036project,region,forwarding" - + "_rule\022\203\002\n\006Insert\0224.google.cloud.compute." - + "v1.InsertForwardingRuleRequest\032\".google." - + "cloud.compute.v1.Operation\"\236\001\202\323\344\223\002[\"?/co" - + "mpute/v1/projects/{project}/regions/{reg" - + "ion}/forwardingRules:\030forwarding_rule_re" - + "source\332A\'project,region,forwarding_rule_" - + "resource\212N\020RegionOperations\022\302\001\n\004List\0223.g" - + "oogle.cloud.compute.v1.ListForwardingRul" - + "esRequest\032+.google.cloud.compute.v1.Forw" - + "ardingRuleList\"X\202\323\344\223\002A\022?/compute/v1/proj" + + "ls/{firewall}\332A\020project,firewall\212N\020Globa" + + "lOperations\022\254\001\n\003Get\022+.google.cloud.compu" + + "te.v1.GetFirewallRequest\032!.google.cloud." + + "compute.v1.Firewall\"U\202\323\344\223\002<\022:/compute/v1" + + "/projects/{project}/global/firewalls/{fi" + + "rewall}\332A\020project,firewall\022\327\001\n\006Insert\022.." + + "google.cloud.compute.v1.InsertFirewallRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"y\202\323\344\223\002D\"//compute/v1/projects/{project" + + "}/global/firewalls:\021firewall_resource\332A\031" + + "project,firewall_resource\212N\020GlobalOperat" + + "ions\022\237\001\n\004List\022-.google.cloud.compute.v1." + + "ListFirewallsRequest\032%.google.cloud.comp" + + "ute.v1.FirewallList\"A\202\323\344\223\0021\022//compute/v1" + + "/projects/{project}/global/firewalls\332A\007p" + + "roject\022\352\001\n\005Patch\022-.google.cloud.compute." + + "v1.PatchFirewallRequest\032\".google.cloud.c" + + "ompute.v1.Operation\"\215\001\202\323\344\223\002O2:/compute/v" + + "1/projects/{project}/global/firewalls/{f" + + "irewall}:\021firewall_resource\332A\"project,fi" + + "rewall,firewall_resource\212N\020GlobalOperati" + + "ons\022\354\001\n\006Update\022..google.cloud.compute.v1" + + ".UpdateFirewallRequest\032\".google.cloud.co" + + "mpute.v1.Operation\"\215\001\202\323\344\223\002O\032:/compute/v1" + + "/projects/{project}/global/firewalls/{fi" + + "rewall}:\021firewall_resource\332A\"project,fir" + + "ewall,firewall_resource\212N\020GlobalOperatio" + + "ns\032r\312A\026compute.googleapis.com\322AVhttps://" + + "www.googleapis.com/auth/compute,https://" + + "www.googleapis.com/auth/cloud-platform2\231" + + "\021\n\017ForwardingRules\022\323\001\n\016AggregatedList\022=." + + "google.cloud.compute.v1.AggregatedListFo" + + "rwardingRulesRequest\0325.google.cloud.comp" + + "ute.v1.ForwardingRuleAggregatedList\"K\202\323\344" + + "\223\002;\0229/compute/v1/projects/{project}/aggr" + + "egated/forwardingRules\332A\007project\022\362\001\n\006Del" + + "ete\0224.google.cloud.compute.v1.DeleteForw" + + "ardingRuleRequest\032\".google.cloud.compute" + + ".v1.Operation\"\215\001\202\323\344\223\002S*Q/compute/v1/proj" + "ects/{project}/regions/{region}/forwardi" - + "ngRules\332A\016project,region\022\243\002\n\005Patch\0223.goo" - + "gle.cloud.compute.v1.PatchForwardingRule" - + "Request\032\".google.cloud.compute.v1.Operat" - + "ion\"\300\001\202\323\344\223\002m2Q/compute/v1/projects/{proj" - + "ect}/regions/{region}/forwardingRules/{f" - + "orwarding_rule}:\030forwarding_rule_resourc" - + "e\332A7project,region,forwarding_rule,forwa" - + "rding_rule_resource\212N\020RegionOperations\022\273" - + "\002\n\tSetLabels\0227.google.cloud.compute.v1.S" - + "etLabelsForwardingRuleRequest\032\".google.c" - + "loud.compute.v1.Operation\"\320\001\202\323\344\223\002z\"T/com" - + "pute/v1/projects/{project}/regions/{regi" - + "on}/forwardingRules/{resource}/setLabels" - + ":\"region_set_labels_request_resource\332A:p" - + "roject,region,resource,region_set_labels" - + "_request_resource\212N\020RegionOperations\022\267\002\n" - + "\tSetTarget\0227.google.cloud.compute.v1.Set" - + "TargetForwardingRuleRequest\032\".google.clo" - + "ud.compute.v1.Operation\"\314\001\202\323\344\223\002x\"[/compu" - + "te/v1/projects/{project}/regions/{region" - + "}/forwardingRules/{forwarding_rule}/setT" - + "arget:\031target_reference_resource\332A8proje" - + "ct,region,forwarding_rule,target_referen" - + "ce_resource\212N\020RegionOperations\032r\312A\026compu" - + "te.googleapis.com\322AVhttps://www.googleap" - + "is.com/auth/compute,https://www.googleap" - + "is.com/auth/cloud-platform2\254\t\n\017GlobalAdd" - + "resses\022\311\001\n\006Delete\0223.google.cloud.compute" - + ".v1.DeleteGlobalAddressRequest\032\".google." - + "cloud.compute.v1.Operation\"f\202\323\344\223\002;*9/com" - + "pute/v1/projects/{project}/global/addres" - + "ses/{address}\332A\017project,address\212N\020Global" - + "Operations\022\256\001\n\003Get\0220.google.cloud.comput" - + "e.v1.GetGlobalAddressRequest\032 .google.cl" - + "oud.compute.v1.Address\"S\202\323\344\223\002;\0229/compute" - + "/v1/projects/{project}/global/addresses/" - + "{address}\332A\017project,address\022\332\001\n\006Insert\0223" - + ".google.cloud.compute.v1.InsertGlobalAdd" - + "ressRequest\032\".google.cloud.compute.v1.Op" - + "eration\"w\202\323\344\223\002C\"//compute/v1/projects/{p" - + "roject}/global/addresses:\020address_resour" - + "ce\332A\030project,address_resource\212N\020GlobalOp" - + "erations\022\244\001\n\004List\0223.google.cloud.compute" - + ".v1.ListGlobalAddressesRequest\032$.google." - + "cloud.compute.v1.AddressList\"A\202\323\344\223\0021\022//c" - + "ompute/v1/projects/{project}/global/addr" - + "esses\332A\007project\022\243\002\n\tSetLabels\0226.google.c" - + "loud.compute.v1.SetLabelsGlobalAddressRe" + + "ngRules/{forwarding_rule}\332A\036project,regi" + + "on,forwarding_rule\212N\020RegionOperations\022\335\001" + + "\n\003Get\0221.google.cloud.compute.v1.GetForwa" + + "rdingRuleRequest\032\'.google.cloud.compute." + + "v1.ForwardingRule\"z\202\323\344\223\002S\022Q/compute/v1/p" + + "rojects/{project}/regions/{region}/forwa" + + "rdingRules/{forwarding_rule}\332A\036project,r" + + "egion,forwarding_rule\022\203\002\n\006Insert\0224.googl" + + "e.cloud.compute.v1.InsertForwardingRuleR" + + "equest\032\".google.cloud.compute.v1.Operati" + + "on\"\236\001\202\323\344\223\002[\"?/compute/v1/projects/{proje" + + "ct}/regions/{region}/forwardingRules:\030fo" + + "rwarding_rule_resource\332A\'project,region," + + "forwarding_rule_resource\212N\020RegionOperati" + + "ons\022\302\001\n\004List\0223.google.cloud.compute.v1.L" + + "istForwardingRulesRequest\032+.google.cloud" + + ".compute.v1.ForwardingRuleList\"X\202\323\344\223\002A\022?" + + "/compute/v1/projects/{project}/regions/{" + + "region}/forwardingRules\332A\016project,region" + + "\022\243\002\n\005Patch\0223.google.cloud.compute.v1.Pat" + + "chForwardingRuleRequest\032\".google.cloud.c" + + "ompute.v1.Operation\"\300\001\202\323\344\223\002m2Q/compute/v" + + "1/projects/{project}/regions/{region}/fo" + + "rwardingRules/{forwarding_rule}:\030forward" + + "ing_rule_resource\332A7project,region,forwa" + + "rding_rule,forwarding_rule_resource\212N\020Re" + + "gionOperations\022\273\002\n\tSetLabels\0227.google.cl" + + "oud.compute.v1.SetLabelsForwardingRuleRe" + "quest\032\".google.cloud.compute.v1.Operatio" - + "n\"\271\001\202\323\344\223\002j\"D/compute/v1/projects/{projec" - + "t}/global/addresses/{resource}/setLabels" - + ":\"global_set_labels_request_resource\332A3p" - + "roject,resource,global_set_labels_reques" - + "t_resource\212N\020GlobalOperations\032r\312A\026comput" - + "e.googleapis.com\322AVhttps://www.googleapi" - + "s.com/auth/compute,https://www.googleapi" - + "s.com/auth/cloud-platform2\373\016\n\025GlobalForw" - + "ardingRules\022\346\001\n\006Delete\022:.google.cloud.co" - + "mpute.v1.DeleteGlobalForwardingRuleReque" - + "st\032\".google.cloud.compute.v1.Operation\"|" - + "\202\323\344\223\002I*G/compute/v1/projects/{project}/g" - + "lobal/forwardingRules/{forwarding_rule}\332" - + "A\027project,forwarding_rule\212N\020GlobalOperat" - + "ions\022\322\001\n\003Get\0227.google.cloud.compute.v1.G" - + "etGlobalForwardingRuleRequest\032\'.google.c" - + "loud.compute.v1.ForwardingRule\"i\202\323\344\223\002I\022G" - + "/compute/v1/projects/{project}/global/fo" - + "rwardingRules/{forwarding_rule}\332A\027projec" - + "t,forwarding_rule\022\370\001\n\006Insert\022:.google.cl" - + "oud.compute.v1.InsertGlobalForwardingRul" - + "eRequest\032\".google.cloud.compute.v1.Opera" - + "tion\"\215\001\202\323\344\223\002Q\"5/compute/v1/projects/{pro" - + "ject}/global/forwardingRules:\030forwarding" - + "_rule_resource\332A project,forwarding_rule" - + "_resource\212N\020GlobalOperations\022\267\001\n\004List\0229." - + "google.cloud.compute.v1.ListGlobalForwar" - + "dingRulesRequest\032+.google.cloud.compute." - + "v1.ForwardingRuleList\"G\202\323\344\223\0027\0225/compute/" - + "v1/projects/{project}/global/forwardingR" - + "ules\332A\007project\022\230\002\n\005Patch\0229.google.cloud." - + "compute.v1.PatchGlobalForwardingRuleRequ" + + "n\"\320\001\202\323\344\223\002z\"T/compute/v1/projects/{projec" + + "t}/regions/{region}/forwardingRules/{res" + + "ource}/setLabels:\"region_set_labels_requ" + + "est_resource\332A:project,region,resource,r" + + "egion_set_labels_request_resource\212N\020Regi" + + "onOperations\022\267\002\n\tSetTarget\0227.google.clou" + + "d.compute.v1.SetTargetForwardingRuleRequ" + "est\032\".google.cloud.compute.v1.Operation\"" - + "\257\001\202\323\344\223\002c2G/compute/v1/projects/{project}" - + "/global/forwardingRules/{forwarding_rule" - + "}:\030forwarding_rule_resource\332A0project,fo" - + "rwarding_rule,forwarding_rule_resource\212N" - + "\020GlobalOperations\022\260\002\n\tSetLabels\022=.google" - + ".cloud.compute.v1.SetLabelsGlobalForward" - + "ingRuleRequest\032\".google.cloud.compute.v1" - + ".Operation\"\277\001\202\323\344\223\002p\"J/compute/v1/project" - + "s/{project}/global/forwardingRules/{reso" - + "urce}/setLabels:\"global_set_labels_reque" - + "st_resource\332A3project,resource,global_se" - + "t_labels_request_resource\212N\020GlobalOperat" - + "ions\022\254\002\n\tSetTarget\022=.google.cloud.comput" - + "e.v1.SetTargetGlobalForwardingRuleReques" - + "t\032\".google.cloud.compute.v1.Operation\"\273\001" - + "\202\323\344\223\002n\"Q/compute/v1/projects/{project}/g" - + "lobal/forwardingRules/{forwarding_rule}/" - + "setTarget:\031target_reference_resource\332A1p" - + "roject,forwarding_rule,target_reference_" - + "resource\212N\020GlobalOperations\032r\312A\026compute." - + "googleapis.com\322AVhttps://www.googleapis." - + "com/auth/compute,https://www.googleapis." - + "com/auth/cloud-platform2\254\022\n\033GlobalNetwor" - + "kEndpointGroups\022\274\003\n\026AttachNetworkEndpoin" - + "ts\022P.google.cloud.compute.v1.AttachNetwo" - + "rkEndpointsGlobalNetworkEndpointGroupReq" - + "uest\032\".google.cloud.compute.v1.Operation" - + "\"\253\002\202\323\344\223\002\257\001\"k/compute/v1/projects/{projec" - + "t}/global/networkEndpointGroups/{network" - + "_endpoint_group}/attachNetworkEndpoints:" - + "@global_network_endpoint_groups_attach_e" - + "ndpoints_request_resource\332A_project,netw" - + "ork_endpoint_group,global_network_endpoi", - "nt_groups_attach_endpoints_request_resou" - + "rce\212N\020GlobalOperations\022\201\002\n\006Delete\022@.goog" - + "le.cloud.compute.v1.DeleteGlobalNetworkE" - + "ndpointGroupRequest\032\".google.cloud.compu" - + "te.v1.Operation\"\220\001\202\323\344\223\002V*T/compute/v1/pr" - + "ojects/{project}/global/networkEndpointG" - + "roups/{network_endpoint_group}\332A\036project" - + ",network_endpoint_group\212N\020GlobalOperatio" - + "ns\022\274\003\n\026DetachNetworkEndpoints\022P.google.c" - + "loud.compute.v1.DetachNetworkEndpointsGl" - + "obalNetworkEndpointGroupRequest\032\".google" - + ".cloud.compute.v1.Operation\"\253\002\202\323\344\223\002\257\001\"k/" - + "compute/v1/projects/{project}/global/net" - + "workEndpointGroups/{network_endpoint_gro" - + "up}/detachNetworkEndpoints:@global_netwo" - + "rk_endpoint_groups_detach_endpoints_requ" - + "est_resource\332A_project,network_endpoint_" - + "group,global_network_endpoint_groups_det" - + "ach_endpoints_request_resource\212N\020GlobalO" - + "perations\022\362\001\n\003Get\022=.google.cloud.compute" - + ".v1.GetGlobalNetworkEndpointGroupRequest" - + "\032-.google.cloud.compute.v1.NetworkEndpoi" - + "ntGroup\"}\202\323\344\223\002V\022T/compute/v1/projects/{p" - + "roject}/global/networkEndpointGroups/{ne" - + "twork_endpoint_group}\332A\036project,network_" - + "endpoint_group\022\222\002\n\006Insert\022@.google.cloud" - + ".compute.v1.InsertGlobalNetworkEndpointG" - + "roupRequest\032\".google.cloud.compute.v1.Op" - + "eration\"\241\001\202\323\344\223\002^\";/compute/v1/projects/{" - + "project}/global/networkEndpointGroups:\037n" - + "etwork_endpoint_group_resource\332A\'project" - + ",network_endpoint_group_resource\212N\020Globa" - + "lOperations\022\311\001\n\004List\022?.google.cloud.comp" - + "ute.v1.ListGlobalNetworkEndpointGroupsRe" - + "quest\0321.google.cloud.compute.v1.NetworkE" - + "ndpointGroupList\"M\202\323\344\223\002=\022;/compute/v1/pr" - + "ojects/{project}/global/networkEndpointG" - + "roups\332A\007project\022\300\002\n\024ListNetworkEndpoints" - + "\022O.google.cloud.compute.v1.ListNetworkEn" - + "dpointsGlobalNetworkEndpointGroupsReques" - + "t\032B.google.cloud.compute.v1.NetworkEndpo" - + "intGroupsListNetworkEndpoints\"\222\001\202\323\344\223\002k\"i" - + "/compute/v1/projects/{project}/global/ne" - + "tworkEndpointGroups/{network_endpoint_gr" - + "oup}/listNetworkEndpoints\332A\036project,netw" - + "ork_endpoint_group\032r\312A\026compute.googleapi" - + "s.com\322AVhttps://www.googleapis.com/auth/" - + "compute,https://www.googleapis.com/auth/" - + "cloud-platform2\320\010\n\020GlobalOperations\022\312\001\n\016" - + "AggregatedList\022>.google.cloud.compute.v1" - + ".AggregatedListGlobalOperationsRequest\0320" - + ".google.cloud.compute.v1.OperationAggreg" - + "atedList\"F\202\323\344\223\0026\0224/compute/v1/projects/{" - + "project}/aggregated/operations\332A\007project" - + "\022\321\001\n\006Delete\0225.google.cloud.compute.v1.De" - + "leteGlobalOperationRequest\0326.google.clou" - + "d.compute.v1.DeleteGlobalOperationRespon" - + "se\"X\202\323\344\223\002>*\022.google.cloud.com" - + "pute.v1.GetGlobalOrganizationOperationRe" - + "quest\032\".google.cloud.compute.v1.Operatio" - + "n\"J\202\323\344\223\0025\0223/compute/v1/locations/global/" - + "operations/{operation}\332A\toperation\220N\001\022\244\001" - + "\n\004List\022@.google.cloud.compute.v1.ListGlo" - + "balOrganizationOperationsRequest\032&.googl" - + "e.cloud.compute.v1.OperationList\"2\202\323\344\223\002)" - + "\022\'/compute/v1/locations/global/operation" - + "s\332A\000\032r\312A\026compute.googleapis.com\322AVhttps:" - + "//www.googleapis.com/auth/compute,https:" - + "//www.googleapis.com/auth/cloud-platform" - + "2\321\013\n\035GlobalPublicDelegatedPrefixes\022\207\002\n\006D" - + "elete\022B.google.cloud.compute.v1.DeleteGl" - + "obalPublicDelegatedPrefixeRequest\032\".goog" - + "le.cloud.compute.v1.Operation\"\224\001\202\323\344\223\002Y*W" - + "/compute/v1/projects/{project}/global/pu" - + "blicDelegatedPrefixes/{public_delegated_" - + "prefix}\332A\037project,public_delegated_prefi" - + "x\212N\020GlobalOperations\022\372\001\n\003Get\022?.google.cl" - + "oud.compute.v1.GetGlobalPublicDelegatedP" - + "refixeRequest\032..google.cloud.compute.v1." - + "PublicDelegatedPrefix\"\201\001\202\323\344\223\002Y\022W/compute" - + "/v1/projects/{project}/global/publicDele" - + "gatedPrefixes/{public_delegated_prefix}\332" - + "A\037project,public_delegated_prefix\022\230\002\n\006In" - + "sert\022B.google.cloud.compute.v1.InsertGlo" - + "balPublicDelegatedPrefixeRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\245\001\202\323\344\223\002a\"=/" - + "compute/v1/projects/{project}/global/pub" - + "licDelegatedPrefixes: public_delegated_p" - + "refix_resource\332A(project,public_delegate" - + "d_prefix_resource\212N\020GlobalOperations\022\316\001\n" - + "\004List\022A.google.cloud.compute.v1.ListGlob" - + "alPublicDelegatedPrefixesRequest\0322.googl" - + "e.cloud.compute.v1.PublicDelegatedPrefix" - + "List\"O\202\323\344\223\002?\022=/compute/v1/projects/{proj" - + "ect}/global/publicDelegatedPrefixes\332A\007pr" - + "oject\022\310\002\n\005Patch\022A.google.cloud.compute.v" - + "1.PatchGlobalPublicDelegatedPrefixeReque" - + "st\032\".google.cloud.compute.v1.Operation\"\327" - + "\001\202\323\344\223\002{2W/compute/v1/projects/{project}/" - + "global/publicDelegatedPrefixes/{public_d" - + "elegated_prefix}: public_delegated_prefi" - + "x_resource\332A@project,public_delegated_pr" - + "efix,public_delegated_prefix_resource\212N\020" - + "GlobalOperations\032r\312A\026compute.googleapis." - + "com\322AVhttps://www.googleapis.com/auth/co" - + "mpute,https://www.googleapis.com/auth/cl" - + "oud-platform2\203\r\n\014HealthChecks\022\313\001\n\016Aggreg" - + "atedList\022:.google.cloud.compute.v1.Aggre" - + "gatedListHealthChecksRequest\0323.google.cl" - + "oud.compute.v1.HealthChecksAggregatedLis" - + "t\"H\202\323\344\223\0028\0226/compute/v1/projects/{project" - + "}/aggregated/healthChecks\332A\007project\022\324\001\n\006" - + "Delete\0221.google.cloud.compute.v1.DeleteH" - + "ealthCheckRequest\032\".google.cloud.compute" - + ".v1.Operation\"s\202\323\344\223\002C*A/compute/v1/proje" - + "cts/{project}/global/healthChecks/{healt" - + "h_check}\332A\024project,health_check\212N\020Global" - + "Operations\022\275\001\n\003Get\022..google.cloud.comput" - + "e.v1.GetHealthCheckRequest\032$.google.clou" - + "d.compute.v1.HealthCheck\"`\202\323\344\223\002C\022A/compu" - + "te/v1/projects/{project}/global/healthCh" - + "ecks/{health_check}\332A\024project,health_che" - + "ck\022\346\001\n\006Insert\0221.google.cloud.compute.v1." - + "InsertHealthCheckRequest\032\".google.cloud." - + "compute.v1.Operation\"\204\001\202\323\344\223\002K\"2/compute/" - + "v1/projects/{project}/global/healthCheck" - + "s:\025health_check_resource\332A\035project,healt" - + "h_check_resource\212N\020GlobalOperations\022\250\001\n\004" - + "List\0220.google.cloud.compute.v1.ListHealt" - + "hChecksRequest\032(.google.cloud.compute.v1" - + ".HealthCheckList\"D\202\323\344\223\0024\0222/compute/v1/pr" - + "ojects/{project}/global/healthChecks\332A\007p" - + "roject\022\200\002\n\005Patch\0220.google.cloud.compute." - + "v1.PatchHealthCheckRequest\032\".google.clou" - + "d.compute.v1.Operation\"\240\001\202\323\344\223\002Z2A/comput" - + "e/v1/projects/{project}/global/healthChe" - + "cks/{health_check}:\025health_check_resourc" - + "e\332A*project,health_check,health_check_re" - + "source\212N\020GlobalOperations\022\202\002\n\006Update\0221.g" - + "oogle.cloud.compute.v1.UpdateHealthCheck" - + "Request\032\".google.cloud.compute.v1.Operat" - + "ion\"\240\001\202\323\344\223\002Z\032A/compute/v1/projects/{proj" - + "ect}/global/healthChecks/{health_check}:" - + "\025health_check_resource\332A*project,health_" - + "check,health_check_resource\212N\020GlobalOper" + + "\314\001\202\323\344\223\002x\"[/compute/v1/projects/{project}" + + "/regions/{region}/forwardingRules/{forwa" + + "rding_rule}/setTarget:\031target_reference_" + + "resource\332A8project,region,forwarding_rul" + + "e,target_reference_resource\212N\020RegionOper" + "ations\032r\312A\026compute.googleapis.com\322AVhttp" + "s://www.googleapis.com/auth/compute,http" + "s://www.googleapis.com/auth/cloud-platfo" - + "rm2\204\003\n\020ImageFamilyViews\022\310\001\n\003Get\0222.google" - + ".cloud.compute.v1.GetImageFamilyViewRequ" - + "est\032(.google.cloud.compute.v1.ImageFamil" - + "yView\"c\202\323\344\223\002G\022E/compute/v1/projects/{pro" - + "ject}/zones/{zone}/imageFamilyViews/{fam" - + "ily}\332A\023project,zone,family\032\244\001\312A\026compute." - + "googleapis.com\322A\207\001https://www.googleapis" - + ".com/auth/compute.readonly,https://www.g" - + "oogleapis.com/auth/compute,https://www.g" - + "oogleapis.com/auth/cloud-platform2\374\023\n\006Im" - + "ages\022\272\001\n\006Delete\022+.google.cloud.compute.v" - + "1.DeleteImageRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"_\202\323\344\223\0026*4/compute/v1/pr" - + "ojects/{project}/global/images/{image}\332A" - + "\rproject,image\212N\020GlobalOperations\022\204\002\n\tDe" - + "precate\022..google.cloud.compute.v1.Deprec" - + "ateImageRequest\032\".google.cloud.compute.v" - + "1.Operation\"\242\001\202\323\344\223\002]\">/compute/v1/projec" - + "ts/{project}/global/images/{image}/depre" - + "cate:\033deprecation_status_resource\332A)proj" - + "ect,image,deprecation_status_resource\212N\020" - + "GlobalOperations\022\235\001\n\003Get\022(.google.cloud." - + "compute.v1.GetImageRequest\032\036.google.clou" - + "d.compute.v1.Image\"L\202\323\344\223\0026\0224/compute/v1/" - + "projects/{project}/global/images/{image}" - + "\332A\rproject,image\022\272\001\n\rGetFromFamily\0222.goo" - + "gle.cloud.compute.v1.GetFromFamilyImageR" - + "equest\032\036.google.cloud.compute.v1.Image\"U" - + "\202\323\344\223\002>\022\",/compute/v1/pro" - + "jects/{project}/global/images:\016image_res" - + "ource\332A\026project,image_resource\212N\020GlobalO" - + "perations\022\226\001\n\004List\022*.google.cloud.comput" - + "e.v1.ListImagesRequest\032\".google.cloud.co" - + "mpute.v1.ImageList\">\202\323\344\223\002.\022,/compute/v1/" - + "projects/{project}/global/images\332A\007proje" - + "ct\022\327\001\n\005Patch\022*.google.cloud.compute.v1.P" - + "atchImageRequest\032\".google.cloud.compute." - + "v1.Operation\"~\202\323\344\223\002F24/compute/v1/projec" - + "ts/{project}/global/images/{image}:\016imag" - + "e_resource\332A\034project,image,image_resourc" - + "e\212N\020GlobalOperations\022\213\002\n\014SetIamPolicy\0221." - + "google.cloud.compute.v1.SetIamPolicyImag" - + "eRequest\032\037.google.cloud.compute.v1.Polic" - + "y\"\246\001\202\323\344\223\002j\"D/compute/v1/projects/{projec" - + "t}/global/images/{resource}/setIamPolicy" - + ":\"global_set_policy_request_resource\332A3p" - + "roject,resource,global_set_policy_reques" - + "t_resource\022\230\002\n\tSetLabels\022..google.cloud." - + "compute.v1.SetLabelsImageRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\266\001\202\323\344\223\002g\"A/" - + "compute/v1/projects/{project}/global/ima" - + "ges/{resource}/setLabels:\"global_set_lab" - + "els_request_resource\332A3project,resource," - + "global_set_labels_request_resource\212N\020Glo" - + "balOperations\022\254\002\n\022TestIamPermissions\0227.g" - + "oogle.cloud.compute.v1.TestIamPermission" - + "sImageRequest\0320.google.cloud.compute.v1." - + "TestPermissionsResponse\"\252\001\202\323\344\223\002o\"J/compu" - + "te/v1/projects/{project}/global/images/{" - + "resource}/testIamPermissions:!test_permi" - + "ssions_request_resource\332A2project,resour" - + "ce,test_permissions_request_resource\032r\312A" - + "\026compute.googleapis.com\322AVhttps://www.go" - + "ogleapis.com/auth/compute,https://www.go" - + "ogleapis.com/auth/cloud-platform2\3438\n\025Ins" - + "tanceGroupManagers\022\241\003\n\020AbandonInstances\022" - + "D.google.cloud.compute.v1.AbandonInstanc" - + "esInstanceGroupManagerRequest\032\".google.c" - + "loud.compute.v1.Operation\"\242\002\202\323\344\223\002\251\001\"k/co" - + "mpute/v1/projects/{project}/zones/{zone}" - + "/instanceGroupManagers/{instance_group_m" - + "anager}/abandonInstances::instance_group" - + "_managers_abandon_instances_request_reso" - + "urce\332A^project,zone,instance_group_manag" - + "er,instance_group_managers_abandon_insta" - + "nces_request_resource\212N\016ZoneOperations\022\345" - + "\001\n\016AggregatedList\022C.google.cloud.compute" - + ".v1.AggregatedListInstanceGroupManagersR" - + "equest\032;.google.cloud.compute.v1.Instanc" - + "eGroupManagerAggregatedList\"Q\202\323\344\223\002A\022?/co" - + "mpute/v1/projects/{project}/aggregated/i" - + "nstanceGroupManagers\332A\007project\022\256\003\n\027Apply" - + "UpdatesToInstances\022K.google.cloud.comput" - + "e.v1.ApplyUpdatesToInstancesInstanceGrou" - + "pManagerRequest\032\".google.cloud.compute.v" - + "1.Operation\"\241\002\202\323\344\223\002\254\001\"r/compute/v1/proje" - + "cts/{project}/zones/{zone}/instanceGroup" - + "Managers/{instance_group_manager}/applyU" - + "pdatesToInstances:6instance_group_manage" - + "rs_apply_updates_request_resource\332AZproj" - + "ect,zone,instance_group_manager,instance" - + "_group_managers_apply_updates_request_re" - + "source\212N\016ZoneOperations\022\234\003\n\017CreateInstan" - + "ces\022C.google.cloud.compute.v1.CreateInst" - + "ancesInstanceGroupManagerRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\237\002\202\323\344\223\002\247\001\"j" - + "/compute/v1/projects/{project}/zones/{zo" - + "ne}/instanceGroupManagers/{instance_grou" - + "p_manager}/createInstances:9instance_gro" - + "up_managers_create_instances_request_res" - + "ource\332A]project,zone,instance_group_mana" - + "ger,instance_group_managers_create_insta" - + "nces_request_resource\212N\016ZoneOperations\022\204" - + "\002\n\006Delete\022:.google.cloud.compute.v1.Dele" - + "teInstanceGroupManagerRequest\032\".google.c" - + "loud.compute.v1.Operation\"\231\001\202\323\344\223\002\\*Z/com" - + "pute/v1/projects/{project}/zones/{zone}/" - + "instanceGroupManagers/{instance_group_ma" - + "nager}\332A#project,zone,instance_group_man" - + "ager\212N\016ZoneOperations\022\234\003\n\017DeleteInstance" - + "s\022C.google.cloud.compute.v1.DeleteInstan" - + "cesInstanceGroupManagerRequest\032\".google." - + "cloud.compute.v1.Operation\"\237\002\202\323\344\223\002\247\001\"j/c" - + "ompute/v1/projects/{project}/zones/{zone" - + "}/instanceGroupManagers/{instance_group_" - + "manager}/deleteInstances:9instance_group" - + "_managers_delete_instances_request_resou" - + "rce\332A]project,zone,instance_group_manage" - + "r,instance_group_managers_delete_instanc" - + "es_request_resource\212N\016ZoneOperations\022\305\003\n" - + "\030DeletePerInstanceConfigs\022L.google.cloud" - + ".compute.v1.DeletePerInstanceConfigsInst" - + "anceGroupManagerRequest\032\".google.cloud.c" - + "ompute.v1.Operation\"\266\002\202\323\344\223\002\267\001\"s/compute/" + + "rm2\254\t\n\017GlobalAddresses\022\311\001\n\006Delete\0223.goog" + + "le.cloud.compute.v1.DeleteGlobalAddressR" + + "equest\032\".google.cloud.compute.v1.Operati" + + "on\"f\202\323\344\223\002;*9/compute/v1/projects/{projec" + + "t}/global/addresses/{address}\332A\017project," + + "address\212N\020GlobalOperations\022\256\001\n\003Get\0220.goo" + + "gle.cloud.compute.v1.GetGlobalAddressReq" + + "uest\032 .google.cloud.compute.v1.Address\"S" + + "\202\323\344\223\002;\0229/compute/v1/projects/{project}/g" + + "lobal/addresses/{address}\332A\017project,addr" + + "ess\022\332\001\n\006Insert\0223.google.cloud.compute.v1" + + ".InsertGlobalAddressRequest\032\".google.clo" + + "ud.compute.v1.Operation\"w\202\323\344\223\002C\"//comput" + + "e/v1/projects/{project}/global/addresses" + + ":\020address_resource\332A\030project,address_res" + + "ource\212N\020GlobalOperations\022\244\001\n\004List\0223.goog" + + "le.cloud.compute.v1.ListGlobalAddressesR" + + "equest\032$.google.cloud.compute.v1.Address" + + "List\"A\202\323\344\223\0021\022//compute/v1/projects/{proj" + + "ect}/global/addresses\332A\007project\022\243\002\n\tSetL" + + "abels\0226.google.cloud.compute.v1.SetLabel" + + "sGlobalAddressRequest\032\".google.cloud.com" + + "pute.v1.Operation\"\271\001\202\323\344\223\002j\"D/compute/v1/" + + "projects/{project}/global/addresses/{res" + + "ource}/setLabels:\"global_set_labels_requ" + + "est_resource\332A3project,resource,global_s" + + "et_labels_request_resource\212N\020GlobalOpera" + + "tions\032r\312A\026compute.googleapis.com\322AVhttps" + + "://www.googleapis.com/auth/compute,https" + + "://www.googleapis.com/auth/cloud-platfor" + + "m2\373\016\n\025GlobalForwardingRules\022\346\001\n\006Delete\022:" + + ".google.cloud.compute.v1.DeleteGlobalFor" + + "wardingRuleRequest\032\".google.cloud.comput" + + "e.v1.Operation\"|\202\323\344\223\002I*G/compute/v1/proj" + + "ects/{project}/global/forwardingRules/{f" + + "orwarding_rule}\332A\027project,forwarding_rul" + + "e\212N\020GlobalOperations\022\322\001\n\003Get\0227.google.cl" + + "oud.compute.v1.GetGlobalForwardingRuleRe" + + "quest\032\'.google.cloud.compute.v1.Forwardi" + + "ngRule\"i\202\323\344\223\002I\022G/compute/v1/projects/{pr" + + "oject}/global/forwardingRules/{forwardin" + + "g_rule}\332A\027project,forwarding_rule\022\370\001\n\006In" + + "sert\022:.google.cloud.compute.v1.InsertGlo" + + "balForwardingRuleRequest\032\".google.cloud." + + "compute.v1.Operation\"\215\001\202\323\344\223\002Q\"5/compute/" + + "v1/projects/{project}/global/forwardingR" + + "ules:\030forwarding_rule_resource\332A project" + + ",forwarding_rule_resource\212N\020GlobalOperat" + + "ions\022\267\001\n\004List\0229.google.cloud.compute.v1." + + "ListGlobalForwardingRulesRequest\032+.googl" + + "e.cloud.compute.v1.ForwardingRuleList\"G\202" + + "\323\344\223\0027\0225/compute/v1/projects/{project}/gl" + + "obal/forwardingRules\332A\007project\022\230\002\n\005Patch" + + "\0229.google.cloud.compute.v1.PatchGlobalFo" + + "rwardingRuleRequest\032\".google.cloud.compu" + + "te.v1.Operation\"\257\001\202\323\344\223\002c2G/compute/v1/pr" + + "ojects/{project}/global/forwardingRules/" + + "{forwarding_rule}:\030forwarding_rule_resou" + + "rce\332A0project,forwarding_rule,forwarding" + + "_rule_resource\212N\020GlobalOperations\022\260\002\n\tSe" + + "tLabels\022=.google.cloud.compute.v1.SetLab" + + "elsGlobalForwardingRuleRequest\032\".google." + + "cloud.compute.v1.Operation\"\277\001\202\323\344\223\002p\"J/co" + + "mpute/v1/projects/{project}/global/forwa" + + "rdingRules/{resource}/setLabels:\"global_" + + "set_labels_request_resource\332A3project,re" + + "source,global_set_labels_request_resourc" + + "e\212N\020GlobalOperations\022\254\002\n\tSetTarget\022=.goo" + + "gle.cloud.compute.v1.SetTargetGlobalForw" + + "ardingRuleRequest\032\".google.cloud.compute" + + ".v1.Operation\"\273\001\202\323\344\223\002n\"Q/compute/v1/proj" + + "ects/{project}/global/forwardingRules/{f" + + "orwarding_rule}/setTarget:\031target_refere" + + "nce_resource\332A1project,forwarding_rule,t" + + "arget_reference_resource\212N\020GlobalOperati" + + "ons\032r\312A\026compute.googleapis.com\322AVhttps:/" + + "/www.googleapis.com/auth/compute,https:/" + + "/www.googleapis.com/auth/cloud-platform2", + "\254\022\n\033GlobalNetworkEndpointGroups\022\274\003\n\026Atta" + + "chNetworkEndpoints\022P.google.cloud.comput" + + "e.v1.AttachNetworkEndpointsGlobalNetwork" + + "EndpointGroupRequest\032\".google.cloud.comp" + + "ute.v1.Operation\"\253\002\202\323\344\223\002\257\001\"k/compute/v1/" + + "projects/{project}/global/networkEndpoin" + + "tGroups/{network_endpoint_group}/attachN" + + "etworkEndpoints:@global_network_endpoint" + + "_groups_attach_endpoints_request_resourc" + + "e\332A_project,network_endpoint_group,globa" + + "l_network_endpoint_groups_attach_endpoin" + + "ts_request_resource\212N\020GlobalOperations\022\201" + + "\002\n\006Delete\022@.google.cloud.compute.v1.Dele" + + "teGlobalNetworkEndpointGroupRequest\032\".go" + + "ogle.cloud.compute.v1.Operation\"\220\001\202\323\344\223\002V" + + "*T/compute/v1/projects/{project}/global/" + + "networkEndpointGroups/{network_endpoint_" + + "group}\332A\036project,network_endpoint_group\212" + + "N\020GlobalOperations\022\274\003\n\026DetachNetworkEndp" + + "oints\022P.google.cloud.compute.v1.DetachNe" + + "tworkEndpointsGlobalNetworkEndpointGroup" + + "Request\032\".google.cloud.compute.v1.Operat" + + "ion\"\253\002\202\323\344\223\002\257\001\"k/compute/v1/projects/{pro" + + "ject}/global/networkEndpointGroups/{netw" + + "ork_endpoint_group}/detachNetworkEndpoin" + + "ts:@global_network_endpoint_groups_detac" + + "h_endpoints_request_resource\332A_project,n" + + "etwork_endpoint_group,global_network_end" + + "point_groups_detach_endpoints_request_re" + + "source\212N\020GlobalOperations\022\362\001\n\003Get\022=.goog" + + "le.cloud.compute.v1.GetGlobalNetworkEndp" + + "ointGroupRequest\032-.google.cloud.compute." + + "v1.NetworkEndpointGroup\"}\202\323\344\223\002V\022T/comput" + + "e/v1/projects/{project}/global/networkEn" + + "dpointGroups/{network_endpoint_group}\332A\036" + + "project,network_endpoint_group\022\222\002\n\006Inser" + + "t\022@.google.cloud.compute.v1.InsertGlobal" + + "NetworkEndpointGroupRequest\032\".google.clo" + + "ud.compute.v1.Operation\"\241\001\202\323\344\223\002^\";/compu" + + "te/v1/projects/{project}/global/networkE" + + "ndpointGroups:\037network_endpoint_group_re" + + "source\332A\'project,network_endpoint_group_" + + "resource\212N\020GlobalOperations\022\311\001\n\004List\022?.g" + + "oogle.cloud.compute.v1.ListGlobalNetwork" + + "EndpointGroupsRequest\0321.google.cloud.com" + + "pute.v1.NetworkEndpointGroupList\"M\202\323\344\223\002=" + + "\022;/compute/v1/projects/{project}/global/" + + "networkEndpointGroups\332A\007project\022\300\002\n\024List" + + "NetworkEndpoints\022O.google.cloud.compute." + + "v1.ListNetworkEndpointsGlobalNetworkEndp" + + "ointGroupsRequest\032B.google.cloud.compute" + + ".v1.NetworkEndpointGroupsListNetworkEndp" + + "oints\"\222\001\202\323\344\223\002k\"i/compute/v1/projects/{pr" + + "oject}/global/networkEndpointGroups/{net" + + "work_endpoint_group}/listNetworkEndpoint" + + "s\332A\036project,network_endpoint_group\032r\312A\026c" + + "ompute.googleapis.com\322AVhttps://www.goog" + + "leapis.com/auth/compute,https://www.goog" + + "leapis.com/auth/cloud-platform2\320\010\n\020Globa" + + "lOperations\022\312\001\n\016AggregatedList\022>.google." + + "cloud.compute.v1.AggregatedListGlobalOpe" + + "rationsRequest\0320.google.cloud.compute.v1" + + ".OperationAggregatedList\"F\202\323\344\223\0026\0224/compu" + + "te/v1/projects/{project}/aggregated/oper" + + "ations\332A\007project\022\321\001\n\006Delete\0225.google.clo" + + "ud.compute.v1.DeleteGlobalOperationReque" + + "st\0326.google.cloud.compute.v1.DeleteGloba" + + "lOperationResponse\"X\202\323\344\223\002>*\022." + + "google.cloud.compute.v1.GetGlobalOrganiz" + + "ationOperationRequest\032\".google.cloud.com" + + "pute.v1.Operation\"J\202\323\344\223\0025\0223/compute/v1/l" + + "ocations/global/operations/{operation}\332A" + + "\toperation\220N\001\022\244\001\n\004List\022@.google.cloud.co" + + "mpute.v1.ListGlobalOrganizationOperation" + + "sRequest\032&.google.cloud.compute.v1.Opera" + + "tionList\"2\202\323\344\223\002)\022\'/compute/v1/locations/" + + "global/operations\332A\000\032r\312A\026compute.googlea" + + "pis.com\322AVhttps://www.googleapis.com/aut" + + "h/compute,https://www.googleapis.com/aut" + + "h/cloud-platform2\321\013\n\035GlobalPublicDelegat" + + "edPrefixes\022\207\002\n\006Delete\022B.google.cloud.com" + + "pute.v1.DeleteGlobalPublicDelegatedPrefi" + + "xeRequest\032\".google.cloud.compute.v1.Oper" + + "ation\"\224\001\202\323\344\223\002Y*W/compute/v1/projects/{pr" + + "oject}/global/publicDelegatedPrefixes/{p" + + "ublic_delegated_prefix}\332A\037project,public" + + "_delegated_prefix\212N\020GlobalOperations\022\372\001\n" + + "\003Get\022?.google.cloud.compute.v1.GetGlobal" + + "PublicDelegatedPrefixeRequest\032..google.c" + + "loud.compute.v1.PublicDelegatedPrefix\"\201\001" + + "\202\323\344\223\002Y\022W/compute/v1/projects/{project}/g" + + "lobal/publicDelegatedPrefixes/{public_de" + + "legated_prefix}\332A\037project,public_delegat" + + "ed_prefix\022\230\002\n\006Insert\022B.google.cloud.comp" + + "ute.v1.InsertGlobalPublicDelegatedPrefix" + + "eRequest\032\".google.cloud.compute.v1.Opera" + + "tion\"\245\001\202\323\344\223\002a\"=/compute/v1/projects/{pro" + + "ject}/global/publicDelegatedPrefixes: pu" + + "blic_delegated_prefix_resource\332A(project" + + ",public_delegated_prefix_resource\212N\020Glob" + + "alOperations\022\316\001\n\004List\022A.google.cloud.com" + + "pute.v1.ListGlobalPublicDelegatedPrefixe" + + "sRequest\0322.google.cloud.compute.v1.Publi" + + "cDelegatedPrefixList\"O\202\323\344\223\002?\022=/compute/v" + + "1/projects/{project}/global/publicDelega" + + "tedPrefixes\332A\007project\022\310\002\n\005Patch\022A.google" + + ".cloud.compute.v1.PatchGlobalPublicDeleg" + + "atedPrefixeRequest\032\".google.cloud.comput" + + "e.v1.Operation\"\327\001\202\323\344\223\002{2W/compute/v1/pro" + + "jects/{project}/global/publicDelegatedPr" + + "efixes/{public_delegated_prefix}: public" + + "_delegated_prefix_resource\332A@project,pub" + + "lic_delegated_prefix,public_delegated_pr" + + "efix_resource\212N\020GlobalOperations\032r\312A\026com" + + "pute.googleapis.com\322AVhttps://www.google" + + "apis.com/auth/compute,https://www.google" + + "apis.com/auth/cloud-platform2\203\r\n\014HealthC" + + "hecks\022\313\001\n\016AggregatedList\022:.google.cloud." + + "compute.v1.AggregatedListHealthChecksReq" + + "uest\0323.google.cloud.compute.v1.HealthChe" + + "cksAggregatedList\"H\202\323\344\223\0028\0226/compute/v1/p" + + "rojects/{project}/aggregated/healthCheck" + + "s\332A\007project\022\324\001\n\006Delete\0221.google.cloud.co" + + "mpute.v1.DeleteHealthCheckRequest\032\".goog" + + "le.cloud.compute.v1.Operation\"s\202\323\344\223\002C*A/" + + "compute/v1/projects/{project}/global/hea" + + "lthChecks/{health_check}\332A\024project,healt" + + "h_check\212N\020GlobalOperations\022\275\001\n\003Get\022..goo" + + "gle.cloud.compute.v1.GetHealthCheckReque" + + "st\032$.google.cloud.compute.v1.HealthCheck" + + "\"`\202\323\344\223\002C\022A/compute/v1/projects/{project}" + + "/global/healthChecks/{health_check}\332A\024pr" + + "oject,health_check\022\346\001\n\006Insert\0221.google.c" + + "loud.compute.v1.InsertHealthCheckRequest" + + "\032\".google.cloud.compute.v1.Operation\"\204\001\202" + + "\323\344\223\002K\"2/compute/v1/projects/{project}/gl" + + "obal/healthChecks:\025health_check_resource" + + "\332A\035project,health_check_resource\212N\020Globa" + + "lOperations\022\250\001\n\004List\0220.google.cloud.comp" + + "ute.v1.ListHealthChecksRequest\032(.google." + + "cloud.compute.v1.HealthCheckList\"D\202\323\344\223\0024" + + "\0222/compute/v1/projects/{project}/global/" + + "healthChecks\332A\007project\022\200\002\n\005Patch\0220.googl" + + "e.cloud.compute.v1.PatchHealthCheckReque" + + "st\032\".google.cloud.compute.v1.Operation\"\240" + + "\001\202\323\344\223\002Z2A/compute/v1/projects/{project}/" + + "global/healthChecks/{health_check}:\025heal" + + "th_check_resource\332A*project,health_check" + + ",health_check_resource\212N\020GlobalOperation" + + "s\022\202\002\n\006Update\0221.google.cloud.compute.v1.U" + + "pdateHealthCheckRequest\032\".google.cloud.c" + + "ompute.v1.Operation\"\240\001\202\323\344\223\002Z\032A/compute/v" + + "1/projects/{project}/global/healthChecks" + + "/{health_check}:\025health_check_resource\332A" + + "*project,health_check,health_check_resou" + + "rce\212N\020GlobalOperations\032r\312A\026compute.googl" + + "eapis.com\322AVhttps://www.googleapis.com/a" + + "uth/compute,https://www.googleapis.com/a" + + "uth/cloud-platform2\204\003\n\020ImageFamilyViews\022" + + "\310\001\n\003Get\0222.google.cloud.compute.v1.GetIma" + + "geFamilyViewRequest\032(.google.cloud.compu" + + "te.v1.ImageFamilyView\"c\202\323\344\223\002G\022E/compute/" + + "v1/projects/{project}/zones/{zone}/image" + + "FamilyViews/{family}\332A\023project,zone,fami" + + "ly\032\244\001\312A\026compute.googleapis.com\322A\207\001https:" + + "//www.googleapis.com/auth/compute.readon" + + "ly,https://www.googleapis.com/auth/compu" + + "te,https://www.googleapis.com/auth/cloud" + + "-platform2\374\023\n\006Images\022\272\001\n\006Delete\022+.google" + + ".cloud.compute.v1.DeleteImageRequest\032\".g" + + "oogle.cloud.compute.v1.Operation\"_\202\323\344\223\0026" + + "*4/compute/v1/projects/{project}/global/" + + "images/{image}\332A\rproject,image\212N\020GlobalO" + + "perations\022\204\002\n\tDeprecate\022..google.cloud.c" + + "ompute.v1.DeprecateImageRequest\032\".google" + + ".cloud.compute.v1.Operation\"\242\001\202\323\344\223\002]\">/c" + + "ompute/v1/projects/{project}/global/imag" + + "es/{image}/deprecate:\033deprecation_status" + + "_resource\332A)project,image,deprecation_st" + + "atus_resource\212N\020GlobalOperations\022\235\001\n\003Get" + + "\022(.google.cloud.compute.v1.GetImageReque" + + "st\032\036.google.cloud.compute.v1.Image\"L\202\323\344\223" + + "\0026\0224/compute/v1/projects/{project}/globa" + + "l/images/{image}\332A\rproject,image\022\272\001\n\rGet" + + "FromFamily\0222.google.cloud.compute.v1.Get" + + "FromFamilyImageRequest\032\036.google.cloud.co" + + "mpute.v1.Image\"U\202\323\344\223\002>\022\"" + + ",/compute/v1/projects/{project}/global/i" + + "mages:\016image_resource\332A\026project,image_re" + + "source\212N\020GlobalOperations\022\226\001\n\004List\022*.goo" + + "gle.cloud.compute.v1.ListImagesRequest\032\"" + + ".google.cloud.compute.v1.ImageList\">\202\323\344\223" + + "\002.\022,/compute/v1/projects/{project}/globa" + + "l/images\332A\007project\022\327\001\n\005Patch\022*.google.cl" + + "oud.compute.v1.PatchImageRequest\032\".googl" + + "e.cloud.compute.v1.Operation\"~\202\323\344\223\002F24/c" + + "ompute/v1/projects/{project}/global/imag" + + "es/{image}:\016image_resource\332A\034project,ima" + + "ge,image_resource\212N\020GlobalOperations\022\213\002\n" + + "\014SetIamPolicy\0221.google.cloud.compute.v1." + + "SetIamPolicyImageRequest\032\037.google.cloud." + + "compute.v1.Policy\"\246\001\202\323\344\223\002j\"D/compute/v1/" + + "projects/{project}/global/images/{resour" + + "ce}/setIamPolicy:\"global_set_policy_requ" + + "est_resource\332A3project,resource,global_s" + + "et_policy_request_resource\022\230\002\n\tSetLabels" + + "\022..google.cloud.compute.v1.SetLabelsImag" + + "eRequest\032\".google.cloud.compute.v1.Opera" + + "tion\"\266\001\202\323\344\223\002g\"A/compute/v1/projects/{pro" + + "ject}/global/images/{resource}/setLabels" + + ":\"global_set_labels_request_resource\332A3p" + + "roject,resource,global_set_labels_reques" + + "t_resource\212N\020GlobalOperations\022\254\002\n\022TestIa" + + "mPermissions\0227.google.cloud.compute.v1.T" + + "estIamPermissionsImageRequest\0320.google.c" + + "loud.compute.v1.TestPermissionsResponse\"" + + "\252\001\202\323\344\223\002o\"J/compute/v1/projects/{project}" + + "/global/images/{resource}/testIamPermiss" + + "ions:!test_permissions_request_resource\332" + + "A2project,resource,test_permissions_requ" + + "est_resource\032r\312A\026compute.googleapis.com\322" + + "AVhttps://www.googleapis.com/auth/comput" + + "e,https://www.googleapis.com/auth/cloud-" + + "platform2\3438\n\025InstanceGroupManagers\022\241\003\n\020A" + + "bandonInstances\022D.google.cloud.compute.v" + + "1.AbandonInstancesInstanceGroupManagerRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"\242\002\202\323\344\223\002\251\001\"k/compute/v1/projects/{proje" + + "ct}/zones/{zone}/instanceGroupManagers/{" + + "instance_group_manager}/abandonInstances" + + "::instance_group_managers_abandon_instan" + + "ces_request_resource\332A^project,zone,inst" + + "ance_group_manager,instance_group_manage" + + "rs_abandon_instances_request_resource\212N\016" + + "ZoneOperations\022\345\001\n\016AggregatedList\022C.goog" + + "le.cloud.compute.v1.AggregatedListInstan" + + "ceGroupManagersRequest\032;.google.cloud.co" + + "mpute.v1.InstanceGroupManagerAggregatedL" + + "ist\"Q\202\323\344\223\002A\022?/compute/v1/projects/{proje" + + "ct}/aggregated/instanceGroupManagers\332A\007p" + + "roject\022\256\003\n\027ApplyUpdatesToInstances\022K.goo" + + "gle.cloud.compute.v1.ApplyUpdatesToInsta" + + "ncesInstanceGroupManagerRequest\032\".google" + + ".cloud.compute.v1.Operation\"\241\002\202\323\344\223\002\254\001\"r/" + + "compute/v1/projects/{project}/zones/{zon" + + "e}/instanceGroupManagers/{instance_group" + + "_manager}/applyUpdatesToInstances:6insta" + + "nce_group_managers_apply_updates_request" + + "_resource\332AZproject,zone,instance_group_" + + "manager,instance_group_managers_apply_up" + + "dates_request_resource\212N\016ZoneOperations\022" + + "\234\003\n\017CreateInstances\022C.google.cloud.compu" + + "te.v1.CreateInstancesInstanceGroupManage" + + "rRequest\032\".google.cloud.compute.v1.Opera" + + "tion\"\237\002\202\323\344\223\002\247\001\"j/compute/v1/projects/{pr" + + "oject}/zones/{zone}/instanceGroupManager" + + "s/{instance_group_manager}/createInstanc" + + "es:9instance_group_managers_create_insta" + + "nces_request_resource\332A]project,zone,ins" + + "tance_group_manager,instance_group_manag" + + "ers_create_instances_request_resource\212N\016" + + "ZoneOperations\022\204\002\n\006Delete\022:.google.cloud" + + ".compute.v1.DeleteInstanceGroupManagerRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"\231\001\202\323\344\223\002\\*Z/compute/v1/projects/{projec" + + "t}/zones/{zone}/instanceGroupManagers/{i" + + "nstance_group_manager}\332A#project,zone,in" + + "stance_group_manager\212N\016ZoneOperations\022\234\003" + + "\n\017DeleteInstances\022C.google.cloud.compute" + + ".v1.DeleteInstancesInstanceGroupManagerR" + + "equest\032\".google.cloud.compute.v1.Operati" + + "on\"\237\002\202\323\344\223\002\247\001\"j/compute/v1/projects/{proj" + + "ect}/zones/{zone}/instanceGroupManagers/" + + "{instance_group_manager}/deleteInstances" + + ":9instance_group_managers_delete_instanc" + + "es_request_resource\332A]project,zone,insta" + + "nce_group_manager,instance_group_manager" + + "s_delete_instances_request_resource\212N\016Zo" + + "neOperations\022\305\003\n\030DeletePerInstanceConfig" + + "s\022L.google.cloud.compute.v1.DeletePerIns" + + "tanceConfigsInstanceGroupManagerRequest\032" + + "\".google.cloud.compute.v1.Operation\"\266\002\202\323" + + "\344\223\002\267\001\"s/compute/v1/projects/{project}/zo" + + "nes/{zone}/instanceGroupManagers/{instan" + + "ce_group_manager}/deletePerInstanceConfi" + + "gs:@instance_group_managers_delete_per_i" + + "nstance_configs_req_resource\332Adproject,z" + + "one,instance_group_manager,instance_grou" + + "p_managers_delete_per_instance_configs_r" + + "eq_resource\212N\016ZoneOperations\022\370\001\n\003Get\0227.g" + + "oogle.cloud.compute.v1.GetInstanceGroupM" + + "anagerRequest\032-.google.cloud.compute.v1." + + "InstanceGroupManager\"\210\001\202\323\344\223\002\\\022Z/compute/" + "v1/projects/{project}/zones/{zone}/insta" + "nceGroupManagers/{instance_group_manager" - + "}/deletePerInstanceConfigs:@instance_gro" - + "up_managers_delete_per_instance_configs_" - + "req_resource\332Adproject,zone,instance_gro" - + "up_manager,instance_group_managers_delet" - + "e_per_instance_configs_req_resource\212N\016Zo" - + "neOperations\022\370\001\n\003Get\0227.google.cloud.comp" - + "ute.v1.GetInstanceGroupManagerRequest\032-." - + "google.cloud.compute.v1.InstanceGroupMan" - + "ager\"\210\001\202\323\344\223\002\\\022Z/compute/v1/projects/{pro" - + "ject}/zones/{zone}/instanceGroupManagers" - + "/{instance_group_manager}\332A#project,zone" - + ",instance_group_manager\022\225\002\n\006Insert\022:.goo" - + "gle.cloud.compute.v1.InsertInstanceGroup" - + "ManagerRequest\032\".google.cloud.compute.v1" - + ".Operation\"\252\001\202\323\344\223\002d\"A/compute/v1/project" - + "s/{project}/zones/{zone}/instanceGroupMa" - + "nagers:\037instance_group_manager_resource\332" - + "A,project,zone,instance_group_manager_re" - + "source\212N\016ZoneOperations\022\316\001\n\004List\0229.googl" - + "e.cloud.compute.v1.ListInstanceGroupMana" - + "gersRequest\0321.google.cloud.compute.v1.In" - + "stanceGroupManagerList\"X\202\323\344\223\002C\022A/compute" - + "/v1/projects/{project}/zones/{zone}/inst" - + "anceGroupManagers\332A\014project,zone\022\245\002\n\nLis" - + "tErrors\022?.google.cloud.compute.v1.ListEr" - + "rorsInstanceGroupManagersRequest\032@.googl" - + "e.cloud.compute.v1.InstanceGroupManagers" - + "ListErrorsResponse\"\223\001\202\323\344\223\002g\022e/compute/v1" + + "}\332A#project,zone,instance_group_manager\022" + + "\225\002\n\006Insert\022:.google.cloud.compute.v1.Ins" + + "ertInstanceGroupManagerRequest\032\".google." + + "cloud.compute.v1.Operation\"\252\001\202\323\344\223\002d\"A/co" + + "mpute/v1/projects/{project}/zones/{zone}" + + "/instanceGroupManagers:\037instance_group_m" + + "anager_resource\332A,project,zone,instance_" + + "group_manager_resource\212N\016ZoneOperations\022" + + "\316\001\n\004List\0229.google.cloud.compute.v1.ListI" + + "nstanceGroupManagersRequest\0321.google.clo" + + "ud.compute.v1.InstanceGroupManagerList\"X" + + "\202\323\344\223\002C\022A/compute/v1/projects/{project}/z" + + "ones/{zone}/instanceGroupManagers\332A\014proj" + + "ect,zone\022\245\002\n\nListErrors\022?.google.cloud.c" + + "ompute.v1.ListErrorsInstanceGroupManager" + + "sRequest\032@.google.cloud.compute.v1.Insta" + + "nceGroupManagersListErrorsResponse\"\223\001\202\323\344" + + "\223\002g\022e/compute/v1/projects/{project}/zone" + + "s/{zone}/instanceGroupManagers/{instance" + + "_group_manager}/listErrors\332A#project,zon" + + "e,instance_group_manager\022\315\002\n\024ListManaged" + + "Instances\022I.google.cloud.compute.v1.List" + + "ManagedInstancesInstanceGroupManagersReq" + + "uest\032J.google.cloud.compute.v1.InstanceG" + + "roupManagersListManagedInstancesResponse" + + "\"\235\001\202\323\344\223\002q\"o/compute/v1/projects/{project" + + "}/zones/{zone}/instanceGroupManagers/{in" + + "stance_group_manager}/listManagedInstanc" + + "es\332A#project,zone,instance_group_manager" + + "\022\321\002\n\026ListPerInstanceConfigs\022K.google.clo" + + "ud.compute.v1.ListPerInstanceConfigsInst" + + "anceGroupManagersRequest\032H.google.cloud." + + "compute.v1.InstanceGroupManagersListPerI" + + "nstanceConfigsResp\"\237\001\202\323\344\223\002s\"q/compute/v1" + "/projects/{project}/zones/{zone}/instanc" + "eGroupManagers/{instance_group_manager}/" - + "listErrors\332A#project,zone,instance_group" - + "_manager\022\315\002\n\024ListManagedInstances\022I.goog" - + "le.cloud.compute.v1.ListManagedInstances" - + "InstanceGroupManagersRequest\032J.google.cl" - + "oud.compute.v1.InstanceGroupManagersList" - + "ManagedInstancesResponse\"\235\001\202\323\344\223\002q\"o/comp" - + "ute/v1/projects/{project}/zones/{zone}/i" - + "nstanceGroupManagers/{instance_group_man" - + "ager}/listManagedInstances\332A#project,zon" - + "e,instance_group_manager\022\321\002\n\026ListPerInst" - + "anceConfigs\022K.google.cloud.compute.v1.Li" - + "stPerInstanceConfigsInstanceGroupManager" - + "sRequest\032H.google.cloud.compute.v1.Insta" - + "nceGroupManagersListPerInstanceConfigsRe" - + "sp\"\237\001\202\323\344\223\002s\"q/compute/v1/projects/{proje" - + "ct}/zones/{zone}/instanceGroupManagers/{" - + "instance_group_manager}/listPerInstanceC" - + "onfigs\332A#project,zone,instance_group_man" - + "ager\022\303\002\n\005Patch\0229.google.cloud.compute.v1" - + ".PatchInstanceGroupManagerRequest\032\".goog" - + "le.cloud.compute.v1.Operation\"\332\001\202\323\344\223\002}2Z" - + "/compute/v1/projects/{project}/zones/{zo" - + "ne}/instanceGroupManagers/{instance_grou" - + "p_manager}:\037instance_group_manager_resou" - + "rce\332ACproject,zone,instance_group_manage" - + "r,instance_group_manager_resource\212N\016Zone" - + "Operations\022\300\003\n\027PatchPerInstanceConfigs\022K" - + ".google.cloud.compute.v1.PatchPerInstanc" - + "eConfigsInstanceGroupManagerRequest\032\".go" - + "ogle.cloud.compute.v1.Operation\"\263\002\202\323\344\223\002\265" - + "\001\"r/compute/v1/projects/{project}/zones/" - + "{zone}/instanceGroupManagers/{instance_g" - + "roup_manager}/patchPerInstanceConfigs:?i" - + "nstance_group_managers_patch_per_instanc" - + "e_configs_req_resource\332Acproject,zone,in" - + "stance_group_manager,instance_group_mana" - + "gers_patch_per_instance_configs_req_reso" - + "urce\212N\016ZoneOperations\022\246\003\n\021RecreateInstan" - + "ces\022E.google.cloud.compute.v1.RecreateIn" - + "stancesInstanceGroupManagerRequest\032\".goo" - + "gle.cloud.compute.v1.Operation\"\245\002\202\323\344\223\002\253\001" - + "\"l/compute/v1/projects/{project}/zones/{" + + "listPerInstanceConfigs\332A#project,zone,in" + + "stance_group_manager\022\303\002\n\005Patch\0229.google." + + "cloud.compute.v1.PatchInstanceGroupManag" + + "erRequest\032\".google.cloud.compute.v1.Oper" + + "ation\"\332\001\202\323\344\223\002}2Z/compute/v1/projects/{pr" + + "oject}/zones/{zone}/instanceGroupManager" + + "s/{instance_group_manager}:\037instance_gro" + + "up_manager_resource\332ACproject,zone,insta" + + "nce_group_manager,instance_group_manager" + + "_resource\212N\016ZoneOperations\022\300\003\n\027PatchPerI" + + "nstanceConfigs\022K.google.cloud.compute.v1" + + ".PatchPerInstanceConfigsInstanceGroupMan" + + "agerRequest\032\".google.cloud.compute.v1.Op" + + "eration\"\263\002\202\323\344\223\002\265\001\"r/compute/v1/projects/" + + "{project}/zones/{zone}/instanceGroupMana" + + "gers/{instance_group_manager}/patchPerIn" + + "stanceConfigs:?instance_group_managers_p" + + "atch_per_instance_configs_req_resource\332A" + + "cproject,zone,instance_group_manager,ins" + + "tance_group_managers_patch_per_instance_" + + "configs_req_resource\212N\016ZoneOperations\022\246\003" + + "\n\021RecreateInstances\022E.google.cloud.compu" + + "te.v1.RecreateInstancesInstanceGroupMana" + + "gerRequest\032\".google.cloud.compute.v1.Ope" + + "ration\"\245\002\202\323\344\223\002\253\001\"l/compute/v1/projects/{" + + "project}/zones/{zone}/instanceGroupManag" + + "ers/{instance_group_manager}/recreateIns" + + "tances:;instance_group_managers_recreate" + + "_instances_request_resource\332A_project,zo" + + "ne,instance_group_manager,instance_group" + + "_managers_recreate_instances_request_res" + + "ource\212N\016ZoneOperations\022\220\002\n\006Resize\022:.goog" + + "le.cloud.compute.v1.ResizeInstanceGroupM" + + "anagerRequest\032\".google.cloud.compute.v1." + + "Operation\"\245\001\202\323\344\223\002c\"a/compute/v1/projects", + "/{project}/zones/{zone}/instanceGroupMan" + + "agers/{instance_group_manager}/resize\332A(" + + "project,zone,instance_group_manager,size" + + "\212N\016ZoneOperations\022\262\003\n\023SetInstanceTemplat" + + "e\022G.google.cloud.compute.v1.SetInstanceT" + + "emplateInstanceGroupManagerRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\255\002\202\323\344\223\002\260\001" + + "\"n/compute/v1/projects/{project}/zones/{" + "zone}/instanceGroupManagers/{instance_gr" - + "oup_manager}/recreateInstances:;instance" - + "_group_managers_recreate_instances_reque" - + "st_resource\332A_project,zone,instance_grou" - + "p_manager,instance_group_managers_recrea" - + "te_instances_request_resource\212N\016ZoneOper" - + "ations\022\220\002\n\006Resize\022:.google.cloud.compute" - + ".v1.ResizeInstanceGroupManagerRequest\032\"." - + "google.cloud.compute.v1.Operation\"\245\001\202\323\344\223" - + "\002c\"a/compute/v1/projects/{project}/zones" - + "/{zone}/instanceGroupManagers/{instance_" - + "group_manager}/resize\332A(project,zone,ins" - + "tance_group_manager,size\212N\016ZoneOperation" - + "s\022\262\003\n\023SetInstanceTemplate\022G.google.cloud" - + ".compute.v1.SetInstanceTemplateInstanceG" - + "roupManagerRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\255\002\202\323\344\223\002\260\001\"n/compute/v1/pr" - + "ojects/{project}/zones/{zone}/instanceGr" - + "oupManagers/{instance_group_manager}/set" - + "InstanceTemplate:>instance_group_manager", - "s_set_instance_template_request_resource" - + "\332Abproject,zone,instance_group_manager,i" - + "nstance_group_managers_set_instance_temp" - + "late_request_resource\212N\016ZoneOperations\022\231" - + "\003\n\016SetTargetPools\022B.google.cloud.compute" - + ".v1.SetTargetPoolsInstanceGroupManagerRe" - + "quest\032\".google.cloud.compute.v1.Operatio" - + "n\"\236\002\202\323\344\223\002\246\001\"i/compute/v1/projects/{proje" - + "ct}/zones/{zone}/instanceGroupManagers/{" - + "instance_group_manager}/setTargetPools:9" - + "instance_group_managers_set_target_pools" - + "_request_resource\332A]project,zone,instanc" - + "e_group_manager,instance_group_managers_" - + "set_target_pools_request_resource\212N\016Zone" - + "Operations\022\305\003\n\030UpdatePerInstanceConfigs\022" - + "L.google.cloud.compute.v1.UpdatePerInsta" - + "nceConfigsInstanceGroupManagerRequest\032\"." - + "google.cloud.compute.v1.Operation\"\266\002\202\323\344\223" - + "\002\267\001\"s/compute/v1/projects/{project}/zone" - + "s/{zone}/instanceGroupManagers/{instance" - + "_group_manager}/updatePerInstanceConfigs" - + ":@instance_group_managers_update_per_ins" - + "tance_configs_req_resource\332Adproject,zon" - + "e,instance_group_manager,instance_group_" - + "managers_update_per_instance_configs_req" - + "_resource\212N\016ZoneOperations\032r\312A\026compute.g" - + "oogleapis.com\322AVhttps://www.googleapis.c" - + "om/auth/compute,https://www.googleapis.c" - + "om/auth/cloud-platform2\360\024\n\016InstanceGroup" - + "s\022\337\002\n\014AddInstances\0229.google.cloud.comput" - + "e.v1.AddInstancesInstanceGroupRequest\032\"." - + "google.cloud.compute.v1.Operation\"\357\001\202\323\344\223" - + "\002\212\001\"X/compute/v1/projects/{project}/zone" - + "s/{zone}/instanceGroups/{instance_group}" - + "/addInstances:.instance_groups_add_insta" - + "nces_request_resource\332AJproject,zone,ins" - + "tance_group,instance_groups_add_instance" - + "s_request_resource\212N\016ZoneOperations\022\320\001\n\016" - + "AggregatedList\022<.google.cloud.compute.v1" - + ".AggregatedListInstanceGroupsRequest\0324.g" - + "oogle.cloud.compute.v1.InstanceGroupAggr" - + "egatedList\"J\202\323\344\223\002:\0228/compute/v1/projects" - + "/{project}/aggregated/instanceGroups\332A\007p" - + "roject\022\346\001\n\006Delete\0223.google.cloud.compute" - + ".v1.DeleteInstanceGroupRequest\032\".google." - + "cloud.compute.v1.Operation\"\202\001\202\323\344\223\002M*K/co" - + "mpute/v1/projects/{project}/zones/{zone}" - + "/instanceGroups/{instance_group}\332A\033proje" - + "ct,zone,instance_group\212N\016ZoneOperations\022" - + "\322\001\n\003Get\0220.google.cloud.compute.v1.GetIns" - + "tanceGroupRequest\032&.google.cloud.compute" - + ".v1.InstanceGroup\"q\202\323\344\223\002M\022K/compute/v1/p" - + "rojects/{project}/zones/{zone}/instanceG" - + "roups/{instance_group}\332A\033project,zone,in" - + "stance_group\022\367\001\n\006Insert\0223.google.cloud.c" - + "ompute.v1.InsertInstanceGroupRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\223\001\202\323\344\223\002" - + "U\":/compute/v1/projects/{project}/zones/" - + "{zone}/instanceGroups:\027instance_group_re" - + "source\332A$project,zone,instance_group_res" - + "ource\212N\016ZoneOperations\022\271\001\n\004List\0222.google" - + ".cloud.compute.v1.ListInstanceGroupsRequ" - + "est\032*.google.cloud.compute.v1.InstanceGr" - + "oupList\"Q\202\323\344\223\002<\022:/compute/v1/projects/{p" - + "roject}/zones/{zone}/instanceGroups\332A\014pr" - + "oject,zone\022\346\002\n\rListInstances\022;.google.cl" - + "oud.compute.v1.ListInstancesInstanceGrou" - + "psRequest\0324.google.cloud.compute.v1.Inst" - + "anceGroupsListInstances\"\341\001\202\323\344\223\002\214\001\"Y/comp" - + "ute/v1/projects/{project}/zones/{zone}/i" - + "nstanceGroups/{instance_group}/listInsta" - + "nces:/instance_groups_list_instances_req" - + "uest_resource\332AKproject,zone,instance_gr" - + "oup,instance_groups_list_instances_reque" - + "st_resource\022\356\002\n\017RemoveInstances\022<.google" - + ".cloud.compute.v1.RemoveInstancesInstanc" + + "oup_manager}/setInstanceTemplate:>instan" + + "ce_group_managers_set_instance_template_" + + "request_resource\332Abproject,zone,instance" + + "_group_manager,instance_group_managers_s" + + "et_instance_template_request_resource\212N\016" + + "ZoneOperations\022\231\003\n\016SetTargetPools\022B.goog" + + "le.cloud.compute.v1.SetTargetPoolsInstan" + + "ceGroupManagerRequest\032\".google.cloud.com" + + "pute.v1.Operation\"\236\002\202\323\344\223\002\246\001\"i/compute/v1" + + "/projects/{project}/zones/{zone}/instanc" + + "eGroupManagers/{instance_group_manager}/" + + "setTargetPools:9instance_group_managers_" + + "set_target_pools_request_resource\332A]proj" + + "ect,zone,instance_group_manager,instance" + + "_group_managers_set_target_pools_request" + + "_resource\212N\016ZoneOperations\022\305\003\n\030UpdatePer" + + "InstanceConfigs\022L.google.cloud.compute.v" + + "1.UpdatePerInstanceConfigsInstanceGroupM" + + "anagerRequest\032\".google.cloud.compute.v1." + + "Operation\"\266\002\202\323\344\223\002\267\001\"s/compute/v1/project" + + "s/{project}/zones/{zone}/instanceGroupMa" + + "nagers/{instance_group_manager}/updatePe" + + "rInstanceConfigs:@instance_group_manager" + + "s_update_per_instance_configs_req_resour" + + "ce\332Adproject,zone,instance_group_manager" + + ",instance_group_managers_update_per_inst" + + "ance_configs_req_resource\212N\016ZoneOperatio" + + "ns\032r\312A\026compute.googleapis.com\322AVhttps://" + + "www.googleapis.com/auth/compute,https://" + + "www.googleapis.com/auth/cloud-platform2\360" + + "\024\n\016InstanceGroups\022\337\002\n\014AddInstances\0229.goo" + + "gle.cloud.compute.v1.AddInstancesInstanc" + "eGroupRequest\032\".google.cloud.compute.v1." - + "Operation\"\370\001\202\323\344\223\002\220\001\"[/compute/v1/project" + + "Operation\"\357\001\202\323\344\223\002\212\001\"X/compute/v1/project" + "s/{project}/zones/{zone}/instanceGroups/" - + "{instance_group}/removeInstances:1instan" - + "ce_groups_remove_instances_request_resou" - + "rce\332AMproject,zone,instance_group,instan" - + "ce_groups_remove_instances_request_resou" - + "rce\212N\016ZoneOperations\022\346\002\n\rSetNamedPorts\022:" - + ".google.cloud.compute.v1.SetNamedPortsIn" - + "stanceGroupRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\364\001\202\323\344\223\002\215\001\"Y/compute/v1/pr" - + "ojects/{project}/zones/{zone}/instanceGr" - + "oups/{instance_group}/setNamedPorts:0ins" - + "tance_groups_set_named_ports_request_res" - + "ource\332ALproject,zone,instance_group,inst" - + "ance_groups_set_named_ports_request_reso" - + "urce\212N\016ZoneOperations\032r\312A\026compute.google" - + "apis.com\322AVhttps://www.googleapis.com/au" - + "th/compute,https://www.googleapis.com/au" - + "th/cloud-platform2\244\020\n\021InstanceTemplates\022" - + "\331\001\n\016AggregatedList\022?.google.cloud.comput" - + "e.v1.AggregatedListInstanceTemplatesRequ" - + "est\0327.google.cloud.compute.v1.InstanceTe" - + "mplateAggregatedList\"M\202\323\344\223\002=\022;/compute/v" - + "1/projects/{project}/aggregated/instance" - + "Templates\332A\007project\022\351\001\n\006Delete\0226.google." - + "cloud.compute.v1.DeleteInstanceTemplateR" + + "{instance_group}/addInstances:.instance_" + + "groups_add_instances_request_resource\332AJ" + + "project,zone,instance_group,instance_gro" + + "ups_add_instances_request_resource\212N\016Zon" + + "eOperations\022\320\001\n\016AggregatedList\022<.google." + + "cloud.compute.v1.AggregatedListInstanceG" + + "roupsRequest\0324.google.cloud.compute.v1.I" + + "nstanceGroupAggregatedList\"J\202\323\344\223\002:\0228/com" + + "pute/v1/projects/{project}/aggregated/in" + + "stanceGroups\332A\007project\022\346\001\n\006Delete\0223.goog" + + "le.cloud.compute.v1.DeleteInstanceGroupR" + "equest\032\".google.cloud.compute.v1.Operati" + "on\"\202\001\202\323\344\223\002M*K/compute/v1/projects/{proje" - + "ct}/global/instanceTemplates/{instance_t" - + "emplate}\332A\031project,instance_template\212N\020G" - + "lobalOperations\022\326\001\n\003Get\0223.google.cloud.c" - + "ompute.v1.GetInstanceTemplateRequest\032).g" - + "oogle.cloud.compute.v1.InstanceTemplate\"" - + "o\202\323\344\223\002M\022K/compute/v1/projects/{project}/" - + "global/instanceTemplates/{instance_templ" - + "ate}\332A\031project,instance_template\022\331\001\n\014Get" - + "IamPolicy\022<.google.cloud.compute.v1.GetI" - + "amPolicyInstanceTemplateRequest\032\037.google" - + ".cloud.compute.v1.Policy\"j\202\323\344\223\002Q\022O/compu" - + "te/v1/projects/{project}/global/instance" - + "Templates/{resource}/getIamPolicy\332A\020proj" - + "ect,resource\022\372\001\n\006Insert\0226.google.cloud.c" - + "ompute.v1.InsertInstanceTemplateRequest\032" - + "\".google.cloud.compute.v1.Operation\"\223\001\202\323" - + "\344\223\002U\"7/compute/v1/projects/{project}/glo" - + "bal/instanceTemplates:\032instance_template" - + "_resource\332A\"project,instance_template_re" - + "source\212N\020GlobalOperations\022\267\001\n\004List\0225.goo" - + "gle.cloud.compute.v1.ListInstanceTemplat" - + "esRequest\032-.google.cloud.compute.v1.Inst" - + "anceTemplateList\"I\202\323\344\223\0029\0227/compute/v1/pr" - + "ojects/{project}/global/instanceTemplate" - + "s\332A\007project\022\241\002\n\014SetIamPolicy\022<.google.cl" - + "oud.compute.v1.SetIamPolicyInstanceTempl" - + "ateRequest\032\037.google.cloud.compute.v1.Pol" - + "icy\"\261\001\202\323\344\223\002u\"O/compute/v1/projects/{proj" - + "ect}/global/instanceTemplates/{resource}" - + "/setIamPolicy:\"global_set_policy_request" - + "_resource\332A3project,resource,global_set_" - + "policy_request_resource\022\302\002\n\022TestIamPermi" - + "ssions\022B.google.cloud.compute.v1.TestIam" - + "PermissionsInstanceTemplateRequest\0320.goo" - + "gle.cloud.compute.v1.TestPermissionsResp" - + "onse\"\265\001\202\323\344\223\002z\"U/compute/v1/projects/{pro" - + "ject}/global/instanceTemplates/{resource" - + "}/testIamPermissions:!test_permissions_r" - + "equest_resource\332A2project,resource,test_" - + "permissions_request_resource\032r\312A\026compute" - + ".googleapis.com\322AVhttps://www.googleapis" - + ".com/auth/compute,https://www.googleapis" - + ".com/auth/cloud-platform2\263d\n\tInstances\022\263" - + "\002\n\017AddAccessConfig\0227.google.cloud.comput" - + "e.v1.AddAccessConfigInstanceRequest\032\".go" - + "ogle.cloud.compute.v1.Operation\"\302\001\202\323\344\223\002j" - + "\"P/compute/v1/projects/{project}/zones/{" - + "zone}/instances/{instance}/addAccessConf" - + "ig:\026access_config_resource\332A>project,zon" - + "e,instance,network_interface,access_conf" - + "ig_resource\212N\016ZoneOperations\022\342\002\n\023AddReso" - + "urcePolicies\022;.google.cloud.compute.v1.A" - + "ddResourcePoliciesInstanceRequest\032\".goog" - + "le.cloud.compute.v1.Operation\"\351\001\202\323\344\223\002\210\001\"" - + "T/compute/v1/projects/{project}/zones/{z" - + "one}/instances/{instance}/addResourcePol" - + "icies:0instances_add_resource_policies_r" - + "equest_resource\332AFproject,zone,instance," - + "instances_add_resource_policies_request_" - + "resource\212N\016ZoneOperations\022\301\001\n\016Aggregated" - + "List\0227.google.cloud.compute.v1.Aggregate" - + "dListInstancesRequest\032/.google.cloud.com" - + "pute.v1.InstanceAggregatedList\"E\202\323\344\223\0025\0223" - + "/compute/v1/projects/{project}/aggregate" - + "d/instances\332A\007project\022\222\002\n\nAttachDisk\0222.g" - + "oogle.cloud.compute.v1.AttachDiskInstanc" - + "eRequest\032\".google.cloud.compute.v1.Opera" - + "tion\"\253\001\202\323\344\223\002e\"K/compute/v1/projects/{pro" - + "ject}/zones/{zone}/instances/{instance}/" - + "attachDisk:\026attached_disk_resource\332A,pro" - + "ject,zone,instance,attached_disk_resourc" - + "e\212N\016ZoneOperations\022\236\002\n\nBulkInsert\0222.goog" - + "le.cloud.compute.v1.BulkInsertInstanceRe" - + "quest\032\".google.cloud.compute.v1.Operatio" - + "n\"\267\001\202\323\344\223\002j\"@/compute/v1/projects/{projec" - + "t}/zones/{zone}/instances/bulkInsert:&bu" - + "lk_insert_instance_resource_resource\332A3p" - + "roject,zone,bulk_insert_instance_resourc" - + "e_resource\212N\016ZoneOperations\022\317\001\n\006Delete\022." - + ".google.cloud.compute.v1.DeleteInstanceR" - + "equest\032\".google.cloud.compute.v1.Operati" - + "on\"q\202\323\344\223\002B*@/compute/v1/projects/{projec" - + "t}/zones/{zone}/instances/{instance}\332A\025p" - + "roject,zone,instance\212N\016ZoneOperations\022\233\002" - + "\n\022DeleteAccessConfig\022:.google.cloud.comp" - + "ute.v1.DeleteAccessConfigInstanceRequest" - + "\032\".google.cloud.compute.v1.Operation\"\244\001\202" - + "\323\344\223\002U\"S/compute/v1/projects/{project}/zo" - + "nes/{zone}/instances/{instance}/deleteAc" - + "cessConfig\332A5project,zone,instance,acces" - + "s_config,network_interface\212N\016ZoneOperati" - + "ons\022\357\001\n\nDetachDisk\0222.google.cloud.comput" - + "e.v1.DetachDiskInstanceRequest\032\".google." - + "cloud.compute.v1.Operation\"\210\001\202\323\344\223\002M\"K/co" + + "ct}/zones/{zone}/instanceGroups/{instanc" + + "e_group}\332A\033project,zone,instance_group\212N" + + "\016ZoneOperations\022\322\001\n\003Get\0220.google.cloud.c" + + "ompute.v1.GetInstanceGroupRequest\032&.goog" + + "le.cloud.compute.v1.InstanceGroup\"q\202\323\344\223\002" + + "M\022K/compute/v1/projects/{project}/zones/" + + "{zone}/instanceGroups/{instance_group}\332A" + + "\033project,zone,instance_group\022\367\001\n\006Insert\022" + + "3.google.cloud.compute.v1.InsertInstance" + + "GroupRequest\032\".google.cloud.compute.v1.O" + + "peration\"\223\001\202\323\344\223\002U\":/compute/v1/projects/" + + "{project}/zones/{zone}/instanceGroups:\027i" + + "nstance_group_resource\332A$project,zone,in" + + "stance_group_resource\212N\016ZoneOperations\022\271" + + "\001\n\004List\0222.google.cloud.compute.v1.ListIn" + + "stanceGroupsRequest\032*.google.cloud.compu" + + "te.v1.InstanceGroupList\"Q\202\323\344\223\002<\022:/comput" + + "e/v1/projects/{project}/zones/{zone}/ins" + + "tanceGroups\332A\014project,zone\022\346\002\n\rListInsta" + + "nces\022;.google.cloud.compute.v1.ListInsta" + + "ncesInstanceGroupsRequest\0324.google.cloud" + + ".compute.v1.InstanceGroupsListInstances\"" + + "\341\001\202\323\344\223\002\214\001\"Y/compute/v1/projects/{project" + + "}/zones/{zone}/instanceGroups/{instance_" + + "group}/listInstances:/instance_groups_li" + + "st_instances_request_resource\332AKproject," + + "zone,instance_group,instance_groups_list" + + "_instances_request_resource\022\356\002\n\017RemoveIn" + + "stances\022<.google.cloud.compute.v1.Remove" + + "InstancesInstanceGroupRequest\032\".google.c" + + "loud.compute.v1.Operation\"\370\001\202\323\344\223\002\220\001\"[/co" + "mpute/v1/projects/{project}/zones/{zone}" - + "/instances/{instance}/detachDisk\332A!proje" - + "ct,zone,instance,device_name\212N\016ZoneOpera" - + "tions\022\267\001\n\003Get\022+.google.cloud.compute.v1." - + "GetInstanceRequest\032!.google.cloud.comput" - + "e.v1.Instance\"`\202\323\344\223\002B\022@/compute/v1/proje" - + "cts/{project}/zones/{zone}/instances/{in" - + "stance}\332A\025project,zone,instance\022\242\002\n\025GetE" - + "ffectiveFirewalls\022=.google.cloud.compute" - + ".v1.GetEffectiveFirewallsInstanceRequest" - + "\032?.google.cloud.compute.v1.InstancesGetE" - + "ffectiveFirewallsResponse\"\210\001\202\323\344\223\002X\022V/com" - + "pute/v1/projects/{project}/zones/{zone}/" - + "instances/{instance}/getEffectiveFirewal" - + "ls\332A\'project,zone,instance,network_inter" - + "face\022\357\001\n\022GetGuestAttributes\022:.google.clo" - + "ud.compute.v1.GetGuestAttributesInstance" - + "Request\032(.google.cloud.compute.v1.GuestA" - + "ttributes\"s\202\323\344\223\002U\022S/compute/v1/projects/" - + "{project}/zones/{zone}/instances/{instan" - + "ce}/getGuestAttributes\332A\025project,zone,in" - + "stance\022\324\001\n\014GetIamPolicy\0224.google.cloud.c" - + "ompute.v1.GetIamPolicyInstanceRequest\032\037." - + "google.cloud.compute.v1.Policy\"m\202\323\344\223\002O\022M" - + "/compute/v1/projects/{project}/zones/{zo" - + "ne}/instances/{resource}/getIamPolicy\332A\025" - + "project,zone,resource\022\330\001\n\rGetScreenshot\022" - + "5.google.cloud.compute.v1.GetScreenshotI" - + "nstanceRequest\032#.google.cloud.compute.v1" - + ".Screenshot\"k\202\323\344\223\002M\022K/compute/v1/project" - + "s/{project}/zones/{zone}/instances/{inst" - + "ance}/screenshot\332A\025project,zone,instance" - + "\022\352\001\n\023GetSerialPortOutput\022;.google.cloud." - + "compute.v1.GetSerialPortOutputInstanceRe" - + "quest\032).google.cloud.compute.v1.SerialPo" - + "rtOutput\"k\202\323\344\223\002M\022K/compute/v1/projects/{" + + "/instanceGroups/{instance_group}/removeI" + + "nstances:1instance_groups_remove_instanc" + + "es_request_resource\332AMproject,zone,insta" + + "nce_group,instance_groups_remove_instanc" + + "es_request_resource\212N\016ZoneOperations\022\346\002\n" + + "\rSetNamedPorts\022:.google.cloud.compute.v1" + + ".SetNamedPortsInstanceGroupRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\364\001\202\323\344\223\002\215\001" + + "\"Y/compute/v1/projects/{project}/zones/{" + + "zone}/instanceGroups/{instance_group}/se" + + "tNamedPorts:0instance_groups_set_named_p" + + "orts_request_resource\332ALproject,zone,ins" + + "tance_group,instance_groups_set_named_po" + + "rts_request_resource\212N\016ZoneOperations\032r\312" + + "A\026compute.googleapis.com\322AVhttps://www.g" + + "oogleapis.com/auth/compute,https://www.g" + + "oogleapis.com/auth/cloud-platform2\244\020\n\021In" + + "stanceTemplates\022\331\001\n\016AggregatedList\022?.goo" + + "gle.cloud.compute.v1.AggregatedListInsta" + + "nceTemplatesRequest\0327.google.cloud.compu" + + "te.v1.InstanceTemplateAggregatedList\"M\202\323" + + "\344\223\002=\022;/compute/v1/projects/{project}/agg" + + "regated/instanceTemplates\332A\007project\022\351\001\n\006" + + "Delete\0226.google.cloud.compute.v1.DeleteI" + + "nstanceTemplateRequest\032\".google.cloud.co" + + "mpute.v1.Operation\"\202\001\202\323\344\223\002M*K/compute/v1" + + "/projects/{project}/global/instanceTempl" + + "ates/{instance_template}\332A\031project,insta" + + "nce_template\212N\020GlobalOperations\022\326\001\n\003Get\022" + + "3.google.cloud.compute.v1.GetInstanceTem" + + "plateRequest\032).google.cloud.compute.v1.I" + + "nstanceTemplate\"o\202\323\344\223\002M\022K/compute/v1/pro" + + "jects/{project}/global/instanceTemplates" + + "/{instance_template}\332A\031project,instance_" + + "template\022\331\001\n\014GetIamPolicy\022<.google.cloud" + + ".compute.v1.GetIamPolicyInstanceTemplate" + + "Request\032\037.google.cloud.compute.v1.Policy" + + "\"j\202\323\344\223\002Q\022O/compute/v1/projects/{project}" + + "/global/instanceTemplates/{resource}/get" + + "IamPolicy\332A\020project,resource\022\372\001\n\006Insert\022" + + "6.google.cloud.compute.v1.InsertInstance" + + "TemplateRequest\032\".google.cloud.compute.v" + + "1.Operation\"\223\001\202\323\344\223\002U\"7/compute/v1/projec" + + "ts/{project}/global/instanceTemplates:\032i" + + "nstance_template_resource\332A\"project,inst" + + "ance_template_resource\212N\020GlobalOperation" + + "s\022\267\001\n\004List\0225.google.cloud.compute.v1.Lis" + + "tInstanceTemplatesRequest\032-.google.cloud" + + ".compute.v1.InstanceTemplateList\"I\202\323\344\223\0029" + + "\0227/compute/v1/projects/{project}/global/" + + "instanceTemplates\332A\007project\022\241\002\n\014SetIamPo" + + "licy\022<.google.cloud.compute.v1.SetIamPol" + + "icyInstanceTemplateRequest\032\037.google.clou" + + "d.compute.v1.Policy\"\261\001\202\323\344\223\002u\"O/compute/v" + + "1/projects/{project}/global/instanceTemp" + + "lates/{resource}/setIamPolicy:\"global_se" + + "t_policy_request_resource\332A3project,reso" + + "urce,global_set_policy_request_resource\022" + + "\302\002\n\022TestIamPermissions\022B.google.cloud.co" + + "mpute.v1.TestIamPermissionsInstanceTempl" + + "ateRequest\0320.google.cloud.compute.v1.Tes" + + "tPermissionsResponse\"\265\001\202\323\344\223\002z\"U/compute/" + + "v1/projects/{project}/global/instanceTem" + + "plates/{resource}/testIamPermissions:!te" + + "st_permissions_request_resource\332A2projec" + + "t,resource,test_permissions_request_reso" + + "urce\032r\312A\026compute.googleapis.com\322AVhttps:" + + "//www.googleapis.com/auth/compute,https:" + + "//www.googleapis.com/auth/cloud-platform" + + "2\263d\n\tInstances\022\263\002\n\017AddAccessConfig\0227.goo" + + "gle.cloud.compute.v1.AddAccessConfigInst" + + "anceRequest\032\".google.cloud.compute.v1.Op" + + "eration\"\302\001\202\323\344\223\002j\"P/compute/v1/projects/{" + "project}/zones/{zone}/instances/{instanc" - + "e}/serialPort\332A\025project,zone,instance\022\223\002" - + "\n\033GetShieldedInstanceIdentity\022C.google.c" - + "loud.compute.v1.GetShieldedInstanceIdent" - + "ityInstanceRequest\0321.google.cloud.comput" - + "e.v1.ShieldedInstanceIdentity\"|\202\323\344\223\002^\022\\/" + + "e}/addAccessConfig:\026access_config_resour" + + "ce\332A>project,zone,instance,network_inter" + + "face,access_config_resource\212N\016ZoneOperat" + + "ions\022\342\002\n\023AddResourcePolicies\022;.google.cl" + + "oud.compute.v1.AddResourcePoliciesInstan" + + "ceRequest\032\".google.cloud.compute.v1.Oper" + + "ation\"\351\001\202\323\344\223\002\210\001\"T/compute/v1/projects/{p" + + "roject}/zones/{zone}/instances/{instance" + + "}/addResourcePolicies:0instances_add_res" + + "ource_policies_request_resource\332AFprojec" + + "t,zone,instance,instances_add_resource_p" + + "olicies_request_resource\212N\016ZoneOperation" + + "s\022\301\001\n\016AggregatedList\0227.google.cloud.comp" + + "ute.v1.AggregatedListInstancesRequest\032/." + + "google.cloud.compute.v1.InstanceAggregat" + + "edList\"E\202\323\344\223\0025\0223/compute/v1/projects/{pr" + + "oject}/aggregated/instances\332A\007project\022\222\002" + + "\n\nAttachDisk\0222.google.cloud.compute.v1.A" + + "ttachDiskInstanceRequest\032\".google.cloud." + + "compute.v1.Operation\"\253\001\202\323\344\223\002e\"K/compute/" + + "v1/projects/{project}/zones/{zone}/insta" + + "nces/{instance}/attachDisk:\026attached_dis" + + "k_resource\332A,project,zone,instance,attac" + + "hed_disk_resource\212N\016ZoneOperations\022\236\002\n\nB" + + "ulkInsert\0222.google.cloud.compute.v1.Bulk" + + "InsertInstanceRequest\032\".google.cloud.com" + + "pute.v1.Operation\"\267\001\202\323\344\223\002j\"@/compute/v1/" + + "projects/{project}/zones/{zone}/instance" + + "s/bulkInsert:&bulk_insert_instance_resou" + + "rce_resource\332A3project,zone,bulk_insert_" + + "instance_resource_resource\212N\016ZoneOperati" + + "ons\022\317\001\n\006Delete\022..google.cloud.compute.v1" + + ".DeleteInstanceRequest\032\".google.cloud.co" + + "mpute.v1.Operation\"q\202\323\344\223\002B*@/compute/v1/" + + "projects/{project}/zones/{zone}/instance" + + "s/{instance}\332A\025project,zone,instance\212N\016Z" + + "oneOperations\022\233\002\n\022DeleteAccessConfig\022:.g" + + "oogle.cloud.compute.v1.DeleteAccessConfi" + + "gInstanceRequest\032\".google.cloud.compute." + + "v1.Operation\"\244\001\202\323\344\223\002U\"S/compute/v1/proje" + + "cts/{project}/zones/{zone}/instances/{in" + + "stance}/deleteAccessConfig\332A5project,zon" + + "e,instance,access_config,network_interfa" + + "ce\212N\016ZoneOperations\022\357\001\n\nDetachDisk\0222.goo" + + "gle.cloud.compute.v1.DetachDiskInstanceR" + + "equest\032\".google.cloud.compute.v1.Operati" + + "on\"\210\001\202\323\344\223\002M\"K/compute/v1/projects/{proje" + + "ct}/zones/{zone}/instances/{instance}/de" + + "tachDisk\332A!project,zone,instance,device_" + + "name\212N\016ZoneOperations\022\267\001\n\003Get\022+.google.c" + + "loud.compute.v1.GetInstanceRequest\032!.goo" + + "gle.cloud.compute.v1.Instance\"`\202\323\344\223\002B\022@/" + "compute/v1/projects/{project}/zones/{zon" - + "e}/instances/{instance}/getShieldedInsta" - + "nceIdentity\332A\025project,zone,instance\022\341\001\n\006" - + "Insert\022..google.cloud.compute.v1.InsertI" - + "nstanceRequest\032\".google.cloud.compute.v1" - + ".Operation\"\202\001\202\323\344\223\002J\"5/compute/v1/project" - + "s/{project}/zones/{zone}/instances:\021inst" - + "ance_resource\332A\036project,zone,instance_re" - + "source\212N\016ZoneOperations\022\252\001\n\004List\022-.googl" - + "e.cloud.compute.v1.ListInstancesRequest\032" - + "%.google.cloud.compute.v1.InstanceList\"L" - + "\202\323\344\223\0027\0225/compute/v1/projects/{project}/z" - + "ones/{zone}/instances\332A\014project,zone\022\343\001\n" - + "\rListReferrers\0226.google.cloud.compute.v1" - + ".ListReferrersInstancesRequest\032..google." - + "cloud.compute.v1.InstanceListReferrers\"j" - + "\202\323\344\223\002L\022J/compute/v1/projects/{project}/z" - + "ones/{zone}/instances/{instance}/referre" - + "rs\332A\025project,zone,instance\022\361\002\n\026RemoveRes" - + "ourcePolicies\022>.google.cloud.compute.v1." - + "RemoveResourcePoliciesInstanceRequest\032\"." - + "google.cloud.compute.v1.Operation\"\362\001\202\323\344\223" - + "\002\216\001\"W/compute/v1/projects/{project}/zone" - + "s/{zone}/instances/{instance}/removeReso" - + "urcePolicies:3instances_remove_resource_" - + "policies_request_resource\332AIproject,zone" - + ",instance,instances_remove_resource_poli" - + "cies_request_resource\212N\016ZoneOperations\022\323" - + "\001\n\005Reset\022-.google.cloud.compute.v1.Reset" - + "InstanceRequest\032\".google.cloud.compute.v" - + "1.Operation\"w\202\323\344\223\002H\"F/compute/v1/project" - + "s/{project}/zones/{zone}/instances/{inst" - + "ance}/reset\332A\025project,zone,instance\212N\016Zo" - + "neOperations\022\326\001\n\006Resume\022..google.cloud.c" - + "ompute.v1.ResumeInstanceRequest\032\".google" - + ".cloud.compute.v1.Operation\"x\202\323\344\223\002I\"G/co" + + "e}/instances/{instance}\332A\025project,zone,i" + + "nstance\022\242\002\n\025GetEffectiveFirewalls\022=.goog" + + "le.cloud.compute.v1.GetEffectiveFirewall" + + "sInstanceRequest\032?.google.cloud.compute." + + "v1.InstancesGetEffectiveFirewallsRespons" + + "e\"\210\001\202\323\344\223\002X\022V/compute/v1/projects/{projec" + + "t}/zones/{zone}/instances/{instance}/get" + + "EffectiveFirewalls\332A\'project,zone,instan" + + "ce,network_interface\022\357\001\n\022GetGuestAttribu" + + "tes\022:.google.cloud.compute.v1.GetGuestAt" + + "tributesInstanceRequest\032(.google.cloud.c" + + "ompute.v1.GuestAttributes\"s\202\323\344\223\002U\022S/comp" + + "ute/v1/projects/{project}/zones/{zone}/i" + + "nstances/{instance}/getGuestAttributes\332A" + + "\025project,zone,instance\022\324\001\n\014GetIamPolicy\022" + + "4.google.cloud.compute.v1.GetIamPolicyIn" + + "stanceRequest\032\037.google.cloud.compute.v1." + + "Policy\"m\202\323\344\223\002O\022M/compute/v1/projects/{pr" + + "oject}/zones/{zone}/instances/{resource}" + + "/getIamPolicy\332A\025project,zone,resource\022\330\001" + + "\n\rGetScreenshot\0225.google.cloud.compute.v" + + "1.GetScreenshotInstanceRequest\032#.google." + + "cloud.compute.v1.Screenshot\"k\202\323\344\223\002M\022K/co" + "mpute/v1/projects/{project}/zones/{zone}" - + "/instances/{instance}/resume\332A\025project,z" - + "one,instance\212N\016ZoneOperations\022\226\002\n\027SendDi" - + "agnosticInterrupt\022?.google.cloud.compute" - + ".v1.SendDiagnosticInterruptInstanceReque" - + "st\032@.google.cloud.compute.v1.SendDiagnos" - + "ticInterruptInstanceResponse\"x\202\323\344\223\002Z\"X/c" - + "ompute/v1/projects/{project}/zones/{zone" - + "}/instances/{instance}/sendDiagnosticInt" - + "errupt\332A\025project,zone,instance\022\204\002\n\025SetDe" - + "letionProtection\022=.google.cloud.compute." - + "v1.SetDeletionProtectionInstanceRequest\032" - + "\".google.cloud.compute.v1.Operation\"\207\001\202\323" - + "\344\223\002X\"V/compute/v1/projects/{project}/zon" - + "es/{zone}/instances/{resource}/setDeleti" - + "onProtection\332A\025project,zone,resource\212N\016Z" - + "oneOperations\022\220\002\n\021SetDiskAutoDelete\0229.go" - + "ogle.cloud.compute.v1.SetDiskAutoDeleteI" - + "nstanceRequest\032\".google.cloud.compute.v1" - + ".Operation\"\233\001\202\323\344\223\002T\"R/compute/v1/project" - + "s/{project}/zones/{zone}/instances/{inst" - + "ance}/setDiskAutoDelete\332A-project,zone,i" - + "nstance,auto_delete,device_name\212N\016ZoneOp" - + "erations\022\230\002\n\014SetIamPolicy\0224.google.cloud" - + ".compute.v1.SetIamPolicyInstanceRequest\032" - + "\037.google.cloud.compute.v1.Policy\"\260\001\202\323\344\223\002" - + "q\"M/compute/v1/projects/{project}/zones/" - + "{zone}/instances/{resource}/setIamPolicy" - + ": zone_set_policy_request_resource\332A6pro" - + "ject,zone,resource,zone_set_policy_reque" - + "st_resource\022\255\002\n\tSetLabels\0221.google.cloud" - + ".compute.v1.SetLabelsInstanceRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\310\001\202\323\344\223\002" - + "s\"J/compute/v1/projects/{project}/zones/" - + "{zone}/instances/{instance}/setLabels:%i" - + "nstances_set_labels_request_resource\332A;p" - + "roject,zone,instance,instances_set_label" - + "s_request_resource\212N\016ZoneOperations\022\342\002\n\023" - + "SetMachineResources\022;.google.cloud.compu" - + "te.v1.SetMachineResourcesInstanceRequest" - + "\032\".google.cloud.compute.v1.Operation\"\351\001\202" - + "\323\344\223\002\210\001\"T/compute/v1/projects/{project}/z" - + "ones/{zone}/instances/{instance}/setMach" - + "ineResources:0instances_set_machine_reso" - + "urces_request_resource\332AFproject,zone,in" - + "stance,instances_set_machine_resources_r" - + "equest_resource\212N\016ZoneOperations\022\310\002\n\016Set" - + "MachineType\0226.google.cloud.compute.v1.Se" - + "tMachineTypeInstanceRequest\032\".google.clo" - + "ud.compute.v1.Operation\"\331\001\202\323\344\223\002~\"O/compu" + + "/instances/{instance}/screenshot\332A\025proje" + + "ct,zone,instance\022\352\001\n\023GetSerialPortOutput" + + "\022;.google.cloud.compute.v1.GetSerialPort" + + "OutputInstanceRequest\032).google.cloud.com" + + "pute.v1.SerialPortOutput\"k\202\323\344\223\002M\022K/compu" + "te/v1/projects/{project}/zones/{zone}/in" - + "stances/{instance}/setMachineType:+insta" - + "nces_set_machine_type_request_resource\332A" - + "Aproject,zone,instance,instances_set_mac" - + "hine_type_request_resource\212N\016ZoneOperati" - + "ons\022\213\002\n\013SetMetadata\0223.google.cloud.compu" - + "te.v1.SetMetadataInstanceRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\242\001\202\323\344\223\002a\"L/" - + "compute/v1/projects/{project}/zones/{zon" - + "e}/instances/{instance}/setMetadata:\021met" - + "adata_resource\332A\'project,zone,instance,m" - + "etadata_resource\212N\016ZoneOperations\022\332\002\n\021Se" - + "tMinCpuPlatform\0229.google.cloud.compute.v" - + "1.SetMinCpuPlatformInstanceRequest\032\".goo" - + "gle.cloud.compute.v1.Operation\"\345\001\202\323\344\223\002\205\001" - + "\"R/compute/v1/projects/{project}/zones/{" - + "zone}/instances/{instance}/setMinCpuPlat" - + "form:/instances_set_min_cpu_platform_req" - + "uest_resource\332AEproject,zone,instance,in" - + "stances_set_min_cpu_platform_request_res" - + "ource\212N\016ZoneOperations\022\243\002\n\007SetName\022/.goo" - + "gle.cloud.compute.v1.SetNameInstanceRequ" + + "stances/{instance}/serialPort\332A\025project," + + "zone,instance\022\223\002\n\033GetShieldedInstanceIde" + + "ntity\022C.google.cloud.compute.v1.GetShiel" + + "dedInstanceIdentityInstanceRequest\0321.goo" + + "gle.cloud.compute.v1.ShieldedInstanceIde" + + "ntity\"|\202\323\344\223\002^\022\\/compute/v1/projects/{pro" + + "ject}/zones/{zone}/instances/{instance}/" + + "getShieldedInstanceIdentity\332A\025project,zo" + + "ne,instance\022\341\001\n\006Insert\022..google.cloud.co" + + "mpute.v1.InsertInstanceRequest\032\".google." + + "cloud.compute.v1.Operation\"\202\001\202\323\344\223\002J\"5/co" + + "mpute/v1/projects/{project}/zones/{zone}" + + "/instances:\021instance_resource\332A\036project," + + "zone,instance_resource\212N\016ZoneOperations\022" + + "\252\001\n\004List\022-.google.cloud.compute.v1.ListI" + + "nstancesRequest\032%.google.cloud.compute.v" + + "1.InstanceList\"L\202\323\344\223\0027\0225/compute/v1/proj" + + "ects/{project}/zones/{zone}/instances\332A\014" + + "project,zone\022\343\001\n\rListReferrers\0226.google." + + "cloud.compute.v1.ListReferrersInstancesR" + + "equest\032..google.cloud.compute.v1.Instanc" + + "eListReferrers\"j\202\323\344\223\002L\022J/compute/v1/proj" + + "ects/{project}/zones/{zone}/instances/{i" + + "nstance}/referrers\332A\025project,zone,instan" + + "ce\022\361\002\n\026RemoveResourcePolicies\022>.google.c" + + "loud.compute.v1.RemoveResourcePoliciesIn" + + "stanceRequest\032\".google.cloud.compute.v1." + + "Operation\"\362\001\202\323\344\223\002\216\001\"W/compute/v1/project" + + "s/{project}/zones/{zone}/instances/{inst" + + "ance}/removeResourcePolicies:3instances_" + + "remove_resource_policies_request_resourc" + + "e\332AIproject,zone,instance,instances_remo" + + "ve_resource_policies_request_resource\212N\016" + + "ZoneOperations\022\323\001\n\005Reset\022-.google.cloud." + + "compute.v1.ResetInstanceRequest\032\".google" + + ".cloud.compute.v1.Operation\"w\202\323\344\223\002H\"F/co" + + "mpute/v1/projects/{project}/zones/{zone}" + + "/instances/{instance}/reset\332A\025project,zo" + + "ne,instance\212N\016ZoneOperations\022\326\001\n\006Resume\022" + + "..google.cloud.compute.v1.ResumeInstance" + + "Request\032\".google.cloud.compute.v1.Operat" + + "ion\"x\202\323\344\223\002I\"G/compute/v1/projects/{proje" + + "ct}/zones/{zone}/instances/{instance}/re" + + "sume\332A\025project,zone,instance\212N\016ZoneOpera" + + "tions\022\226\002\n\027SendDiagnosticInterrupt\022?.goog" + + "le.cloud.compute.v1.SendDiagnosticInterr" + + "uptInstanceRequest\032@.google.cloud.comput" + + "e.v1.SendDiagnosticInterruptInstanceResp" + + "onse\"x\202\323\344\223\002Z\"X/compute/v1/projects/{proj" + + "ect}/zones/{zone}/instances/{instance}/s" + + "endDiagnosticInterrupt\332A\025project,zone,in" + + "stance\022\204\002\n\025SetDeletionProtection\022=.googl" + + "e.cloud.compute.v1.SetDeletionProtection" + + "InstanceRequest\032\".google.cloud.compute.v" + + "1.Operation\"\207\001\202\323\344\223\002X\"V/compute/v1/projec" + + "ts/{project}/zones/{zone}/instances/{res" + + "ource}/setDeletionProtection\332A\025project,z" + + "one,resource\212N\016ZoneOperations\022\220\002\n\021SetDis" + + "kAutoDelete\0229.google.cloud.compute.v1.Se" + + "tDiskAutoDeleteInstanceRequest\032\".google." + + "cloud.compute.v1.Operation\"\233\001\202\323\344\223\002T\"R/co" + + "mpute/v1/projects/{project}/zones/{zone}" + + "/instances/{instance}/setDiskAutoDelete\332" + + "A-project,zone,instance,auto_delete,devi" + + "ce_name\212N\016ZoneOperations\022\230\002\n\014SetIamPolic" + + "y\0224.google.cloud.compute.v1.SetIamPolicy" + + "InstanceRequest\032\037.google.cloud.compute.v" + + "1.Policy\"\260\001\202\323\344\223\002q\"M/compute/v1/projects/" + + "{project}/zones/{zone}/instances/{resour" + + "ce}/setIamPolicy: zone_set_policy_reques" + + "t_resource\332A6project,zone,resource,zone_" + + "set_policy_request_resource\022\255\002\n\tSetLabel" + + "s\0221.google.cloud.compute.v1.SetLabelsIns" + + "tanceRequest\032\".google.cloud.compute.v1.O" + + "peration\"\310\001\202\323\344\223\002s\"J/compute/v1/projects/" + + "{project}/zones/{zone}/instances/{instan" + + "ce}/setLabels:%instances_set_labels_requ" + + "est_resource\332A;project,zone,instance,ins" + + "tances_set_labels_request_resource\212N\016Zon" + + "eOperations\022\342\002\n\023SetMachineResources\022;.go" + + "ogle.cloud.compute.v1.SetMachineResource" + + "sInstanceRequest\032\".google.cloud.compute." + + "v1.Operation\"\351\001\202\323\344\223\002\210\001\"T/compute/v1/proj" + + "ects/{project}/zones/{zone}/instances/{i" + + "nstance}/setMachineResources:0instances_" + + "set_machine_resources_request_resource\332A" + + "Fproject,zone,instance,instances_set_mac" + + "hine_resources_request_resource\212N\016ZoneOp" + + "erations\022\310\002\n\016SetMachineType\0226.google.clo" + + "ud.compute.v1.SetMachineTypeInstanceRequ" + "est\032\".google.cloud.compute.v1.Operation\"" - + "\302\001\202\323\344\223\002o\"H/compute/v1/projects/{project}" - + "/zones/{zone}/instances/{instance}/setNa" - + "me:#instances_set_name_request_resource\332" - + "A9project,zone,instance,instances_set_na" - + "me_request_resource\212N\016ZoneOperations\022\225\002\n" - + "\rSetScheduling\0225.google.cloud.compute.v1" - + ".SetSchedulingInstanceRequest\032\".google.c" - + "loud.compute.v1.Operation\"\250\001\202\323\344\223\002e\"N/com" - + "pute/v1/projects/{project}/zones/{zone}/" - + "instances/{instance}/setScheduling:\023sche" - + "duling_resource\332A)project,zone,instance," - + "scheduling_resource\212N\016ZoneOperations\022\330\002\n" - + "\021SetServiceAccount\0229.google.cloud.comput" - + "e.v1.SetServiceAccountInstanceRequest\032\"." - + "google.cloud.compute.v1.Operation\"\343\001\202\323\344\223" - + "\002\204\001\"R/compute/v1/projects/{project}/zone" - + "s/{zone}/instances/{instance}/setService" - + "Account:.instances_set_service_account_r" - + "equest_resource\332ADproject,zone,instance," - + "instances_set_service_account_request_re" - + "source\212N\016ZoneOperations\022\205\003\n\"SetShieldedI" - + "nstanceIntegrityPolicy\022J.google.cloud.co" - + "mpute.v1.SetShieldedInstanceIntegrityPol" - + "icyInstanceRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\356\001\202\323\344\223\002\222\0012c/compute/v1/pr" + + "\331\001\202\323\344\223\002~\"O/compute/v1/projects/{project}" + + "/zones/{zone}/instances/{instance}/setMa" + + "chineType:+instances_set_machine_type_re" + + "quest_resource\332AAproject,zone,instance,i" + + "nstances_set_machine_type_request_resour" + + "ce\212N\016ZoneOperations\022\213\002\n\013SetMetadata\0223.go" + + "ogle.cloud.compute.v1.SetMetadataInstanc" + + "eRequest\032\".google.cloud.compute.v1.Opera" + + "tion\"\242\001\202\323\344\223\002a\"L/compute/v1/projects/{pro" + + "ject}/zones/{zone}/instances/{instance}/" + + "setMetadata:\021metadata_resource\332A\'project" + + ",zone,instance,metadata_resource\212N\016ZoneO" + + "perations\022\332\002\n\021SetMinCpuPlatform\0229.google" + + ".cloud.compute.v1.SetMinCpuPlatformInsta" + + "nceRequest\032\".google.cloud.compute.v1.Ope" + + "ration\"\345\001\202\323\344\223\002\205\001\"R/compute/v1/projects/{" + + "project}/zones/{zone}/instances/{instanc" + + "e}/setMinCpuPlatform:/instances_set_min_" + + "cpu_platform_request_resource\332AEproject," + + "zone,instance,instances_set_min_cpu_plat" + + "form_request_resource\212N\016ZoneOperations\022\243" + + "\002\n\007SetName\022/.google.cloud.compute.v1.Set" + + "NameInstanceRequest\032\".google.cloud.compu" + + "te.v1.Operation\"\302\001\202\323\344\223\002o\"H/compute/v1/pr" + "ojects/{project}/zones/{zone}/instances/" - + "{instance}/setShieldedInstanceIntegrityP" - + "olicy:+shielded_instance_integrity_polic" - + "y_resource\332AAproject,zone,instance,shiel" - + "ded_instance_integrity_policy_resource\212N" - + "\016ZoneOperations\022\367\001\n\007SetTags\022/.google.clo" - + "ud.compute.v1.SetTagsInstanceRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\226\001\202\323\344\223\002" - + "Y\"H/compute/v1/projects/{project}/zones/" - + "{zone}/instances/{instance}/setTags:\rtag" - + "s_resource\332A#project,zone,instance,tags_" - + "resource\212N\016ZoneOperations\022\215\002\n\030SimulateMa" - + "intenanceEvent\022@.google.cloud.compute.v1" - + ".SimulateMaintenanceEventInstanceRequest" - + "\032\".google.cloud.compute.v1.Operation\"\212\001\202" - + "\323\344\223\002[\"Y/compute/v1/projects/{project}/zo" - + "nes/{zone}/instances/{instance}/simulate" - + "MaintenanceEvent\332A\025project,zone,instance" - + "\212N\016ZoneOperations\022\323\001\n\005Start\022-.google.clo" - + "ud.compute.v1.StartInstanceRequest\032\".goo" - + "gle.cloud.compute.v1.Operation\"w\202\323\344\223\002H\"F" - + "/compute/v1/projects/{project}/zones/{zo" - + "ne}/instances/{instance}/start\332A\025project" - + ",zone,instance\212N\016ZoneOperations\022\363\002\n\026Star" - + "tWithEncryptionKey\022>.google.cloud.comput", - "e.v1.StartWithEncryptionKeyInstanceReque" - + "st\032\".google.cloud.compute.v1.Operation\"\364" - + "\001\202\323\344\223\002\217\001\"W/compute/v1/projects/{project}" - + "/zones/{zone}/instances/{instance}/start" - + "WithEncryptionKey:4instances_start_with_" - + "encryption_key_request_resource\332AJprojec" - + "t,zone,instance,instances_start_with_enc" - + "ryption_key_request_resource\212N\016ZoneOpera" - + "tions\022\320\001\n\004Stop\022,.google.cloud.compute.v1" - + ".StopInstanceRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"v\202\323\344\223\002G\"E/compute/v1/pr" + + "{instance}/setName:#instances_set_name_r" + + "equest_resource\332A9project,zone,instance," + + "instances_set_name_request_resource\212N\016Zo" + + "neOperations\022\225\002\n\rSetScheduling\0225.google." + + "cloud.compute.v1.SetSchedulingInstanceRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"\250\001\202\323\344\223\002e\"N/compute/v1/projects/{projec" + + "t}/zones/{zone}/instances/{instance}/set" + + "Scheduling:\023scheduling_resource\332A)projec" + + "t,zone,instance,scheduling_resource\212N\016Zo" + + "neOperations\022\330\002\n\021SetServiceAccount\0229.goo" + + "gle.cloud.compute.v1.SetServiceAccountIn" + + "stanceRequest\032\".google.cloud.compute.v1." + + "Operation\"\343\001\202\323\344\223\002\204\001\"R/compute/v1/project" + + "s/{project}/zones/{zone}/instances/{inst" + + "ance}/setServiceAccount:.instances_set_s" + + "ervice_account_request_resource\332ADprojec" + + "t,zone,instance,instances_set_service_ac" + + "count_request_resource\212N\016ZoneOperations\022" + + "\205\003\n\"SetShieldedInstanceIntegrityPolicy\022J" + + ".google.cloud.compute.v1.SetShieldedInst" + + "anceIntegrityPolicyInstanceRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\356\001\202\323\344\223\002\222\001" + + "2c/compute/v1/projects/{project}/zones/{" + + "zone}/instances/{instance}/setShieldedIn" + + "stanceIntegrityPolicy:+shielded_instance" + + "_integrity_policy_resource\332AAproject,zon" + + "e,instance,shielded_instance_integrity_p" + + "olicy_resource\212N\016ZoneOperations\022\367\001\n\007SetT" + + "ags\022/.google.cloud.compute.v1.SetTagsIns" + + "tanceRequest\032\".google.cloud.compute.v1.O" + + "peration\"\226\001\202\323\344\223\002Y\"H/compute/v1/projects/" + + "{project}/zones/{zone}/instances/{instan" + + "ce}/setTags:\rtags_resource\332A#project,zon" + + "e,instance,tags_resource\212N\016ZoneOperation" + + "s\022\215\002\n\030SimulateMaintenanceEvent\022@.google." + + "cloud.compute.v1.SimulateMaintenanceEven" + + "tInstanceRequest\032\".google.cloud.compute.", + "v1.Operation\"\212\001\202\323\344\223\002[\"Y/compute/v1/proje" + + "cts/{project}/zones/{zone}/instances/{in" + + "stance}/simulateMaintenanceEvent\332A\025proje" + + "ct,zone,instance\212N\016ZoneOperations\022\323\001\n\005St" + + "art\022-.google.cloud.compute.v1.StartInsta" + + "nceRequest\032\".google.cloud.compute.v1.Ope" + + "ration\"w\202\323\344\223\002H\"F/compute/v1/projects/{pr" + + "oject}/zones/{zone}/instances/{instance}" + + "/start\332A\025project,zone,instance\212N\016ZoneOpe" + + "rations\022\363\002\n\026StartWithEncryptionKey\022>.goo" + + "gle.cloud.compute.v1.StartWithEncryption" + + "KeyInstanceRequest\032\".google.cloud.comput" + + "e.v1.Operation\"\364\001\202\323\344\223\002\217\001\"W/compute/v1/pr" + "ojects/{project}/zones/{zone}/instances/" - + "{instance}/stop\332A\025project,zone,instance\212" - + "N\016ZoneOperations\022\331\001\n\007Suspend\022/.google.cl" - + "oud.compute.v1.SuspendInstanceRequest\032\"." - + "google.cloud.compute.v1.Operation\"y\202\323\344\223\002" - + "J\"H/compute/v1/projects/{project}/zones/" - + "{zone}/instances/{instance}/suspend\332A\025pr" - + "oject,zone,instance\212N\016ZoneOperations\022\275\002\n" - + "\022TestIamPermissions\022:.google.cloud.compu" - + "te.v1.TestIamPermissionsInstanceRequest\032" - + "0.google.cloud.compute.v1.TestPermission" - + "sResponse\"\270\001\202\323\344\223\002x\"S/compute/v1/projects" - + "/{project}/zones/{zone}/instances/{resou" - + "rce}/testIamPermissions:!test_permission" - + "s_request_resource\332A7project,zone,resour" - + "ce,test_permissions_request_resource\022\365\001\n" - + "\006Update\022..google.cloud.compute.v1.Update" - + "InstanceRequest\032\".google.cloud.compute.v" - + "1.Operation\"\226\001\202\323\344\223\002U\032@/compute/v1/projec" - + "ts/{project}/zones/{zone}/instances/{ins" - + "tance}:\021instance_resource\332A\'project,zone" - + ",instance,instance_resource\212N\016ZoneOperat" - + "ions\022\274\002\n\022UpdateAccessConfig\022:.google.clo" - + "ud.compute.v1.UpdateAccessConfigInstance" + + "{instance}/startWithEncryptionKey:4insta" + + "nces_start_with_encryption_key_request_r" + + "esource\332AJproject,zone,instance,instance" + + "s_start_with_encryption_key_request_reso" + + "urce\212N\016ZoneOperations\022\320\001\n\004Stop\022,.google." + + "cloud.compute.v1.StopInstanceRequest\032\".g" + + "oogle.cloud.compute.v1.Operation\"v\202\323\344\223\002G" + + "\"E/compute/v1/projects/{project}/zones/{" + + "zone}/instances/{instance}/stop\332A\025projec" + + "t,zone,instance\212N\016ZoneOperations\022\331\001\n\007Sus" + + "pend\022/.google.cloud.compute.v1.SuspendIn" + + "stanceRequest\032\".google.cloud.compute.v1." + + "Operation\"y\202\323\344\223\002J\"H/compute/v1/projects/" + + "{project}/zones/{zone}/instances/{instan" + + "ce}/suspend\332A\025project,zone,instance\212N\016Zo" + + "neOperations\022\275\002\n\022TestIamPermissions\022:.go" + + "ogle.cloud.compute.v1.TestIamPermissions" + + "InstanceRequest\0320.google.cloud.compute.v" + + "1.TestPermissionsResponse\"\270\001\202\323\344\223\002x\"S/com" + + "pute/v1/projects/{project}/zones/{zone}/" + + "instances/{resource}/testIamPermissions:" + + "!test_permissions_request_resource\332A7pro" + + "ject,zone,resource,test_permissions_requ" + + "est_resource\022\365\001\n\006Update\022..google.cloud.c" + + "ompute.v1.UpdateInstanceRequest\032\".google" + + ".cloud.compute.v1.Operation\"\226\001\202\323\344\223\002U\032@/c" + + "ompute/v1/projects/{project}/zones/{zone" + + "}/instances/{instance}:\021instance_resourc" + + "e\332A\'project,zone,instance,instance_resou" + + "rce\212N\016ZoneOperations\022\274\002\n\022UpdateAccessCon" + + "fig\022:.google.cloud.compute.v1.UpdateAcce" + + "ssConfigInstanceRequest\032\".google.cloud.c" + + "ompute.v1.Operation\"\305\001\202\323\344\223\002m\"S/compute/v" + + "1/projects/{project}/zones/{zone}/instan" + + "ces/{instance}/updateAccessConfig:\026acces" + + "s_config_resource\332A>project,zone,instanc" + + "e,network_interface,access_config_resour" + + "ce\212N\016ZoneOperations\022\257\002\n\023UpdateDisplayDev" + + "ice\022;.google.cloud.compute.v1.UpdateDisp" + + "layDeviceInstanceRequest\032\".google.cloud." + + "compute.v1.Operation\"\266\001\202\323\344\223\002o2T/compute/" + + "v1/projects/{project}/zones/{zone}/insta" + + "nces/{instance}/updateDisplayDevice:\027dis" + + "play_device_resource\332A-project,zone,inst" + + "ance,display_device_resource\212N\016ZoneOpera" + + "tions\022\320\002\n\026UpdateNetworkInterface\022>.googl" + + "e.cloud.compute.v1.UpdateNetworkInterfac" + + "eInstanceRequest\032\".google.cloud.compute." + + "v1.Operation\"\321\001\202\323\344\223\002u2W/compute/v1/proje" + + "cts/{project}/zones/{zone}/instances/{in" + + "stance}/updateNetworkInterface:\032network_" + + "interface_resource\332ABproject,zone,instan" + + "ce,network_interface,network_interface_r" + + "esource\212N\016ZoneOperations\022\337\002\n\034UpdateShiel" + + "dedInstanceConfig\022D.google.cloud.compute" + + ".v1.UpdateShieldedInstanceConfigInstance" + "Request\032\".google.cloud.compute.v1.Operat" - + "ion\"\305\001\202\323\344\223\002m\"S/compute/v1/projects/{proj" - + "ect}/zones/{zone}/instances/{instance}/u" - + "pdateAccessConfig:\026access_config_resourc" - + "e\332A>project,zone,instance,network_interf" - + "ace,access_config_resource\212N\016ZoneOperati" - + "ons\022\257\002\n\023UpdateDisplayDevice\022;.google.clo" - + "ud.compute.v1.UpdateDisplayDeviceInstanc" - + "eRequest\032\".google.cloud.compute.v1.Opera" - + "tion\"\266\001\202\323\344\223\002o2T/compute/v1/projects/{pro" + + "ion\"\324\001\202\323\344\223\002\202\0012]/compute/v1/projects/{pro" + "ject}/zones/{zone}/instances/{instance}/" - + "updateDisplayDevice:\027display_device_reso" - + "urce\332A-project,zone,instance,display_dev" - + "ice_resource\212N\016ZoneOperations\022\320\002\n\026Update" - + "NetworkInterface\022>.google.cloud.compute." - + "v1.UpdateNetworkInterfaceInstanceRequest" - + "\032\".google.cloud.compute.v1.Operation\"\321\001\202" - + "\323\344\223\002u2W/compute/v1/projects/{project}/zo" - + "nes/{zone}/instances/{instance}/updateNe" - + "tworkInterface:\032network_interface_resour" - + "ce\332ABproject,zone,instance,network_inter" - + "face,network_interface_resource\212N\016ZoneOp" - + "erations\022\337\002\n\034UpdateShieldedInstanceConfi" - + "g\022D.google.cloud.compute.v1.UpdateShield" - + "edInstanceConfigInstanceRequest\032\".google" - + ".cloud.compute.v1.Operation\"\324\001\202\323\344\223\002\202\0012]/" - + "compute/v1/projects/{project}/zones/{zon" - + "e}/instances/{instance}/updateShieldedIn" - + "stanceConfig:!shielded_instance_config_r" - + "esource\332A7project,zone,instance,shielded" - + "_instance_config_resource\212N\016ZoneOperatio" - + "ns\032r\312A\026compute.googleapis.com\322AVhttps://" - + "www.googleapis.com/auth/compute,https://" - + "www.googleapis.com/auth/cloud-platform2\302" - + "\020\n\027InterconnectAttachments\022\353\001\n\016Aggregate" - + "dList\022E.google.cloud.compute.v1.Aggregat" - + "edListInterconnectAttachmentsRequest\032=.g" - + "oogle.cloud.compute.v1.InterconnectAttac" - + "hmentAggregatedList\"S\202\323\344\223\002C\022A/compute/v1" - + "/projects/{project}/aggregated/interconn" - + "ectAttachments\332A\007project\022\222\002\n\006Delete\022<.go" - + "ogle.cloud.compute.v1.DeleteInterconnect" - + "AttachmentRequest\032\".google.cloud.compute" - + ".v1.Operation\"\245\001\202\323\344\223\002c*a/compute/v1/proj" - + "ects/{project}/regions/{region}/intercon" - + "nectAttachments/{interconnect_attachment" - + "}\332A&project,region,interconnect_attachme" - + "nt\212N\020RegionOperations\022\206\002\n\003Get\0229.google.c" - + "loud.compute.v1.GetInterconnectAttachmen" - + "tRequest\032/.google.cloud.compute.v1.Inter" - + "connectAttachment\"\222\001\202\323\344\223\002c\022a/compute/v1/" - + "projects/{project}/regions/{region}/inte" - + "rconnectAttachments/{interconnect_attach" - + "ment}\332A&project,region,interconnect_atta" - + "chment\022\243\002\n\006Insert\022<.google.cloud.compute" - + ".v1.InsertInterconnectAttachmentRequest\032" - + "\".google.cloud.compute.v1.Operation\"\266\001\202\323" - + "\344\223\002k\"G/compute/v1/projects/{project}/reg" - + "ions/{region}/interconnectAttachments: i" - + "nterconnect_attachment_resource\332A/projec" - + "t,region,interconnect_attachment_resourc" - + "e\212N\020RegionOperations\022\332\001\n\004List\022;.google.c" - + "loud.compute.v1.ListInterconnectAttachme" - + "ntsRequest\0323.google.cloud.compute.v1.Int" - + "erconnectAttachmentList\"`\202\323\344\223\002I\022G/comput" - + "e/v1/projects/{project}/regions/{region}" - + "/interconnectAttachments\332A\016project,regio" - + "n\022\324\002\n\005Patch\022;.google.cloud.compute.v1.Pa" - + "tchInterconnectAttachmentRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\351\001\202\323\344\223\002\205\0012a" + + "updateShieldedInstanceConfig:!shielded_i" + + "nstance_config_resource\332A7project,zone,i" + + "nstance,shielded_instance_config_resourc" + + "e\212N\016ZoneOperations\032r\312A\026compute.googleapi" + + "s.com\322AVhttps://www.googleapis.com/auth/" + + "compute,https://www.googleapis.com/auth/" + + "cloud-platform2\302\020\n\027InterconnectAttachmen" + + "ts\022\353\001\n\016AggregatedList\022E.google.cloud.com" + + "pute.v1.AggregatedListInterconnectAttach" + + "mentsRequest\032=.google.cloud.compute.v1.I" + + "nterconnectAttachmentAggregatedList\"S\202\323\344" + + "\223\002C\022A/compute/v1/projects/{project}/aggr" + + "egated/interconnectAttachments\332A\007project" + + "\022\222\002\n\006Delete\022<.google.cloud.compute.v1.De" + + "leteInterconnectAttachmentRequest\032\".goog" + + "le.cloud.compute.v1.Operation\"\245\001\202\323\344\223\002c*a" + "/compute/v1/projects/{project}/regions/{" + "region}/interconnectAttachments/{interco" - + "nnect_attachment}: interconnect_attachme" - + "nt_resource\332AGproject,region,interconnec" - + "t_attachment,interconnect_attachment_res" - + "ource\212N\020RegionOperations\022\314\002\n\tSetLabels\022?" - + ".google.cloud.compute.v1.SetLabelsInterc" - + "onnectAttachmentRequest\032\".google.cloud.c" - + "ompute.v1.Operation\"\331\001\202\323\344\223\002\202\001\"\\/compute/" - + "v1/projects/{project}/regions/{region}/i" - + "nterconnectAttachments/{resource}/setLab" - + "els:\"region_set_labels_request_resource\332" - + "A:project,region,resource,region_set_lab" - + "els_request_resource\212N\020RegionOperations\032" - + "r\312A\026compute.googleapis.com\322AVhttps://www" - + ".googleapis.com/auth/compute,https://www" - + ".googleapis.com/auth/cloud-platform2\361\004\n\025" - + "InterconnectLocations\022\352\001\n\003Get\0227.google.c" - + "loud.compute.v1.GetInterconnectLocationR" - + "equest\032-.google.cloud.compute.v1.Interco" - + "nnectLocation\"{\202\323\344\223\002U\022S/compute/v1/proje" - + "cts/{project}/global/interconnectLocatio" - + "ns/{interconnect_location}\332A\035project,int" - + "erconnect_location\022\303\001\n\004List\0229.google.clo" - + "ud.compute.v1.ListInterconnectLocationsR" - + "equest\0321.google.cloud.compute.v1.Interco" - + "nnectLocationList\"M\202\323\344\223\002=\022;/compute/v1/p" - + "rojects/{project}/global/interconnectLoc" - + "ations\332A\007project\032\244\001\312A\026compute.googleapis" - + ".com\322A\207\001https://www.googleapis.com/auth/" - + "compute.readonly,https://www.googleapis." - + "com/auth/compute,https://www.googleapis." - + "com/auth/cloud-platform2\345\r\n\rInterconnect" - + "s\022\326\001\n\006Delete\0222.google.cloud.compute.v1.D" - + "eleteInterconnectRequest\032\".google.cloud." - + "compute.v1.Operation\"t\202\323\344\223\002D*B/compute/v" + + "nnect_attachment}\332A&project,region,inter" + + "connect_attachment\212N\020RegionOperations\022\206\002" + + "\n\003Get\0229.google.cloud.compute.v1.GetInter" + + "connectAttachmentRequest\032/.google.cloud." + + "compute.v1.InterconnectAttachment\"\222\001\202\323\344\223" + + "\002c\022a/compute/v1/projects/{project}/regio" + + "ns/{region}/interconnectAttachments/{int" + + "erconnect_attachment}\332A&project,region,i" + + "nterconnect_attachment\022\243\002\n\006Insert\022<.goog" + + "le.cloud.compute.v1.InsertInterconnectAt" + + "tachmentRequest\032\".google.cloud.compute.v" + + "1.Operation\"\266\001\202\323\344\223\002k\"G/compute/v1/projec" + + "ts/{project}/regions/{region}/interconne" + + "ctAttachments: interconnect_attachment_r" + + "esource\332A/project,region,interconnect_at" + + "tachment_resource\212N\020RegionOperations\022\332\001\n" + + "\004List\022;.google.cloud.compute.v1.ListInte" + + "rconnectAttachmentsRequest\0323.google.clou" + + "d.compute.v1.InterconnectAttachmentList\"" + + "`\202\323\344\223\002I\022G/compute/v1/projects/{project}/" + + "regions/{region}/interconnectAttachments" + + "\332A\016project,region\022\324\002\n\005Patch\022;.google.clo" + + "ud.compute.v1.PatchInterconnectAttachmen" + + "tRequest\032\".google.cloud.compute.v1.Opera" + + "tion\"\351\001\202\323\344\223\002\205\0012a/compute/v1/projects/{pr" + + "oject}/regions/{region}/interconnectAtta" + + "chments/{interconnect_attachment}: inter" + + "connect_attachment_resource\332AGproject,re" + + "gion,interconnect_attachment,interconnec" + + "t_attachment_resource\212N\020RegionOperations" + + "\022\314\002\n\tSetLabels\022?.google.cloud.compute.v1" + + ".SetLabelsInterconnectAttachmentRequest\032" + + "\".google.cloud.compute.v1.Operation\"\331\001\202\323" + + "\344\223\002\202\001\"\\/compute/v1/projects/{project}/re" + + "gions/{region}/interconnectAttachments/{" + + "resource}/setLabels:\"region_set_labels_r" + + "equest_resource\332A:project,region,resourc" + + "e,region_set_labels_request_resource\212N\020R" + + "egionOperations\032r\312A\026compute.googleapis.c" + + "om\322AVhttps://www.googleapis.com/auth/com" + + "pute,https://www.googleapis.com/auth/clo" + + "ud-platform2\361\004\n\025InterconnectLocations\022\352\001" + + "\n\003Get\0227.google.cloud.compute.v1.GetInter" + + "connectLocationRequest\032-.google.cloud.co" + + "mpute.v1.InterconnectLocation\"{\202\323\344\223\002U\022S/" + + "compute/v1/projects/{project}/global/int" + + "erconnectLocations/{interconnect_locatio" + + "n}\332A\035project,interconnect_location\022\303\001\n\004L" + + "ist\0229.google.cloud.compute.v1.ListInterc" + + "onnectLocationsRequest\0321.google.cloud.co" + + "mpute.v1.InterconnectLocationList\"M\202\323\344\223\002" + + "=\022;/compute/v1/projects/{project}/global" + + "/interconnectLocations\332A\007project\032\244\001\312A\026co" + + "mpute.googleapis.com\322A\207\001https://www.goog" + + "leapis.com/auth/compute.readonly,https:/" + + "/www.googleapis.com/auth/compute,https:/" + + "/www.googleapis.com/auth/cloud-platform2" + + "\345\r\n\rInterconnects\022\326\001\n\006Delete\0222.google.cl" + + "oud.compute.v1.DeleteInterconnectRequest" + + "\032\".google.cloud.compute.v1.Operation\"t\202\323" + + "\344\223\002D*B/compute/v1/projects/{project}/glo" + + "bal/interconnects/{interconnect}\332A\024proje" + + "ct,interconnect\212N\020GlobalOperations\022\300\001\n\003G" + + "et\022/.google.cloud.compute.v1.GetIntercon" + + "nectRequest\032%.google.cloud.compute.v1.In" + + "terconnect\"a\202\323\344\223\002D\022B/compute/v1/projects" + + "/{project}/global/interconnects/{interco" + + "nnect}\332A\024project,interconnect\022\374\001\n\016GetDia" + + "gnostics\022:.google.cloud.compute.v1.GetDi" + + "agnosticsInterconnectRequest\032<.google.cl" + + "oud.compute.v1.InterconnectsGetDiagnosti" + + "csResponse\"p\202\323\344\223\002S\022Q/compute/v1/projects" + + "/{project}/global/interconnects/{interco" + + "nnect}/getDiagnostics\332A\024project,intercon" + + "nect\022\350\001\n\006Insert\0222.google.cloud.compute.v" + + "1.InsertInterconnectRequest\032\".google.clo" + + "ud.compute.v1.Operation\"\205\001\202\323\344\223\002L\"3/compu" + + "te/v1/projects/{project}/global/intercon" + + "nects:\025interconnect_resource\332A\035project,i" + + "nterconnect_resource\212N\020GlobalOperations\022" + + "\253\001\n\004List\0221.google.cloud.compute.v1.ListI" + + "nterconnectsRequest\032).google.cloud.compu" + + "te.v1.InterconnectList\"E\202\323\344\223\0025\0223/compute" + + "/v1/projects/{project}/global/interconne" + + "cts\332A\007project\022\202\002\n\005Patch\0221.google.cloud.c" + + "ompute.v1.PatchInterconnectRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\241\001\202\323\344\223\002[2" + + "B/compute/v1/projects/{project}/global/i" + + "nterconnects/{interconnect}:\025interconnec" + + "t_resource\332A*project,interconnect,interc" + + "onnect_resource\212N\020GlobalOperations\022\246\002\n\tS" + + "etLabels\0225.google.cloud.compute.v1.SetLa" + + "belsInterconnectRequest\032\".google.cloud.c" + + "ompute.v1.Operation\"\275\001\202\323\344\223\002n\"H/compute/v" + "1/projects/{project}/global/interconnect" - + "s/{interconnect}\332A\024project,interconnect\212" - + "N\020GlobalOperations\022\300\001\n\003Get\022/.google.clou" - + "d.compute.v1.GetInterconnectRequest\032%.go" - + "ogle.cloud.compute.v1.Interconnect\"a\202\323\344\223" - + "\002D\022B/compute/v1/projects/{project}/globa" - + "l/interconnects/{interconnect}\332A\024project" - + ",interconnect\022\374\001\n\016GetDiagnostics\022:.googl" - + "e.cloud.compute.v1.GetDiagnosticsInterco" - + "nnectRequest\032<.google.cloud.compute.v1.I" - + "nterconnectsGetDiagnosticsResponse\"p\202\323\344\223" - + "\002S\022Q/compute/v1/projects/{project}/globa" - + "l/interconnects/{interconnect}/getDiagno" - + "stics\332A\024project,interconnect\022\350\001\n\006Insert\022" - + "2.google.cloud.compute.v1.InsertIntercon" - + "nectRequest\032\".google.cloud.compute.v1.Op" - + "eration\"\205\001\202\323\344\223\002L\"3/compute/v1/projects/{" - + "project}/global/interconnects:\025interconn" - + "ect_resource\332A\035project,interconnect_reso" - + "urce\212N\020GlobalOperations\022\253\001\n\004List\0221.googl" - + "e.cloud.compute.v1.ListInterconnectsRequ" - + "est\032).google.cloud.compute.v1.Interconne" - + "ctList\"E\202\323\344\223\0025\0223/compute/v1/projects/{pr" - + "oject}/global/interconnects\332A\007project\022\202\002" - + "\n\005Patch\0221.google.cloud.compute.v1.PatchI" - + "nterconnectRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\241\001\202\323\344\223\002[2B/compute/v1/pro" - + "jects/{project}/global/interconnects/{in" - + "terconnect}:\025interconnect_resource\332A*pro" - + "ject,interconnect,interconnect_resource\212" - + "N\020GlobalOperations\022\246\002\n\tSetLabels\0225.googl" - + "e.cloud.compute.v1.SetLabelsInterconnect" - + "Request\032\".google.cloud.compute.v1.Operat" - + "ion\"\275\001\202\323\344\223\002n\"H/compute/v1/projects/{proj" - + "ect}/global/interconnects/{resource}/set" - + "Labels:\"global_set_labels_request_resour" - + "ce\332A3project,resource,global_set_labels_" - + "request_resource\212N\020GlobalOperations\032r\312A\026" - + "compute.googleapis.com\322AVhttps://www.goo" - + "gleapis.com/auth/compute,https://www.goo" - + "gleapis.com/auth/cloud-platform2\260\005\n\014Lice" - + "nseCodes\022\275\001\n\003Get\022..google.cloud.compute." - + "v1.GetLicenseCodeRequest\032$.google.cloud." - + "compute.v1.LicenseCode\"`\202\323\344\223\002C\022A/compute" - + "/v1/projects/{project}/global/licenseCod" - + "es/{license_code}\332A\024project,license_code" - + "\022\270\002\n\022TestIamPermissions\022=.google.cloud.c" - + "ompute.v1.TestIamPermissionsLicenseCodeR" - + "equest\0320.google.cloud.compute.v1.TestPer" - + "missionsResponse\"\260\001\202\323\344\223\002u\"P/compute/v1/p" - + "rojects/{project}/global/licenseCodes/{r" - + "esource}/testIamPermissions:!test_permis" - + "sions_request_resource\332A2project,resourc" - + "e,test_permissions_request_resource\032\244\001\312A" - + "\026compute.googleapis.com\322A\207\001https://www.g" - + "oogleapis.com/auth/compute.readonly,http" - + "s://www.googleapis.com/auth/compute,http" - + "s://www.googleapis.com/auth/cloud-platfo" - + "rm2\372\014\n\010Licenses\022\302\001\n\006Delete\022-.google.clou" - + "d.compute.v1.DeleteLicenseRequest\032\".goog" - + "le.cloud.compute.v1.Operation\"e\202\323\344\223\002:*8/" - + "compute/v1/projects/{project}/global/lic" - + "enses/{license}\332A\017project,license\212N\020Glob" - + "alOperations\022\247\001\n\003Get\022*.google.cloud.comp" - + "ute.v1.GetLicenseRequest\032 .google.cloud." - + "compute.v1.License\"R\202\323\344\223\002:\0228/compute/v1/" - + "projects/{project}/global/licenses/{lice" - + "nse}\332A\017project,license\022\307\001\n\014GetIamPolicy\022" - + "3.google.cloud.compute.v1.GetIamPolicyLi" + + "s/{resource}/setLabels:\"global_set_label" + + "s_request_resource\332A3project,resource,gl" + + "obal_set_labels_request_resource\212N\020Globa" + + "lOperations\032r\312A\026compute.googleapis.com\322A" + + "Vhttps://www.googleapis.com/auth/compute" + + ",https://www.googleapis.com/auth/cloud-p" + + "latform2\260\005\n\014LicenseCodes\022\275\001\n\003Get\022..googl" + + "e.cloud.compute.v1.GetLicenseCodeRequest" + + "\032$.google.cloud.compute.v1.LicenseCode\"`" + + "\202\323\344\223\002C\022A/compute/v1/projects/{project}/g" + + "lobal/licenseCodes/{license_code}\332A\024proj" + + "ect,license_code\022\270\002\n\022TestIamPermissions\022" + + "=.google.cloud.compute.v1.TestIamPermiss" + + "ionsLicenseCodeRequest\0320.google.cloud.co" + + "mpute.v1.TestPermissionsResponse\"\260\001\202\323\344\223\002" + + "u\"P/compute/v1/projects/{project}/global" + + "/licenseCodes/{resource}/testIamPermissi" + + "ons:!test_permissions_request_resource\332A" + + "2project,resource,test_permissions_reque" + + "st_resource\032\244\001\312A\026compute.googleapis.com\322" + + "A\207\001https://www.googleapis.com/auth/compu" + + "te.readonly,https://www.googleapis.com/a" + + "uth/compute,https://www.googleapis.com/a" + + "uth/cloud-platform2\372\014\n\010Licenses\022\302\001\n\006Dele" + + "te\022-.google.cloud.compute.v1.DeleteLicen" + + "seRequest\032\".google.cloud.compute.v1.Oper" + + "ation\"e\202\323\344\223\002:*8/compute/v1/projects/{pro" + + "ject}/global/licenses/{license}\332A\017projec" + + "t,license\212N\020GlobalOperations\022\247\001\n\003Get\022*.g" + + "oogle.cloud.compute.v1.GetLicenseRequest" + + "\032 .google.cloud.compute.v1.License\"R\202\323\344\223" + + "\002:\0228/compute/v1/projects/{project}/globa" + + "l/licenses/{license}\332A\017project,license\022\307" + + "\001\n\014GetIamPolicy\0223.google.cloud.compute.v" + + "1.GetIamPolicyLicenseRequest\032\037.google.cl" + + "oud.compute.v1.Policy\"a\202\323\344\223\002H\022F/compute/" + + "v1/projects/{project}/global/licenses/{r" + + "esource}/getIamPolicy\332A\020project,resource" + + "\022\323\001\n\006Insert\022-.google.cloud.compute.v1.In" + + "sertLicenseRequest\032\".google.cloud.comput" + + "e.v1.Operation\"v\202\323\344\223\002B\"./compute/v1/proj" + + "ects/{project}/global/licenses:\020license_" + + "resource\332A\030project,license_resource\212N\020Gl" + + "obalOperations\022\245\001\n\004List\022,.google.cloud.c" + + "ompute.v1.ListLicensesRequest\032-.google.c" + + "loud.compute.v1.LicensesListResponse\"@\202\323" + + "\344\223\0020\022./compute/v1/projects/{project}/glo" + + "bal/licenses\332A\007project\022\217\002\n\014SetIamPolicy\022" + + "3.google.cloud.compute.v1.SetIamPolicyLi" + "censeRequest\032\037.google.cloud.compute.v1.P" - + "olicy\"a\202\323\344\223\002H\022F/compute/v1/projects/{pro" - + "ject}/global/licenses/{resource}/getIamP" - + "olicy\332A\020project,resource\022\323\001\n\006Insert\022-.go" - + "ogle.cloud.compute.v1.InsertLicenseReque" - + "st\032\".google.cloud.compute.v1.Operation\"v" - + "\202\323\344\223\002B\"./compute/v1/projects/{project}/g" - + "lobal/licenses:\020license_resource\332A\030proje" - + "ct,license_resource\212N\020GlobalOperations\022\245" - + "\001\n\004List\022,.google.cloud.compute.v1.ListLi" - + "censesRequest\032-.google.cloud.compute.v1." - + "LicensesListResponse\"@\202\323\344\223\0020\022./compute/v" - + "1/projects/{project}/global/licenses\332A\007p" - + "roject\022\217\002\n\014SetIamPolicy\0223.google.cloud.c" - + "ompute.v1.SetIamPolicyLicenseRequest\032\037.g" - + "oogle.cloud.compute.v1.Policy\"\250\001\202\323\344\223\002l\"F" - + "/compute/v1/projects/{project}/global/li" - + "censes/{resource}/setIamPolicy:\"global_s" - + "et_policy_request_resource\332A3project,res" - + "ource,global_set_policy_request_resource" - + "\022\260\002\n\022TestIamPermissions\0229.google.cloud.c" - + "ompute.v1.TestIamPermissionsLicenseReque" - + "st\0320.google.cloud.compute.v1.TestPermiss" - + "ionsResponse\"\254\001\202\323\344\223\002q\"L/compute/v1/proje" - + "cts/{project}/global/licenses/{resource}" - + "/testIamPermissions:!test_permissions_re" - + "quest_resource\332A2project,resource,test_p" - + "ermissions_request_resource\032r\312A\026compute." - + "googleapis.com\322AVhttps://www.googleapis." - + "com/auth/compute,https://www.googleapis." - + "com/auth/cloud-platform2\353\r\n\rMachineImage" - + "s\022\330\001\n\006Delete\0222.google.cloud.compute.v1.D" - + "eleteMachineImageRequest\032\".google.cloud." - + "compute.v1.Operation\"v\202\323\344\223\002E*C/compute/v" - + "1/projects/{project}/global/machineImage" - + "s/{machine_image}\332A\025project,machine_imag" - + "e\212N\020GlobalOperations\022\302\001\n\003Get\022/.google.cl" - + "oud.compute.v1.GetMachineImageRequest\032%." - + "google.cloud.compute.v1.MachineImage\"c\202\323" - + "\344\223\002E\022C/compute/v1/projects/{project}/glo" + + "olicy\"\250\001\202\323\344\223\002l\"F/compute/v1/projects/{pr" + + "oject}/global/licenses/{resource}/setIam" + + "Policy:\"global_set_policy_request_resour" + + "ce\332A3project,resource,global_set_policy_" + + "request_resource\022\260\002\n\022TestIamPermissions\022" + + "9.google.cloud.compute.v1.TestIamPermiss" + + "ionsLicenseRequest\0320.google.cloud.comput" + + "e.v1.TestPermissionsResponse\"\254\001\202\323\344\223\002q\"L/" + + "compute/v1/projects/{project}/global/lic" + + "enses/{resource}/testIamPermissions:!tes" + + "t_permissions_request_resource\332A2project" + + ",resource,test_permissions_request_resou" + + "rce\032r\312A\026compute.googleapis.com\322AVhttps:/" + + "/www.googleapis.com/auth/compute,https:/" + + "/www.googleapis.com/auth/cloud-platform2" + + "\353\r\n\rMachineImages\022\330\001\n\006Delete\0222.google.cl" + + "oud.compute.v1.DeleteMachineImageRequest" + + "\032\".google.cloud.compute.v1.Operation\"v\202\323" + + "\344\223\002E*C/compute/v1/projects/{project}/glo" + "bal/machineImages/{machine_image}\332A\025proj" - + "ect,machine_image\022\321\001\n\014GetIamPolicy\0228.goo" - + "gle.cloud.compute.v1.GetIamPolicyMachine" - + "ImageRequest\032\037.google.cloud.compute.v1.P" - + "olicy\"f\202\323\344\223\002M\022K/compute/v1/projects/{pro" - + "ject}/global/machineImages/{resource}/ge" - + "tIamPolicy\332A\020project,resource\022\352\001\n\006Insert" - + "\0222.google.cloud.compute.v1.InsertMachine" - + "ImageRequest\032\".google.cloud.compute.v1.O" - + "peration\"\207\001\202\323\344\223\002M\"3/compute/v1/projects/" - + "{project}/global/machineImages:\026machine_" - + "image_resource\332A\036project,machine_image_r" - + "esource\212N\020GlobalOperations\022\253\001\n\004List\0221.go" - + "ogle.cloud.compute.v1.ListMachineImagesR" - + "equest\032).google.cloud.compute.v1.Machine" - + "ImageList\"E\202\323\344\223\0025\0223/compute/v1/projects/" - + "{project}/global/machineImages\332A\007project" - + "\022\231\002\n\014SetIamPolicy\0228.google.cloud.compute" - + ".v1.SetIamPolicyMachineImageRequest\032\037.go" - + "ogle.cloud.compute.v1.Policy\"\255\001\202\323\344\223\002q\"K/" - + "compute/v1/projects/{project}/global/mac" - + "hineImages/{resource}/setIamPolicy:\"glob" - + "al_set_policy_request_resource\332A3project" - + ",resource,global_set_policy_request_reso" - + "urce\022\272\002\n\022TestIamPermissions\022>.google.clo" - + "ud.compute.v1.TestIamPermissionsMachineI" - + "mageRequest\0320.google.cloud.compute.v1.Te" - + "stPermissionsResponse\"\261\001\202\323\344\223\002v\"Q/compute" - + "/v1/projects/{project}/global/machineIma" - + "ges/{resource}/testIamPermissions:!test_" - + "permissions_request_resource\332A2project,r" - + "esource,test_permissions_request_resourc" - + "e\032r\312A\026compute.googleapis.com\322AVhttps://w" - + "ww.googleapis.com/auth/compute,https://w" - + "ww.googleapis.com/auth/cloud-platform2\203\006" - + "\n\014MachineTypes\022\312\001\n\016AggregatedList\022:.goog" - + "le.cloud.compute.v1.AggregatedListMachin" - + "eTypesRequest\0322.google.cloud.compute.v1." - + "MachineTypeAggregatedList\"H\202\323\344\223\0028\0226/comp" - + "ute/v1/projects/{project}/aggregated/mac" - + "hineTypes\332A\007project\022\310\001\n\003Get\022..google.clo" - + "ud.compute.v1.GetMachineTypeRequest\032$.go" - + "ogle.cloud.compute.v1.MachineType\"k\202\323\344\223\002" - + "I\022G/compute/v1/projects/{project}/zones/" - + "{zone}/machineTypes/{machine_type}\332A\031pro" - + "ject,zone,machine_type\022\263\001\n\004List\0220.google" - + ".cloud.compute.v1.ListMachineTypesReques" - + "t\032(.google.cloud.compute.v1.MachineTypeL" - + "ist\"O\202\323\344\223\002:\0228/compute/v1/projects/{proje" - + "ct}/zones/{zone}/machineTypes\332A\014project," - + "zone\032\244\001\312A\026compute.googleapis.com\322A\207\001http" - + "s://www.googleapis.com/auth/compute.read" - + "only,https://www.googleapis.com/auth/com" - + "pute,https://www.googleapis.com/auth/clo" - + "ud-platform2\270\021\n\022NetworkAttachments\022\334\001\n\016A" - + "ggregatedList\022@.google.cloud.compute.v1." - + "AggregatedListNetworkAttachmentsRequest\032" - + "8.google.cloud.compute.v1.NetworkAttachm" - + "entAggregatedList\"N\202\323\344\223\002>\022.google.cloud.compute.v1.TestIamPer" + + "missionsMachineImageRequest\0320.google.clo" + + "ud.compute.v1.TestPermissionsResponse\"\261\001" + + "\202\323\344\223\002v\"Q/compute/v1/projects/{project}/g" + + "lobal/machineImages/{resource}/testIamPe" + + "rmissions:!test_permissions_request_reso" + + "urce\332A2project,resource,test_permissions" + + "_request_resource\032r\312A\026compute.googleapis" + + ".com\322AVhttps://www.googleapis.com/auth/c" + + "ompute,https://www.googleapis.com/auth/c" + + "loud-platform2\203\006\n\014MachineTypes\022\312\001\n\016Aggre" + + "gatedList\022:.google.cloud.compute.v1.Aggr" + + "egatedListMachineTypesRequest\0322.google.c" + + "loud.compute.v1.MachineTypeAggregatedLis" + + "t\"H\202\323\344\223\0028\0226/compute/v1/projects/{project" + + "}/aggregated/machineTypes\332A\007project\022\310\001\n\003" + + "Get\022..google.cloud.compute.v1.GetMachine" + + "TypeRequest\032$.google.cloud.compute.v1.Ma" + + "chineType\"k\202\323\344\223\002I\022G/compute/v1/projects/" + + "{project}/zones/{zone}/machineTypes/{mac" + + "hine_type}\332A\031project,zone,machine_type\022\263" + + "\001\n\004List\0220.google.cloud.compute.v1.ListMa" + + "chineTypesRequest\032(.google.cloud.compute" + + ".v1.MachineTypeList\"O\202\323\344\223\002:\0228/compute/v1" + + "/projects/{project}/zones/{zone}/machine" + + "Types\332A\014project,zone\032\244\001\312A\026compute.google" + + "apis.com\322A\207\001https://www.googleapis.com/a" + + "uth/compute.readonly,https://www.googlea" + + "pis.com/auth/compute,https://www.googlea" + + "pis.com/auth/cloud-platform2\270\021\n\022NetworkA" + + "ttachments\022\334\001\n\016AggregatedList\022@.google.c" + + "loud.compute.v1.AggregatedListNetworkAtt" + + "achmentsRequest\0328.google.cloud.compute.v" + + "1.NetworkAttachmentAggregatedList\"N\202\323\344\223\002" + + ">\022.google.cloud.compute.v1.PatchRuleNetw" - + "orkFirewallPolicyRequest\032\".google.cloud." - + "compute.v1.Operation\"\304\001\202\323\344\223\002s\"R/compute/" - + "v1/projects/{project}/global/firewallPol" - + "icies/{firewall_policy}/patchRule:\035firew" - + "all_policy_rule_resource\332A5project,firew" - + "all_policy,firewall_policy_rule_resource" - + "\212N\020GlobalOperations\022\221\002\n\021RemoveAssociatio" - + "n\022F.google.cloud.compute.v1.RemoveAssoci" - + "ationNetworkFirewallPolicyRequest\032\".goog" - + "le.cloud.compute.v1.Operation\"\217\001\202\323\344\223\002\\\"Z" - + "/compute/v1/projects/{project}/global/fi" - + "rewallPolicies/{firewall_policy}/removeA" - + "ssociation\332A\027project,firewall_policy\212N\020G" - + "lobalOperations\022\374\001\n\nRemoveRule\022?.google." - + "cloud.compute.v1.RemoveRuleNetworkFirewa" - + "llPolicyRequest\032\".google.cloud.compute.v" - + "1.Operation\"\210\001\202\323\344\223\002U\"S/compute/v1/projec" - + "ts/{project}/global/firewallPolicies/{fi" - + "rewall_policy}/removeRule\332A\027project,fire" - + "wall_policy\212N\020GlobalOperations\022\245\002\n\014SetIa" - + "mPolicy\022A.google.cloud.compute.v1.SetIam" - + "PolicyNetworkFirewallPolicyRequest\032\037.goo" - + "gle.cloud.compute.v1.Policy\"\260\001\202\323\344\223\002t\"N/c" - + "ompute/v1/projects/{project}/global/fire" - + "wallPolicies/{resource}/setIamPolicy:\"gl" - + "obal_set_policy_request_resource\332A3proje" - + "ct,resource,global_set_policy_request_re" - + "source\022\306\002\n\022TestIamPermissions\022G.google.c" - + "loud.compute.v1.TestIamPermissionsNetwor" - + "kFirewallPolicyRequest\0320.google.cloud.co" - + "mpute.v1.TestPermissionsResponse\"\264\001\202\323\344\223\002" - + "y\"T/compute/v1/projects/{project}/global" - + "/firewallPolicies/{resource}/testIamPerm" - + "issions:!test_permissions_request_resour" - + "ce\332A2project,resource,test_permissions_r" - + "equest_resource\032r\312A\026compute.googleapis.c" - + "om\322AVhttps://www.googleapis.com/auth/com" - + "pute,https://www.googleapis.com/auth/clo" - + "ud-platform2\267\025\n\010Networks\022\243\002\n\nAddPeering\022" - + "1.google.cloud.compute.v1.AddPeeringNetw" - + "orkRequest\032\".google.cloud.compute.v1.Ope" - + "ration\"\275\001\202\323\344\223\002l\"C/compute/v1/projects/{p" - + "roject}/global/networks/{network}/addPee" - + "ring:%networks_add_peering_request_resou" - + "rce\332A5project,network,networks_add_peeri" - + "ng_request_resource\212N\020GlobalOperations\022\302" - + "\001\n\006Delete\022-.google.cloud.compute.v1.Dele" - + "teNetworkRequest\032\".google.cloud.compute." - + "v1.Operation\"e\202\323\344\223\002:*8/compute/v1/projec" - + "ts/{project}/global/networks/{network}\332A" - + "\017project,network\212N\020GlobalOperations\022\247\001\n\003" - + "Get\022*.google.cloud.compute.v1.GetNetwork" - + "Request\032 .google.cloud.compute.v1.Networ" - + "k\"R\202\323\344\223\002:\0228/compute/v1/projects/{project" - + "}/global/networks/{network}\332A\017project,ne" - + "twork\022\377\001\n\025GetEffectiveFirewalls\022<.google" - + ".cloud.compute.v1.GetEffectiveFirewallsN" - + "etworkRequest\032>.google.cloud.compute.v1." - + "NetworksGetEffectiveFirewallsResponse\"h\202" - + "\323\344\223\002P\022N/compute/v1/projects/{project}/gl" - + "obal/networks/{network}/getEffectiveFire" - + "walls\332A\017project,network\022\323\001\n\006Insert\022-.goo" - + "gle.cloud.compute.v1.InsertNetworkReques" - + "t\032\".google.cloud.compute.v1.Operation\"v\202" - + "\323\344\223\002B\"./compute/v1/projects/{project}/gl" - + "obal/networks:\020network_resource\332A\030projec" - + "t,network_resource\212N\020GlobalOperations\022\234\001" - + "\n\004List\022,.google.cloud.compute.v1.ListNet" - + "worksRequest\032$.google.cloud.compute.v1.N" - + "etworkList\"@\202\323\344\223\0020\022./compute/v1/projects" - + "/{project}/global/networks\332A\007project\022\351\001\n" - + "\021ListPeeringRoutes\0229.google.cloud.comput" - + "e.v1.ListPeeringRoutesNetworksRequest\0323." - + "google.cloud.compute.v1.ExchangedPeering" - + "RoutesList\"d\202\323\344\223\002L\022J/compute/v1/projects" - + "/{project}/global/networks/{network}/lis" - + "tPeeringRoutes\332A\017project,network\022\344\001\n\005Pat" - + "ch\022,.google.cloud.compute.v1.PatchNetwor" - + "kRequest\032\".google.cloud.compute.v1.Opera" - + "tion\"\210\001\202\323\344\223\002L28/compute/v1/projects/{pro" - + "ject}/global/networks/{network}:\020network" - + "_resource\332A project,network,network_reso" - + "urce\212N\020GlobalOperations\022\262\002\n\rRemovePeerin" - + "g\0224.google.cloud.compute.v1.RemovePeerin" - + "gNetworkRequest\032\".google.cloud.compute.v" - + "1.Operation\"\306\001\202\323\344\223\002r\"F/compute/v1/projec" - + "ts/{project}/global/networks/{network}/r" - + "emovePeering:(networks_remove_peering_re" - + "quest_resource\332A8project,network,network" - + "s_remove_peering_request_resource\212N\020Glob" - + "alOperations\022\355\001\n\022SwitchToCustomMode\0229.go" - + "ogle.cloud.compute.v1.SwitchToCustomMode" - + "NetworkRequest\032\".google.cloud.compute.v1" - + ".Operation\"x\202\323\344\223\002M\"K/compute/v1/projects" - + "/{project}/global/networks/{network}/swi" - + "tchToCustomMode\332A\017project,network\212N\020Glob" - + "alOperations\022\262\002\n\rUpdatePeering\0224.google." - + "cloud.compute.v1.UpdatePeeringNetworkReq" - + "uest\032\".google.cloud.compute.v1.Operation" - + "\"\306\001\202\323\344\223\002r2F/compute/v1/projects/{project" - + "}/global/networks/{network}/updatePeerin" - + "g:(networks_update_peering_request_resou" - + "rce\332A8project,network,networks_update_pe" - + "ering_request_resource\212N\020GlobalOperation" - + "s\032r\312A\026compute.googleapis.com\322AVhttps://w" - + "ww.googleapis.com/auth/compute,https://w" - + "ww.googleapis.com/auth/cloud-platform2\373\032" - + "\n\nNodeGroups\022\262\002\n\010AddNodes\0221.google.cloud" - + ".compute.v1.AddNodesNodeGroupRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\316\001\202\323\344\223\002" - + "v\"L/compute/v1/projects/{project}/zones/" - + "{zone}/nodeGroups/{node_group}/addNodes:" - + "&node_groups_add_nodes_request_resource\332" - + "A>project,zone,node_group,node_groups_ad" - + "d_nodes_request_resource\212N\016ZoneOperation" - + "s\022\304\001\n\016AggregatedList\0228.google.cloud.comp" - + "ute.v1.AggregatedListNodeGroupsRequest\0320" - + ".google.cloud.compute.v1.NodeGroupAggreg" - + "atedList\"F\202\323\344\223\0026\0224/compute/v1/projects/{" - + "project}/aggregated/nodeGroups\332A\007project" - + "\022\325\001\n\006Delete\022/.google.cloud.compute.v1.De" - + "leteNodeGroupRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"v\202\323\344\223\002E*C/compute/v1/pr" - + "ojects/{project}/zones/{zone}/nodeGroups" - + "/{node_group}\332A\027project,zone,node_group\212" - + "N\016ZoneOperations\022\301\002\n\013DeleteNodes\0224.googl" - + "e.cloud.compute.v1.DeleteNodesNodeGroupR" - + "equest\032\".google.cloud.compute.v1.Operati" - + "on\"\327\001\202\323\344\223\002|\"O/compute/v1/projects/{proje" - + "ct}/zones/{zone}/nodeGroups/{node_group}" - + "/deleteNodes:)node_groups_delete_nodes_r" - + "equest_resource\332AAproject,zone,node_grou" - + "p,node_groups_delete_nodes_request_resou" - + "rce\212N\016ZoneOperations\022\276\001\n\003Get\022,.google.cl" - + "oud.compute.v1.GetNodeGroupRequest\032\".goo" - + "gle.cloud.compute.v1.NodeGroup\"e\202\323\344\223\002E\022C" - + "/compute/v1/projects/{project}/zones/{zo" - + "ne}/nodeGroups/{node_group}\332A\027project,zo" - + "ne,node_group\022\326\001\n\014GetIamPolicy\0225.google." - + "cloud.compute.v1.GetIamPolicyNodeGroupRe" - + "quest\032\037.google.cloud.compute.v1.Policy\"n" - + "\202\323\344\223\002P\022N/compute/v1/projects/{project}/z" - + "ones/{zone}/nodeGroups/{resource}/getIam" - + "Policy\332A\025project,zone,resource\022\372\001\n\006Inser" - + "t\022/.google.cloud.compute.v1.InsertNodeGr" + + "work_endpoint_group\022\225\002\n\006Insert\022:.google." + + "cloud.compute.v1.InsertNetworkEndpointGr" + "oupRequest\032\".google.cloud.compute.v1.Ope" - + "ration\"\232\001\202\323\344\223\002M\"6/compute/v1/projects/{p" - + "roject}/zones/{zone}/nodeGroups:\023node_gr" - + "oup_resource\332A3project,zone,initial_node" - + "_count,node_group_resource\212N\016ZoneOperati" - + "ons\022\255\001\n\004List\022..google.cloud.compute.v1.L" - + "istNodeGroupsRequest\032&.google.cloud.comp" - + "ute.v1.NodeGroupList\"M\202\323\344\223\0028\0226/compute/v" - + "1/projects/{project}/zones/{zone}/nodeGr" - + "oups\332A\014project,zone\022\337\001\n\tListNodes\0223.goog" - + "le.cloud.compute.v1.ListNodesNodeGroupsR" - + "equest\032,.google.cloud.compute.v1.NodeGro" - + "upsListNodes\"o\202\323\344\223\002O\"M/compute/v1/projec" - + "ts/{project}/zones/{zone}/nodeGroups/{no" - + "de_group}/listNodes\332A\027project,zone,node_" - + "group\022\375\001\n\005Patch\022..google.cloud.compute.v" - + "1.PatchNodeGroupRequest\032\".google.cloud.c" - + "ompute.v1.Operation\"\237\001\202\323\344\223\002Z2C/compute/v" - + "1/projects/{project}/zones/{zone}/nodeGr" - + "oups/{node_group}:\023node_group_resource\332A" - + "+project,zone,node_group,node_group_reso" - + "urce\212N\016ZoneOperations\022\232\002\n\014SetIamPolicy\0225" - + ".google.cloud.compute.v1.SetIamPolicyNod" - + "eGroupRequest\032\037.google.cloud.compute.v1." - + "Policy\"\261\001\202\323\344\223\002r\"N/compute/v1/projects/{p" - + "roject}/zones/{zone}/nodeGroups/{resourc" - + "e}/setIamPolicy: zone_set_policy_request" - + "_resource\332A6project,zone,resource,zone_s" - + "et_policy_request_resource\022\330\002\n\017SetNodeTe" - + "mplate\0228.google.cloud.compute.v1.SetNode" - + "TemplateNodeGroupRequest\032\".google.cloud." - + "compute.v1.Operation\"\346\001\202\323\344\223\002\205\001\"S/compute" - + "/v1/projects/{project}/zones/{zone}/node" - + "Groups/{node_group}/setNodeTemplate:.nod" - + "e_groups_set_node_template_request_resou" - + "rce\332AFproject,zone,node_group,node_group" - + "s_set_node_template_request_resource\212N\016Z" - + "oneOperations\022\277\002\n\022TestIamPermissions\022;.g" - + "oogle.cloud.compute.v1.TestIamPermission" - + "sNodeGroupRequest\0320.google.cloud.compute" - + ".v1.TestPermissionsResponse\"\271\001\202\323\344\223\002y\"T/c" - + "ompute/v1/projects/{project}/zones/{zone" - + "}/nodeGroups/{resource}/testIamPermissio" + + "ration\"\252\001\202\323\344\223\002d\"A/compute/v1/projects/{p" + + "roject}/zones/{zone}/networkEndpointGrou" + + "ps:\037network_endpoint_group_resource\332A,pr" + + "oject,zone,network_endpoint_group_resour" + + "ce\212N\016ZoneOperations\022\316\001\n\004List\0229.google.cl" + + "oud.compute.v1.ListNetworkEndpointGroups" + + "Request\0321.google.cloud.compute.v1.Networ" + + "kEndpointGroupList\"X\202\323\344\223\002C\022A/compute/v1/" + + "projects/{project}/zones/{zone}/networkE" + + "ndpointGroups\332A\014project,zone\022\267\003\n\024ListNet" + + "workEndpoints\022I.google.cloud.compute.v1." + + "ListNetworkEndpointsNetworkEndpointGroup" + + "sRequest\032B.google.cloud.compute.v1.Netwo" + + "rkEndpointGroupsListNetworkEndpoints\"\217\002\202" + + "\323\344\223\002\252\001\"o/compute/v1/projects/{project}/z" + + "ones/{zone}/networkEndpointGroups/{netwo" + + "rk_endpoint_group}/listNetworkEndpoints:" + + "7network_endpoint_groups_list_endpoints_" + + "request_resource\332A[project,zone,network_" + + "endpoint_group,network_endpoint_groups_l" + + "ist_endpoints_request_resource\022\326\002\n\022TestI" + + "amPermissions\022F.google.cloud.compute.v1." + + "TestIamPermissionsNetworkEndpointGroupRe" + + "quest\0320.google.cloud.compute.v1.TestPerm" + + "issionsResponse\"\305\001\202\323\344\223\002\204\001\"_/compute/v1/p" + + "rojects/{project}/zones/{zone}/networkEn" + + "dpointGroups/{resource}/testIamPermissio" + "ns:!test_permissions_request_resource\332A7" + "project,zone,resource,test_permissions_r" + "equest_resource\032r\312A\026compute.googleapis.c" + "om\322AVhttps://www.googleapis.com/auth/com" + "pute,https://www.googleapis.com/auth/clo" - + "ud-platform2\264\020\n\rNodeTemplates\022\315\001\n\016Aggreg" - + "atedList\022;.google.cloud.compute.v1.Aggre" - + "gatedListNodeTemplatesRequest\0323.google.c" - + "loud.compute.v1.NodeTemplateAggregatedLi" - + "st\"I\202\323\344\223\0029\0227/compute/v1/projects/{projec" - + "t}/aggregated/nodeTemplates\332A\007project\022\352\001" - + "\n\006Delete\0222.google.cloud.compute.v1.Delet" - + "eNodeTemplateRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"\207\001\202\323\344\223\002O*M/compute/v1/p" - + "rojects/{project}/regions/{region}/nodeT" - + "emplates/{node_template}\332A\034project,regio" - + "n,node_template\212N\020RegionOperations\022\323\001\n\003G" - + "et\022/.google.cloud.compute.v1.GetNodeTemp" - + "lateRequest\032%.google.cloud.compute.v1.No" - + "deTemplate\"t\202\323\344\223\002O\022M/compute/v1/projects" - + "/{project}/regions/{region}/nodeTemplate" - + "s/{node_template}\332A\034project,region,node_" - + "template\022\342\001\n\014GetIamPolicy\0228.google.cloud" - + ".compute.v1.GetIamPolicyNodeTemplateRequ" - + "est\032\037.google.cloud.compute.v1.Policy\"w\202\323" - + "\344\223\002W\022U/compute/v1/projects/{project}/reg" - + "ions/{region}/nodeTemplates/{resource}/g" - + "etIamPolicy\332A\027project,region,resource\022\373\001" - + "\n\006Insert\0222.google.cloud.compute.v1.Inser" - + "tNodeTemplateRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"\230\001\202\323\344\223\002W\"=/compute/v1/p" - + "rojects/{project}/regions/{region}/nodeT" - + "emplates:\026node_template_resource\332A%proje" - + "ct,region,node_template_resource\212N\020Regio" - + "nOperations\022\274\001\n\004List\0221.google.cloud.comp" - + "ute.v1.ListNodeTemplatesRequest\032).google" - + ".cloud.compute.v1.NodeTemplateList\"V\202\323\344\223" - + "\002?\022=/compute/v1/projects/{project}/regio" - + "ns/{region}/nodeTemplates\332A\016project,regi" - + "on\022\252\002\n\014SetIamPolicy\0228.google.cloud.compu" - + "te.v1.SetIamPolicyNodeTemplateRequest\032\037." - + "google.cloud.compute.v1.Policy\"\276\001\202\323\344\223\002{\"" - + "U/compute/v1/projects/{project}/regions/" - + "{region}/nodeTemplates/{resource}/setIam" - + "Policy:\"region_set_policy_request_resour" - + "ce\332A:project,region,resource,region_set_" - + "policy_request_resource\022\314\002\n\022TestIamPermi" - + "ssions\022>.google.cloud.compute.v1.TestIam" - + "PermissionsNodeTemplateRequest\0320.google." - + "cloud.compute.v1.TestPermissionsResponse" - + "\"\303\001\202\323\344\223\002\200\001\"[/compute/v1/projects/{projec" - + "t}/regions/{region}/nodeTemplates/{resou" + + "ud-platform2\275\"\n\027NetworkFirewallPolicies\022" + + "\323\002\n\016AddAssociation\022C.google.cloud.comput" + + "e.v1.AddAssociationNetworkFirewallPolicy" + + "Request\032\".google.cloud.compute.v1.Operat" + + "ion\"\327\001\202\323\344\223\002\177\"W/compute/v1/projects/{proj" + + "ect}/global/firewallPolicies/{firewall_p" + + "olicy}/addAssociation:$firewall_policy_a" + + "ssociation_resource\332A.google.cloud.compute." + + "v1.PatchRuleNetworkFirewallPolicyRequest" + + "\032\".google.cloud.compute.v1.Operation\"\304\001\202" + + "\323\344\223\002s\"R/compute/v1/projects/{project}/gl" + + "obal/firewallPolicies/{firewall_policy}/" + + "patchRule:\035firewall_policy_rule_resource" + + "\332A5project,firewall_policy,firewall_poli" + + "cy_rule_resource\212N\020GlobalOperations\022\221\002\n\021" + + "RemoveAssociation\022F.google.cloud.compute" + + ".v1.RemoveAssociationNetworkFirewallPoli" + + "cyRequest\032\".google.cloud.compute.v1.Oper" + + "ation\"\217\001\202\323\344\223\002\\\"Z/compute/v1/projects/{pr" + + "oject}/global/firewallPolicies/{firewall" + + "_policy}/removeAssociation\332A\027project,fir" + + "ewall_policy\212N\020GlobalOperations\022\374\001\n\nRemo" + + "veRule\022?.google.cloud.compute.v1.RemoveR" + + "uleNetworkFirewallPolicyRequest\032\".google" + + ".cloud.compute.v1.Operation\"\210\001\202\323\344\223\002U\"S/c" + + "ompute/v1/projects/{project}/global/fire" + + "wallPolicies/{firewall_policy}/removeRul" + + "e\332A\027project,firewall_policy\212N\020GlobalOper" + + "ations\022\245\002\n\014SetIamPolicy\022A.google.cloud.c" + + "ompute.v1.SetIamPolicyNetworkFirewallPol" + + "icyRequest\032\037.google.cloud.compute.v1.Pol" + + "icy\"\260\001\202\323\344\223\002t\"N/compute/v1/projects/{proj" + + "ect}/global/firewallPolicies/{resource}/" + + "setIamPolicy:\"global_set_policy_request_" + + "resource\332A3project,resource,global_set_p" + + "olicy_request_resource\022\306\002\n\022TestIamPermis" + + "sions\022G.google.cloud.compute.v1.TestIamP" + + "ermissionsNetworkFirewallPolicyRequest\0320" + + ".google.cloud.compute.v1.TestPermissions" + + "Response\"\264\001\202\323\344\223\002y\"T/compute/v1/projects/" + + "{project}/global/firewallPolicies/{resou" + "rce}/testIamPermissions:!test_permission" - + "s_request_resource\332A9project,region,reso" - + "urce,test_permissions_request_resource\032r" - + "\312A\026compute.googleapis.com\322AVhttps://www." - + "googleapis.com/auth/compute,https://www." - + "googleapis.com/auth/cloud-platform2\337\005\n\tN" - + "odeTypes\022\301\001\n\016AggregatedList\0227.google.clo" - + "ud.compute.v1.AggregatedListNodeTypesReq" - + "uest\032/.google.cloud.compute.v1.NodeTypeA" - + "ggregatedList\"E\202\323\344\223\0025\0223/compute/v1/proje", - "cts/{project}/aggregated/nodeTypes\332A\007pro" - + "ject\022\271\001\n\003Get\022+.google.cloud.compute.v1.G" - + "etNodeTypeRequest\032!.google.cloud.compute" - + ".v1.NodeType\"b\202\323\344\223\002C\022A/compute/v1/projec" - + "ts/{project}/zones/{zone}/nodeTypes/{nod" - + "e_type}\332A\026project,zone,node_type\022\252\001\n\004Lis" - + "t\022-.google.cloud.compute.v1.ListNodeType" - + "sRequest\032%.google.cloud.compute.v1.NodeT" - + "ypeList\"L\202\323\344\223\0027\0225/compute/v1/projects/{p" - + "roject}/zones/{zone}/nodeTypes\332A\014project" - + ",zone\032\244\001\312A\026compute.googleapis.com\322A\207\001htt" - + "ps://www.googleapis.com/auth/compute.rea" - + "donly,https://www.googleapis.com/auth/co" - + "mpute,https://www.googleapis.com/auth/cl" - + "oud-platform2\220\017\n\020PacketMirrorings\022\326\001\n\016Ag" - + "gregatedList\022>.google.cloud.compute.v1.A" - + "ggregatedListPacketMirroringsRequest\0326.g" - + "oogle.cloud.compute.v1.PacketMirroringAg" - + "gregatedList\"L\202\323\344\223\002<\022:/compute/v1/projec" - + "ts/{project}/aggregated/packetMirrorings" - + "\332A\007project\022\366\001\n\006Delete\0225.google.cloud.com" - + "pute.v1.DeletePacketMirroringRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\220\001\202\323\344\223\002" - + "U*S/compute/v1/projects/{project}/region" - + "s/{region}/packetMirrorings/{packet_mirr" - + "oring}\332A\037project,region,packet_mirroring" - + "\212N\020RegionOperations\022\342\001\n\003Get\0222.google.clo" - + "ud.compute.v1.GetPacketMirroringRequest\032" - + "(.google.cloud.compute.v1.PacketMirrorin" - + "g\"}\202\323\344\223\002U\022S/compute/v1/projects/{project" + + "s_request_resource\332A2project,resource,te" + + "st_permissions_request_resource\032r\312A\026comp" + + "ute.googleapis.com\322AVhttps://www.googlea" + + "pis.com/auth/compute,https://www.googlea" + + "pis.com/auth/cloud-platform2\267\025\n\010Networks" + + "\022\243\002\n\nAddPeering\0221.google.cloud.compute.v" + + "1.AddPeeringNetworkRequest\032\".google.clou" + + "d.compute.v1.Operation\"\275\001\202\323\344\223\002l\"C/comput" + + "e/v1/projects/{project}/global/networks/" + + "{network}/addPeering:%networks_add_peeri" + + "ng_request_resource\332A5project,network,ne" + + "tworks_add_peering_request_resource\212N\020Gl" + + "obalOperations\022\302\001\n\006Delete\022-.google.cloud" + + ".compute.v1.DeleteNetworkRequest\032\".googl" + + "e.cloud.compute.v1.Operation\"e\202\323\344\223\002:*8/c" + + "ompute/v1/projects/{project}/global/netw" + + "orks/{network}\332A\017project,network\212N\020Globa" + + "lOperations\022\247\001\n\003Get\022*.google.cloud.compu" + + "te.v1.GetNetworkRequest\032 .google.cloud.c" + + "ompute.v1.Network\"R\202\323\344\223\002:\0228/compute/v1/p" + + "rojects/{project}/global/networks/{netwo" + + "rk}\332A\017project,network\022\377\001\n\025GetEffectiveFi" + + "rewalls\022<.google.cloud.compute.v1.GetEff" + + "ectiveFirewallsNetworkRequest\032>.google.c" + + "loud.compute.v1.NetworksGetEffectiveFire" + + "wallsResponse\"h\202\323\344\223\002P\022N/compute/v1/proje" + + "cts/{project}/global/networks/{network}/" + + "getEffectiveFirewalls\332A\017project,network\022" + + "\323\001\n\006Insert\022-.google.cloud.compute.v1.Ins" + + "ertNetworkRequest\032\".google.cloud.compute" + + ".v1.Operation\"v\202\323\344\223\002B\"./compute/v1/proje" + + "cts/{project}/global/networks:\020network_r" + + "esource\332A\030project,network_resource\212N\020Glo" + + "balOperations\022\234\001\n\004List\022,.google.cloud.co" + + "mpute.v1.ListNetworksRequest\032$.google.cl" + + "oud.compute.v1.NetworkList\"@\202\323\344\223\0020\022./com" + + "pute/v1/projects/{project}/global/networ" + + "ks\332A\007project\022\351\001\n\021ListPeeringRoutes\0229.goo" + + "gle.cloud.compute.v1.ListPeeringRoutesNe" + + "tworksRequest\0323.google.cloud.compute.v1." + + "ExchangedPeeringRoutesList\"d\202\323\344\223\002L\022J/com" + + "pute/v1/projects/{project}/global/networ" + + "ks/{network}/listPeeringRoutes\332A\017project" + + ",network\022\344\001\n\005Patch\022,.google.cloud.comput" + + "e.v1.PatchNetworkRequest\032\".google.cloud." + + "compute.v1.Operation\"\210\001\202\323\344\223\002L28/compute/" + + "v1/projects/{project}/global/networks/{n" + + "etwork}:\020network_resource\332A project,netw" + + "ork,network_resource\212N\020GlobalOperations\022" + + "\262\002\n\rRemovePeering\0224.google.cloud.compute" + + ".v1.RemovePeeringNetworkRequest\032\".google" + + ".cloud.compute.v1.Operation\"\306\001\202\323\344\223\002r\"F/c" + + "ompute/v1/projects/{project}/global/netw" + + "orks/{network}/removePeering:(networks_r" + + "emove_peering_request_resource\332A8project" + + ",network,networks_remove_peering_request" + + "_resource\212N\020GlobalOperations\022\355\001\n\022SwitchT" + + "oCustomMode\0229.google.cloud.compute.v1.Sw" + + "itchToCustomModeNetworkRequest\032\".google." + + "cloud.compute.v1.Operation\"x\202\323\344\223\002M\"K/com" + + "pute/v1/projects/{project}/global/networ" + + "ks/{network}/switchToCustomMode\332A\017projec" + + "t,network\212N\020GlobalOperations\022\262\002\n\rUpdateP" + + "eering\0224.google.cloud.compute.v1.UpdateP" + + "eeringNetworkRequest\032\".google.cloud.comp" + + "ute.v1.Operation\"\306\001\202\323\344\223\002r2F/compute/v1/p" + + "rojects/{project}/global/networks/{netwo" + + "rk}/updatePeering:(networks_update_peeri" + + "ng_request_resource\332A8project,network,ne" + + "tworks_update_peering_request_resource\212N" + + "\020GlobalOperations\032r\312A\026compute.googleapis" + + ".com\322AVhttps://www.googleapis.com/auth/c" + + "ompute,https://www.googleapis.com/auth/c" + + "loud-platform2\203\036\n\nNodeGroups\022\262\002\n\010AddNode" + + "s\0221.google.cloud.compute.v1.AddNodesNode" + + "GroupRequest\032\".google.cloud.compute.v1.O" + + "peration\"\316\001\202\323\344\223\002v\"L/compute/v1/projects/" + + "{project}/zones/{zone}/nodeGroups/{node_" + + "group}/addNodes:&node_groups_add_nodes_r" + + "equest_resource\332A>project,zone,node_grou" + + "p,node_groups_add_nodes_request_resource" + + "\212N\016ZoneOperations\022\304\001\n\016AggregatedList\0228.g" + + "oogle.cloud.compute.v1.AggregatedListNod" + + "eGroupsRequest\0320.google.cloud.compute.v1" + + ".NodeGroupAggregatedList\"F\202\323\344\223\0026\0224/compu" + + "te/v1/projects/{project}/aggregated/node" + + "Groups\332A\007project\022\325\001\n\006Delete\022/.google.clo" + + "ud.compute.v1.DeleteNodeGroupRequest\032\".g" + + "oogle.cloud.compute.v1.Operation\"v\202\323\344\223\002E" + + "*C/compute/v1/projects/{project}/zones/{" + + "zone}/nodeGroups/{node_group}\332A\027project," + + "zone,node_group\212N\016ZoneOperations\022\301\002\n\013Del" + + "eteNodes\0224.google.cloud.compute.v1.Delet" + + "eNodesNodeGroupRequest\032\".google.cloud.co" + + "mpute.v1.Operation\"\327\001\202\323\344\223\002|\"O/compute/v1" + + "/projects/{project}/zones/{zone}/nodeGro" + + "ups/{node_group}/deleteNodes:)node_group" + + "s_delete_nodes_request_resource\332AAprojec" + + "t,zone,node_group,node_groups_delete_nod" + + "es_request_resource\212N\016ZoneOperations\022\276\001\n" + + "\003Get\022,.google.cloud.compute.v1.GetNodeGr" + + "oupRequest\032\".google.cloud.compute.v1.Nod" + + "eGroup\"e\202\323\344\223\002E\022C/compute/v1/projects/{pr" + + "oject}/zones/{zone}/nodeGroups/{node_gro" + + "up}\332A\027project,zone,node_group\022\326\001\n\014GetIam" + + "Policy\0225.google.cloud.compute.v1.GetIamP" + + "olicyNodeGroupRequest\032\037.google.cloud.com" + + "pute.v1.Policy\"n\202\323\344\223\002P\022N/compute/v1/proj" + + "ects/{project}/zones/{zone}/nodeGroups/{" + + "resource}/getIamPolicy\332A\025project,zone,re" + + "source\022\372\001\n\006Insert\022/.google.cloud.compute" + + ".v1.InsertNodeGroupRequest\032\".google.clou" + + "d.compute.v1.Operation\"\232\001\202\323\344\223\002M\"6/comput" + + "e/v1/projects/{project}/zones/{zone}/nod" + + "eGroups:\023node_group_resource\332A3project,z" + + "one,initial_node_count,node_group_resour" + + "ce\212N\016ZoneOperations\022\255\001\n\004List\022..google.cl" + + "oud.compute.v1.ListNodeGroupsRequest\032&.g" + + "oogle.cloud.compute.v1.NodeGroupList\"M\202\323" + + "\344\223\0028\0226/compute/v1/projects/{project}/zon" + + "es/{zone}/nodeGroups\332A\014project,zone\022\337\001\n\t" + + "ListNodes\0223.google.cloud.compute.v1.List" + + "NodesNodeGroupsRequest\032,.google.cloud.co" + + "mpute.v1.NodeGroupsListNodes\"o\202\323\344\223\002O\"M/c" + + "ompute/v1/projects/{project}/zones/{zone" + + "}/nodeGroups/{node_group}/listNodes\332A\027pr" + + "oject,zone,node_group\022\375\001\n\005Patch\022..google" + + ".cloud.compute.v1.PatchNodeGroupRequest\032" + + "\".google.cloud.compute.v1.Operation\"\237\001\202\323" + + "\344\223\002Z2C/compute/v1/projects/{project}/zon" + + "es/{zone}/nodeGroups/{node_group}:\023node_" + + "group_resource\332A+project,zone,node_group" + + ",node_group_resource\212N\016ZoneOperations\022\232\002" + + "\n\014SetIamPolicy\0225.google.cloud.compute.v1" + + ".SetIamPolicyNodeGroupRequest\032\037.google.c" + + "loud.compute.v1.Policy\"\261\001\202\323\344\223\002r\"N/comput" + + "e/v1/projects/{project}/zones/{zone}/nod" + + "eGroups/{resource}/setIamPolicy: zone_se" + + "t_policy_request_resource\332A6project,zone" + + ",resource,zone_set_policy_request_resour" + + "ce\022\330\002\n\017SetNodeTemplate\0228.google.cloud.co" + + "mpute.v1.SetNodeTemplateNodeGroupRequest" + + "\032\".google.cloud.compute.v1.Operation\"\346\001\202" + + "\323\344\223\002\205\001\"S/compute/v1/projects/{project}/z" + + "ones/{zone}/nodeGroups/{node_group}/setN" + + "odeTemplate:.node_groups_set_node_templa" + + "te_request_resource\332AFproject,zone,node_" + + "group,node_groups_set_node_template_requ" + + "est_resource\212N\016ZoneOperations\022\205\003\n\030Simula" + + "teMaintenanceEvent\022A.google.cloud.comput" + + "e.v1.SimulateMaintenanceEventNodeGroupRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"\201\002\202\323\344\223\002\227\001\"\\/compute/v1/projects/{proje" + + "ct}/zones/{zone}/nodeGroups/{node_group}" + + "/simulateMaintenanceEvent:7node_groups_s" + + "imulate_maintenance_event_request_resour" + + "ce\332AOproject,zone,node_group,node_groups" + + "_simulate_maintenance_event_request_reso" + + "urce\212N\016ZoneOperations\022\277\002\n\022TestIamPermiss" + + "ions\022;.google.cloud.compute.v1.TestIamPe" + + "rmissionsNodeGroupRequest\0320.google.cloud" + + ".compute.v1.TestPermissionsResponse\"\271\001\202\323" + + "\344\223\002y\"T/compute/v1/projects/{project}/zon" + + "es/{zone}/nodeGroups/{resource}/testIamP" + + "ermissions:!test_permissions_request_res" + + "ource\332A7project,zone,resource,test_permi" + + "ssions_request_resource\032r\312A\026compute.goog" + + "leapis.com\322AVhttps://www.googleapis.com/" + + "auth/compute,https://www.googleapis.com/" + + "auth/cloud-platform2\264\020\n\rNodeTemplates\022\315\001" + + "\n\016AggregatedList\022;.google.cloud.compute." + + "v1.AggregatedListNodeTemplatesRequest\0323." + + "google.cloud.compute.v1.NodeTemplateAggr" + + "egatedList\"I\202\323\344\223\0029\0227/compute/v1/projects" + + "/{project}/aggregated/nodeTemplates\332A\007pr" + + "oject\022\352\001\n\006Delete\0222.google.cloud.compute." + + "v1.DeleteNodeTemplateRequest\032\".google.cl" + + "oud.compute.v1.Operation\"\207\001\202\323\344\223\002O*M/comp" + + "ute/v1/projects/{project}/regions/{regio" + + "n}/nodeTemplates/{node_template}\332A\034proje" + + "ct,region,node_template\212N\020RegionOperatio" + + "ns\022\323\001\n\003Get\022/.google.cloud.compute.v1.Get" + + "NodeTemplateRequest\032%.google.cloud.compu" + + "te.v1.NodeTemplate\"t\202\323\344\223\002O\022M/compute/v1/" + + "projects/{project}/regions/{region}/node" + + "Templates/{node_template}\332A\034project,regi" + + "on,node_template\022\342\001\n\014GetIamPolicy\0228.goog" + + "le.cloud.compute.v1.GetIamPolicyNodeTemp" + + "lateRequest\032\037.google.cloud.compute.v1.Po" + + "licy\"w\202\323\344\223\002W\022U/compute/v1/projects/{proj" + + "ect}/regions/{region}/nodeTemplates/{res" + + "ource}/getIamPolicy\332A\027project,region,res" + + "ource\022\373\001\n\006Insert\0222.google.cloud.compute." + + "v1.InsertNodeTemplateRequest\032\".google.cl" + + "oud.compute.v1.Operation\"\230\001\202\323\344\223\002W\"=/comp" + + "ute/v1/projects/{project}/regions/{regio" + + "n}/nodeTemplates:\026node_template_resource" + + "\332A%project,region,node_template_resource" + + "\212N\020RegionOperations\022\274\001\n\004List\0221.google.cl" + + "oud.compute.v1.ListNodeTemplatesRequest\032" + + ").google.cloud.compute.v1.NodeTemplateLi" + + "st\"V\202\323\344\223\002?\022=/compute/v1/projects/{projec" + + "t}/regions/{region}/nodeTemplates\332A\016proj" + + "ect,region\022\252\002\n\014SetIamPolicy\0228.google.clo" + + "ud.compute.v1.SetIamPolicyNodeTemplateRe" + + "quest\032\037.google.cloud.compute.v1.Policy\"\276", + "\001\202\323\344\223\002{\"U/compute/v1/projects/{project}/" + + "regions/{region}/nodeTemplates/{resource" + + "}/setIamPolicy:\"region_set_policy_reques" + + "t_resource\332A:project,region,resource,reg" + + "ion_set_policy_request_resource\022\314\002\n\022Test" + + "IamPermissions\022>.google.cloud.compute.v1" + + ".TestIamPermissionsNodeTemplateRequest\0320" + + ".google.cloud.compute.v1.TestPermissions" + + "Response\"\303\001\202\323\344\223\002\200\001\"[/compute/v1/projects" + + "/{project}/regions/{region}/nodeTemplate" + + "s/{resource}/testIamPermissions:!test_pe" + + "rmissions_request_resource\332A9project,reg" + + "ion,resource,test_permissions_request_re" + + "source\032r\312A\026compute.googleapis.com\322AVhttp" + + "s://www.googleapis.com/auth/compute,http" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rm2\337\005\n\tNodeTypes\022\301\001\n\016AggregatedList\0227.go" + + "ogle.cloud.compute.v1.AggregatedListNode" + + "TypesRequest\032/.google.cloud.compute.v1.N" + + "odeTypeAggregatedList\"E\202\323\344\223\0025\0223/compute/" + + "v1/projects/{project}/aggregated/nodeTyp" + + "es\332A\007project\022\271\001\n\003Get\022+.google.cloud.comp" + + "ute.v1.GetNodeTypeRequest\032!.google.cloud" + + ".compute.v1.NodeType\"b\202\323\344\223\002C\022A/compute/v" + + "1/projects/{project}/zones/{zone}/nodeTy" + + "pes/{node_type}\332A\026project,zone,node_type" + + "\022\252\001\n\004List\022-.google.cloud.compute.v1.List" + + "NodeTypesRequest\032%.google.cloud.compute." + + "v1.NodeTypeList\"L\202\323\344\223\0027\0225/compute/v1/pro" + + "jects/{project}/zones/{zone}/nodeTypes\332A" + + "\014project,zone\032\244\001\312A\026compute.googleapis.co" + + "m\322A\207\001https://www.googleapis.com/auth/com" + + "pute.readonly,https://www.googleapis.com" + + "/auth/compute,https://www.googleapis.com" + + "/auth/cloud-platform2\220\017\n\020PacketMirroring" + + "s\022\326\001\n\016AggregatedList\022>.google.cloud.comp" + + "ute.v1.AggregatedListPacketMirroringsReq" + + "uest\0326.google.cloud.compute.v1.PacketMir" + + "roringAggregatedList\"L\202\323\344\223\002<\022:/compute/v" + + "1/projects/{project}/aggregated/packetMi" + + "rrorings\332A\007project\022\366\001\n\006Delete\0225.google.c" + + "loud.compute.v1.DeletePacketMirroringReq" + + "uest\032\".google.cloud.compute.v1.Operation" + + "\"\220\001\202\323\344\223\002U*S/compute/v1/projects/{project" + "}/regions/{region}/packetMirrorings/{pac" + "ket_mirroring}\332A\037project,region,packet_m" - + "irroring\022\207\002\n\006Insert\0225.google.cloud.compu" - + "te.v1.InsertPacketMirroringRequest\032\".goo" - + "gle.cloud.compute.v1.Operation\"\241\001\202\323\344\223\002]\"" + + "irroring\212N\020RegionOperations\022\342\001\n\003Get\0222.go" + + "ogle.cloud.compute.v1.GetPacketMirroring" + + "Request\032(.google.cloud.compute.v1.Packet" + + "Mirroring\"}\202\323\344\223\002U\022S/compute/v1/projects/" + + "{project}/regions/{region}/packetMirrori" + + "ngs/{packet_mirroring}\332A\037project,region," + + "packet_mirroring\022\207\002\n\006Insert\0225.google.clo" + + "ud.compute.v1.InsertPacketMirroringReque" + + "st\032\".google.cloud.compute.v1.Operation\"\241" + + "\001\202\323\344\223\002]\"@/compute/v1/projects/{project}/" + + "regions/{region}/packetMirrorings:\031packe" + + "t_mirroring_resource\332A(project,region,pa" + + "cket_mirroring_resource\212N\020RegionOperatio" + + "ns\022\305\001\n\004List\0224.google.cloud.compute.v1.Li" + + "stPacketMirroringsRequest\032,.google.cloud" + + ".compute.v1.PacketMirroringList\"Y\202\323\344\223\002B\022" + "@/compute/v1/projects/{project}/regions/" - + "{region}/packetMirrorings:\031packet_mirror" - + "ing_resource\332A(project,region,packet_mir" - + "roring_resource\212N\020RegionOperations\022\305\001\n\004L" - + "ist\0224.google.cloud.compute.v1.ListPacket" - + "MirroringsRequest\032,.google.cloud.compute" - + ".v1.PacketMirroringList\"Y\202\323\344\223\002B\022@/comput" - + "e/v1/projects/{project}/regions/{region}" - + "/packetMirrorings\332A\016project,region\022\251\002\n\005P" - + "atch\0224.google.cloud.compute.v1.PatchPack" - + "etMirroringRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\305\001\202\323\344\223\002p2S/compute/v1/pro" - + "jects/{project}/regions/{region}/packetM" - + "irrorings/{packet_mirroring}:\031packet_mir" - + "roring_resource\332A9project,region,packet_" - + "mirroring,packet_mirroring_resource\212N\020Re" - + "gionOperations\022\322\002\n\022TestIamPermissions\022A." - + "google.cloud.compute.v1.TestIamPermissio" - + "nsPacketMirroringRequest\0320.google.cloud." - + "compute.v1.TestPermissionsResponse\"\306\001\202\323\344" - + "\223\002\203\001\"^/compute/v1/projects/{project}/reg" - + "ions/{region}/packetMirrorings/{resource" - + "}/testIamPermissions:!test_permissions_r" - + "equest_resource\332A9project,region,resourc" - + "e,test_permissions_request_resource\032r\312A\026" - + "compute.googleapis.com\322AVhttps://www.goo" - + "gleapis.com/auth/compute,https://www.goo" - + "gleapis.com/auth/cloud-platform2\200\031\n\010Proj" - + "ects\022\277\001\n\016DisableXpnHost\0225.google.cloud.c" - + "ompute.v1.DisableXpnHostProjectRequest\032\"" - + ".google.cloud.compute.v1.Operation\"R\202\323\344\223" - + "\002/\"-/compute/v1/projects/{project}/disab" - + "leXpnHost\332A\007project\212N\020GlobalOperations\022\253" - + "\002\n\022DisableXpnResource\0229.google.cloud.com" - + "pute.v1.DisableXpnResourceProjectRequest" - + "\032\".google.cloud.compute.v1.Operation\"\265\001\202" - + "\323\344\223\002c\"1/compute/v1/projects/{project}/di" - + "sableXpnResource:.projects_disable_xpn_r" - + "esource_request_resource\332A6project,proje" - + "cts_disable_xpn_resource_request_resourc" - + "e\212N\020GlobalOperations\022\274\001\n\rEnableXpnHost\0224" - + ".google.cloud.compute.v1.EnableXpnHostPr" - + "ojectRequest\032\".google.cloud.compute.v1.O" - + "peration\"Q\202\323\344\223\002.\",/compute/v1/projects/{" - + "project}/enableXpnHost\332A\007project\212N\020Globa" - + "lOperations\022\246\002\n\021EnableXpnResource\0228.goog" - + "le.cloud.compute.v1.EnableXpnResourcePro" - + "jectRequest\032\".google.cloud.compute.v1.Op" - + "eration\"\262\001\202\323\344\223\002a\"0/compute/v1/projects/{" - + "project}/enableXpnResource:-projects_ena" - + "ble_xpn_resource_request_resource\332A5proj" - + "ect,projects_enable_xpn_resource_request" - + "_resource\212N\020GlobalOperations\022\205\001\n\003Get\022*.g" - + "oogle.cloud.compute.v1.GetProjectRequest" - + "\032 .google.cloud.compute.v1.Project\"0\202\323\344\223" - + "\002 \022\036/compute/v1/projects/{project}\332A\007pro" - + "ject\022\236\001\n\nGetXpnHost\0221.google.cloud.compu" - + "te.v1.GetXpnHostProjectRequest\032 .google." - + "cloud.compute.v1.Project\";\202\323\344\223\002+\022)/compu" - + "te/v1/projects/{project}/getXpnHost\332A\007pr" - + "oject\022\276\001\n\017GetXpnResources\0227.google.cloud" - + ".compute.v1.GetXpnResourcesProjectsReque" - + "st\0320.google.cloud.compute.v1.ProjectsGet" - + "XpnResources\"@\202\323\344\223\0020\022./compute/v1/projec" - + "ts/{project}/getXpnResources\332A\007project\022\375" - + "\001\n\014ListXpnHosts\0224.google.cloud.compute.v" - + "1.ListXpnHostsProjectsRequest\032$.google.c" - + "loud.compute.v1.XpnHostList\"\220\001\202\323\344\223\002W\"+/c" - + "ompute/v1/projects/{project}/listXpnHost" - + "s:(projects_list_xpn_hosts_request_resou" - + "rce\332A0project,projects_list_xpn_hosts_re" - + "quest_resource\022\345\001\n\010MoveDisk\022/.google.clo" - + "ud.compute.v1.MoveDiskProjectRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\203\001\202\323\344\223\002" - + "E\"\'/compute/v1/projects/{project}/moveDi" - + "sk:\032disk_move_request_resource\332A\"project" - + ",disk_move_request_resource\212N\020GlobalOper" - + "ations\022\371\001\n\014MoveInstance\0223.google.cloud.c" - + "ompute.v1.MoveInstanceProjectRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\217\001\202\323\344\223\002" - + "M\"+/compute/v1/projects/{project}/moveIn" - + "stance:\036instance_move_request_resource\332A" - + "&project,instance_move_request_resource\212" - + "N\020GlobalOperations\022\206\002\n\031SetCommonInstance" - + "Metadata\022@.google.cloud.compute.v1.SetCo" - + "mmonInstanceMetadataProjectRequest\032\".goo" - + "gle.cloud.compute.v1.Operation\"\202\001\202\323\344\223\002M\"" - + "8/compute/v1/projects/{project}/setCommo" - + "nInstanceMetadata:\021metadata_resource\332A\031p" - + "roject,metadata_resource\212N\020GlobalOperati" - + "ons\022\274\002\n\025SetDefaultNetworkTier\022<.google.c" - + "loud.compute.v1.SetDefaultNetworkTierPro" - + "jectRequest\032\".google.cloud.compute.v1.Op" - + "eration\"\300\001\202\323\344\223\002j\"4/compute/v1/projects/{" - + "project}/setDefaultNetworkTier:2projects" - + "_set_default_network_tier_request_resour" - + "ce\332A:project,projects_set_default_networ" - + "k_tier_request_resource\212N\020GlobalOperatio" - + "ns\022\221\002\n\024SetUsageExportBucket\022;.google.clo" - + "ud.compute.v1.SetUsageExportBucketProjec" - + "tRequest\032\".google.cloud.compute.v1.Opera" - + "tion\"\227\001\202\323\344\223\002U\"3/compute/v1/projects/{pro" - + "ject}/setUsageExportBucket:\036usage_export" - + "_location_resource\332A&project,usage_expor" - + "t_location_resource\212N\020GlobalOperations\032r" - + "\312A\026compute.googleapis.com\322AVhttps://www." - + "googleapis.com/auth/compute,https://www." - + "googleapis.com/auth/cloud-platform2\304\013\n\030P" - + "ublicAdvertisedPrefixes\022\205\002\n\006Delete\022=.goo" - + "gle.cloud.compute.v1.DeletePublicAdverti" - + "sedPrefixeRequest\032\".google.cloud.compute" - + ".v1.Operation\"\227\001\202\323\344\223\002[*Y/compute/v1/proj" - + "ects/{project}/global/publicAdvertisedPr" - + "efixes/{public_advertised_prefix}\332A proj" - + "ect,public_advertised_prefix\212N\020GlobalOpe" - + "rations\022\371\001\n\003Get\022:.google.cloud.compute.v" - + "1.GetPublicAdvertisedPrefixeRequest\032/.go" - + "ogle.cloud.compute.v1.PublicAdvertisedPr" - + "efix\"\204\001\202\323\344\223\002[\022Y/compute/v1/projects/{pro" - + "ject}/global/publicAdvertisedPrefixes/{p" - + "ublic_advertised_prefix}\332A project,publi" - + "c_advertised_prefix\022\226\002\n\006Insert\022=.google." - + "cloud.compute.v1.InsertPublicAdvertisedP" - + "refixeRequest\032\".google.cloud.compute.v1." - + "Operation\"\250\001\202\323\344\223\002c\">/compute/v1/projects" - + "/{project}/global/publicAdvertisedPrefix" - + "es:!public_advertised_prefix_resource\332A)" - + "project,public_advertised_prefix_resourc" - + "e\212N\020GlobalOperations\022\313\001\n\004List\022<.google.c" - + "loud.compute.v1.ListPublicAdvertisedPref" - + "ixesRequest\0323.google.cloud.compute.v1.Pu" - + "blicAdvertisedPrefixList\"P\202\323\344\223\002@\022>/compu" - + "te/v1/projects/{project}/global/publicAd" - + "vertisedPrefixes\332A\007project\022\310\002\n\005Patch\022<.g" - + "oogle.cloud.compute.v1.PatchPublicAdvert" - + "isedPrefixeRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\334\001\202\323\344\223\002~2Y/compute/v1/pro" - + "jects/{project}/global/publicAdvertisedP" - + "refixes/{public_advertised_prefix}:!publ" - + "ic_advertised_prefix_resource\332ABproject," - + "public_advertised_prefix,public_advertis" - + "ed_prefix_resource\212N\020GlobalOperations\032r\312" - + "A\026compute.googleapis.com\322AVhttps://www.g" - + "oogleapis.com/auth/compute,https://www.g" - + "oogleapis.com/auth/cloud-platform2\360\r\n\027Pu" - + "blicDelegatedPrefixes\022\352\001\n\016AggregatedList" - + "\022E.google.cloud.compute.v1.AggregatedLis" - + "tPublicDelegatedPrefixesRequest\032<.google" - + ".cloud.compute.v1.PublicDelegatedPrefixA" - + "ggregatedList\"S\202\323\344\223\002C\022A/compute/v1/proje" - + "cts/{project}/aggregated/publicDelegated" - + "Prefixes\332A\007project\022\222\002\n\006Delete\022<.google.c" - + "loud.compute.v1.DeletePublicDelegatedPre" - + "fixeRequest\032\".google.cloud.compute.v1.Op" - + "eration\"\245\001\202\323\344\223\002c*a/compute/v1/projects/{" - + "project}/regions/{region}/publicDelegate" - + "dPrefixes/{public_delegated_prefix}\332A&pr" - + "oject,region,public_delegated_prefix\212N\020R" - + "egionOperations\022\205\002\n\003Get\0229.google.cloud.c" - + "ompute.v1.GetPublicDelegatedPrefixeReque" - + "st\032..google.cloud.compute.v1.PublicDeleg" - + "atedPrefix\"\222\001\202\323\344\223\002c\022a/compute/v1/project" - + "s/{project}/regions/{region}/publicDeleg" - + "atedPrefixes/{public_delegated_prefix}\332A" - + "&project,region,public_delegated_prefix\022" - + "\243\002\n\006Insert\022<.google.cloud.compute.v1.Ins" - + "ertPublicDelegatedPrefixeRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\266\001\202\323\344\223\002k\"G/" - + "compute/v1/projects/{project}/regions/{r" - + "egion}/publicDelegatedPrefixes: public_d" - + "elegated_prefix_resource\332A/project,regio" - + "n,public_delegated_prefix_resource\212N\020Reg" - + "ionOperations\022\331\001\n\004List\022;.google.cloud.co" - + "mpute.v1.ListPublicDelegatedPrefixesRequ" - + "est\0322.google.cloud.compute.v1.PublicDele" - + "gatedPrefixList\"`\202\323\344\223\002I\022G/compute/v1/pro" - + "jects/{project}/regions/{region}/publicD" - + "elegatedPrefixes\332A\016project,region\022\324\002\n\005Pa" - + "tch\022;.google.cloud.compute.v1.PatchPubli" - + "cDelegatedPrefixeRequest\032\".google.cloud." - + "compute.v1.Operation\"\351\001\202\323\344\223\002\205\0012a/compute" - + "/v1/projects/{project}/regions/{region}/" - + "publicDelegatedPrefixes/{public_delegate" - + "d_prefix}: public_delegated_prefix_resou" - + "rce\332AGproject,region,public_delegated_pr" - + "efix,public_delegated_prefix_resource\212N\020" - + "RegionOperations\032r\312A\026compute.googleapis." - + "com\322AVhttps://www.googleapis.com/auth/co" - + "mpute,https://www.googleapis.com/auth/cl" - + "oud-platform2\360\013\n\021RegionAutoscalers\022\345\001\n\006D" - + "elete\0226.google.cloud.compute.v1.DeleteRe" - + "gionAutoscalerRequest\032\".google.cloud.com" - + "pute.v1.Operation\"\177\202\323\344\223\002J*H/compute/v1/p" - + "rojects/{project}/regions/{region}/autos" - + "calers/{autoscaler}\332A\031project,region,aut" - + "oscaler\212N\020RegionOperations\022\315\001\n\003Get\0223.goo" - + "gle.cloud.compute.v1.GetRegionAutoscaler" - + "Request\032#.google.cloud.compute.v1.Autosc" - + "aler\"l\202\323\344\223\002J\022H/compute/v1/projects/{proj" - + "ect}/regions/{region}/autoscalers/{autos" - + "caler}\332A\031project,region,autoscaler\022\367\001\n\006I" - + "nsert\0226.google.cloud.compute.v1.InsertRe" - + "gionAutoscalerRequest\032\".google.cloud.com" - + "pute.v1.Operation\"\220\001\202\323\344\223\002R\";/compute/v1/" - + "projects/{project}/regions/{region}/auto" - + "scalers:\023autoscaler_resource\332A\"project,r" - + "egion,autoscaler_resource\212N\020RegionOperat" - + "ions\022\302\001\n\004List\0225.google.cloud.compute.v1." - + "ListRegionAutoscalersRequest\032-.google.cl" - + "oud.compute.v1.RegionAutoscalerList\"T\202\323\344" - + "\223\002=\022;/compute/v1/projects/{project}/regi" - + "ons/{region}/autoscalers\332A\016project,regio" - + "n\022\365\001\n\005Patch\0225.google.cloud.compute.v1.Pa" - + "tchRegionAutoscalerRequest\032\".google.clou" - + "d.compute.v1.Operation\"\220\001\202\323\344\223\002R2;/comput" + + "{region}/packetMirrorings\332A\016project,regi" + + "on\022\251\002\n\005Patch\0224.google.cloud.compute.v1.P" + + "atchPacketMirroringRequest\032\".google.clou" + + "d.compute.v1.Operation\"\305\001\202\323\344\223\002p2S/comput" + "e/v1/projects/{project}/regions/{region}" - + "/autoscalers:\023autoscaler_resource\332A\"proj" - + "ect,region,autoscaler_resource\212N\020RegionO" - + "perations\022\367\001\n\006Update\0226.google.cloud.comp" - + "ute.v1.UpdateRegionAutoscalerRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\220\001\202\323\344\223\002" - + "R\032;/compute/v1/projects/{project}/region" - + "s/{region}/autoscalers:\023autoscaler_resou" - + "rce\332A\"project,region,autoscaler_resource" - + "\212N\020RegionOperations\032r\312A\026compute.googleap" - + "is.com\322AVhttps://www.googleapis.com/auth" - + "/compute,https://www.googleapis.com/auth" - + "/cloud-platform2\221\024\n\025RegionBackendService" - + "s\022\370\001\n\006Delete\022:.google.cloud.compute.v1.D" - + "eleteRegionBackendServiceRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\215\001\202\323\344\223\002S*Q/" - + "compute/v1/projects/{project}/regions/{r" - + "egion}/backendServices/{backend_service}" - + "\332A\036project,region,backend_service\212N\020Regi" - + "onOperations\022\343\001\n\003Get\0227.google.cloud.comp" - + "ute.v1.GetRegionBackendServiceRequest\032\'." - + "google.cloud.compute.v1.BackendService\"z" - + "\202\323\344\223\002S\022Q/compute/v1/projects/{project}/r" - + "egions/{region}/backendServices/{backend" - + "_service}\332A\036project,region,backend_servi" - + "ce\022\313\002\n\tGetHealth\022=.google.cloud.compute." - + "v1.GetHealthRegionBackendServiceRequest\032" - + "2.google.cloud.compute.v1.BackendService" - + "GroupHealth\"\312\001\202\323\344\223\002\200\001\"[/compute/v1/proje" - + "cts/{project}/regions/{region}/backendSe" - + "rvices/{backend_service}/getHealth:!reso" - + "urce_group_reference_resource\332A@project," - + "region,backend_service,resource_group_re" - + "ference_resource\022\354\001\n\014GetIamPolicy\022@.goog" - + "le.cloud.compute.v1.GetIamPolicyRegionBa" - + "ckendServiceRequest\032\037.google.cloud.compu" - + "te.v1.Policy\"y\202\323\344\223\002Y\022W/compute/v1/projec" - + "ts/{project}/regions/{region}/backendSer" - + "vices/{resource}/getIamPolicy\332A\027project," - + "region,resource\022\211\002\n\006Insert\022:.google.clou" - + "d.compute.v1.InsertRegionBackendServiceR" + + "/packetMirrorings/{packet_mirroring}:\031pa" + + "cket_mirroring_resource\332A9project,region" + + ",packet_mirroring,packet_mirroring_resou" + + "rce\212N\020RegionOperations\022\322\002\n\022TestIamPermis" + + "sions\022A.google.cloud.compute.v1.TestIamP" + + "ermissionsPacketMirroringRequest\0320.googl" + + "e.cloud.compute.v1.TestPermissionsRespon" + + "se\"\306\001\202\323\344\223\002\203\001\"^/compute/v1/projects/{proj" + + "ect}/regions/{region}/packetMirrorings/{" + + "resource}/testIamPermissions:!test_permi" + + "ssions_request_resource\332A9project,region" + + ",resource,test_permissions_request_resou" + + "rce\032r\312A\026compute.googleapis.com\322AVhttps:/" + + "/www.googleapis.com/auth/compute,https:/" + + "/www.googleapis.com/auth/cloud-platform2" + + "\200\031\n\010Projects\022\277\001\n\016DisableXpnHost\0225.google" + + ".cloud.compute.v1.DisableXpnHostProjectR" + "equest\032\".google.cloud.compute.v1.Operati" - + "on\"\236\001\202\323\344\223\002[\"?/compute/v1/projects/{proje" - + "ct}/regions/{region}/backendServices:\030ba" - + "ckend_service_resource\332A\'project,region," - + "backend_service_resource\212N\020RegionOperati" - + "ons\022\310\001\n\004List\0229.google.cloud.compute.v1.L" - + "istRegionBackendServicesRequest\032+.google" - + ".cloud.compute.v1.BackendServiceList\"X\202\323" - + "\344\223\002A\022?/compute/v1/projects/{project}/reg" - + "ions/{region}/backendServices\332A\016project," - + "region\022\251\002\n\005Patch\0229.google.cloud.compute." - + "v1.PatchRegionBackendServiceRequest\032\".go" - + "ogle.cloud.compute.v1.Operation\"\300\001\202\323\344\223\002m" - + "2Q/compute/v1/projects/{project}/regions" - + "/{region}/backendServices/{backend_servi" - + "ce}:\030backend_service_resource\332A7project," - + "region,backend_service,backend_service_r" - + "esource\212N\020RegionOperations\022\264\002\n\014SetIamPol" - + "icy\022@.google.cloud.compute.v1.SetIamPoli" - + "cyRegionBackendServiceRequest\032\037.google.c" - + "loud.compute.v1.Policy\"\300\001\202\323\344\223\002}\"W/comput" - + "e/v1/projects/{project}/regions/{region}" - + "/backendServices/{resource}/setIamPolicy" - + ":\"region_set_policy_request_resource\332A:p" - + "roject,region,resource,region_set_policy" - + "_request_resource\022\253\002\n\006Update\022:.google.cl" - + "oud.compute.v1.UpdateRegionBackendServic" - + "eRequest\032\".google.cloud.compute.v1.Opera" - + "tion\"\300\001\202\323\344\223\002m\032Q/compute/v1/projects/{pro" - + "ject}/regions/{region}/backendServices/{" - + "backend_service}:\030backend_service_resour" - + "ce\332A7project,region,backend_service,back" - + "end_service_resource\212N\020RegionOperations\032" - + "r\312A\026compute.googleapis.com\322AVhttps://www" - + ".googleapis.com/auth/compute,https://www" - + ".googleapis.com/auth/cloud-platform2\362\t\n\021" - + "RegionCommitments\022\315\001\n\016AggregatedList\022?.g" - + "oogle.cloud.compute.v1.AggregatedListReg" - + "ionCommitmentsRequest\0321.google.cloud.com" - + "pute.v1.CommitmentAggregatedList\"G\202\323\344\223\0027" - + "\0225/compute/v1/projects/{project}/aggrega" - + "ted/commitments\332A\007project\022\315\001\n\003Get\0223.goog" - + "le.cloud.compute.v1.GetRegionCommitmentR" - + "equest\032#.google.cloud.compute.v1.Commitm" - + "ent\"l\202\323\344\223\002J\022H/compute/v1/projects/{proje" - + "ct}/regions/{region}/commitments/{commit" - + "ment}\332A\031project,region,commitment\022\367\001\n\006In" - + "sert\0226.google.cloud.compute.v1.InsertReg" - + "ionCommitmentRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"\220\001\202\323\344\223\002R\";/compute/v1/p" - + "rojects/{project}/regions/{region}/commi" - + "tments:\023commitment_resource\332A\"project,re" - + "gion,commitment_resource\212N\020RegionOperati" - + "ons\022\274\001\n\004List\0225.google.cloud.compute.v1.L" - + "istRegionCommitmentsRequest\032\'.google.clo" - + "ud.compute.v1.CommitmentList\"T\202\323\344\223\002=\022;/c" - + "ompute/v1/projects/{project}/regions/{re" - + "gion}/commitments\332A\016project,region\022\217\002\n\006U" - + "pdate\0226.google.cloud.compute.v1.UpdateRe" - + "gionCommitmentRequest\032\".google.cloud.com" - + "pute.v1.Operation\"\250\001\202\323\344\223\002_2H/compute/v1/" - + "projects/{project}/regions/{region}/comm" - + "itments/{commitment}:\023commitment_resourc" - + "e\332A-project,region,commitment,commitment" - + "_resource\212N\020RegionOperations\032r\312A\026compute" - + ".googleapis.com\322AVhttps://www.googleapis" - + ".com/auth/compute,https://www.googleapis" - + ".com/auth/cloud-platform2\277\004\n\017RegionDiskT" - + "ypes\022\305\001\n\003Get\0221.google.cloud.compute.v1.G" - + "etRegionDiskTypeRequest\032!.google.cloud.c" - + "ompute.v1.DiskType\"h\202\323\344\223\002G\022E/compute/v1/" - + "projects/{project}/regions/{region}/disk" - + "Types/{disk_type}\332A\030project,region,disk_" - + "type\022\274\001\n\004List\0223.google.cloud.compute.v1." - + "ListRegionDiskTypesRequest\032+.google.clou" - + "d.compute.v1.RegionDiskTypeList\"R\202\323\344\223\002;\022" - + "9/compute/v1/projects/{project}/regions/" - + "{region}/diskTypes\332A\016project,region\032\244\001\312A" - + "\026compute.googleapis.com\322A\207\001https://www.g" - + "oogleapis.com/auth/compute.readonly,http" + + "on\"R\202\323\344\223\002/\"-/compute/v1/projects/{projec" + + "t}/disableXpnHost\332A\007project\212N\020GlobalOper" + + "ations\022\253\002\n\022DisableXpnResource\0229.google.c" + + "loud.compute.v1.DisableXpnResourceProjec" + + "tRequest\032\".google.cloud.compute.v1.Opera" + + "tion\"\265\001\202\323\344\223\002c\"1/compute/v1/projects/{pro" + + "ject}/disableXpnResource:.projects_disab" + + "le_xpn_resource_request_resource\332A6proje" + + "ct,projects_disable_xpn_resource_request" + + "_resource\212N\020GlobalOperations\022\274\001\n\rEnableX" + + "pnHost\0224.google.cloud.compute.v1.EnableX" + + "pnHostProjectRequest\032\".google.cloud.comp" + + "ute.v1.Operation\"Q\202\323\344\223\002.\",/compute/v1/pr" + + "ojects/{project}/enableXpnHost\332A\007project" + + "\212N\020GlobalOperations\022\246\002\n\021EnableXpnResourc" + + "e\0228.google.cloud.compute.v1.EnableXpnRes" + + "ourceProjectRequest\032\".google.cloud.compu" + + "te.v1.Operation\"\262\001\202\323\344\223\002a\"0/compute/v1/pr" + + "ojects/{project}/enableXpnResource:-proj" + + "ects_enable_xpn_resource_request_resourc" + + "e\332A5project,projects_enable_xpn_resource" + + "_request_resource\212N\020GlobalOperations\022\205\001\n" + + "\003Get\022*.google.cloud.compute.v1.GetProjec" + + "tRequest\032 .google.cloud.compute.v1.Proje" + + "ct\"0\202\323\344\223\002 \022\036/compute/v1/projects/{projec" + + "t}\332A\007project\022\236\001\n\nGetXpnHost\0221.google.clo" + + "ud.compute.v1.GetXpnHostProjectRequest\032 " + + ".google.cloud.compute.v1.Project\";\202\323\344\223\002+" + + "\022)/compute/v1/projects/{project}/getXpnH" + + "ost\332A\007project\022\276\001\n\017GetXpnResources\0227.goog" + + "le.cloud.compute.v1.GetXpnResourcesProje" + + "ctsRequest\0320.google.cloud.compute.v1.Pro" + + "jectsGetXpnResources\"@\202\323\344\223\0020\022./compute/v" + + "1/projects/{project}/getXpnResources\332A\007p" + + "roject\022\375\001\n\014ListXpnHosts\0224.google.cloud.c" + + "ompute.v1.ListXpnHostsProjectsRequest\032$." + + "google.cloud.compute.v1.XpnHostList\"\220\001\202\323" + + "\344\223\002W\"+/compute/v1/projects/{project}/lis" + + "tXpnHosts:(projects_list_xpn_hosts_reque" + + "st_resource\332A0project,projects_list_xpn_" + + "hosts_request_resource\022\345\001\n\010MoveDisk\022/.go" + + "ogle.cloud.compute.v1.MoveDiskProjectReq" + + "uest\032\".google.cloud.compute.v1.Operation" + + "\"\203\001\202\323\344\223\002E\"\'/compute/v1/projects/{project" + + "}/moveDisk:\032disk_move_request_resource\332A" + + "\"project,disk_move_request_resource\212N\020Gl" + + "obalOperations\022\371\001\n\014MoveInstance\0223.google" + + ".cloud.compute.v1.MoveInstanceProjectReq" + + "uest\032\".google.cloud.compute.v1.Operation" + + "\"\217\001\202\323\344\223\002M\"+/compute/v1/projects/{project" + + "}/moveInstance:\036instance_move_request_re" + + "source\332A&project,instance_move_request_r" + + "esource\212N\020GlobalOperations\022\206\002\n\031SetCommon" + + "InstanceMetadata\022@.google.cloud.compute." + + "v1.SetCommonInstanceMetadataProjectReque" + + "st\032\".google.cloud.compute.v1.Operation\"\202" + + "\001\202\323\344\223\002M\"8/compute/v1/projects/{project}/" + + "setCommonInstanceMetadata:\021metadata_reso" + + "urce\332A\031project,metadata_resource\212N\020Globa" + + "lOperations\022\274\002\n\025SetDefaultNetworkTier\022<." + + "google.cloud.compute.v1.SetDefaultNetwor" + + "kTierProjectRequest\032\".google.cloud.compu" + + "te.v1.Operation\"\300\001\202\323\344\223\002j\"4/compute/v1/pr" + + "ojects/{project}/setDefaultNetworkTier:2" + + "projects_set_default_network_tier_reques" + + "t_resource\332A:project,projects_set_defaul" + + "t_network_tier_request_resource\212N\020Global" + + "Operations\022\221\002\n\024SetUsageExportBucket\022;.go" + + "ogle.cloud.compute.v1.SetUsageExportBuck" + + "etProjectRequest\032\".google.cloud.compute." + + "v1.Operation\"\227\001\202\323\344\223\002U\"3/compute/v1/proje" + + "cts/{project}/setUsageExportBucket:\036usag" + + "e_export_location_resource\332A&project,usa" + + "ge_export_location_resource\212N\020GlobalOper" + + "ations\032r\312A\026compute.googleapis.com\322AVhttp" + "s://www.googleapis.com/auth/compute,http" + "s://www.googleapis.com/auth/cloud-platfo" - + "rm2\212\034\n\013RegionDisks\022\346\002\n\023AddResourcePolici" - + "es\022=.google.cloud.compute.v1.AddResource" - + "PoliciesRegionDiskRequest\032\".google.cloud" - + ".compute.v1.Operation\"\353\001\202\323\344\223\002\207\001\"P/comput" + + "rm2\304\013\n\030PublicAdvertisedPrefixes\022\205\002\n\006Dele" + + "te\022=.google.cloud.compute.v1.DeletePubli" + + "cAdvertisedPrefixeRequest\032\".google.cloud" + + ".compute.v1.Operation\"\227\001\202\323\344\223\002[*Y/compute" + + "/v1/projects/{project}/global/publicAdve" + + "rtisedPrefixes/{public_advertised_prefix" + + "}\332A project,public_advertised_prefix\212N\020G" + + "lobalOperations\022\371\001\n\003Get\022:.google.cloud.c" + + "ompute.v1.GetPublicAdvertisedPrefixeRequ" + + "est\032/.google.cloud.compute.v1.PublicAdve" + + "rtisedPrefix\"\204\001\202\323\344\223\002[\022Y/compute/v1/proje" + + "cts/{project}/global/publicAdvertisedPre" + + "fixes/{public_advertised_prefix}\332A proje" + + "ct,public_advertised_prefix\022\226\002\n\006Insert\022=" + + ".google.cloud.compute.v1.InsertPublicAdv" + + "ertisedPrefixeRequest\032\".google.cloud.com" + + "pute.v1.Operation\"\250\001\202\323\344\223\002c\">/compute/v1/" + + "projects/{project}/global/publicAdvertis" + + "edPrefixes:!public_advertised_prefix_res" + + "ource\332A)project,public_advertised_prefix" + + "_resource\212N\020GlobalOperations\022\313\001\n\004List\022<." + + "google.cloud.compute.v1.ListPublicAdvert" + + "isedPrefixesRequest\0323.google.cloud.compu" + + "te.v1.PublicAdvertisedPrefixList\"P\202\323\344\223\002@" + + "\022>/compute/v1/projects/{project}/global/" + + "publicAdvertisedPrefixes\332A\007project\022\310\002\n\005P" + + "atch\022<.google.cloud.compute.v1.PatchPubl" + + "icAdvertisedPrefixeRequest\032\".google.clou" + + "d.compute.v1.Operation\"\334\001\202\323\344\223\002~2Y/comput" + + "e/v1/projects/{project}/global/publicAdv" + + "ertisedPrefixes/{public_advertised_prefi" + + "x}:!public_advertised_prefix_resource\332AB" + + "project,public_advertised_prefix,public_" + + "advertised_prefix_resource\212N\020GlobalOpera" + + "tions\032r\312A\026compute.googleapis.com\322AVhttps" + + "://www.googleapis.com/auth/compute,https" + + "://www.googleapis.com/auth/cloud-platfor" + + "m2\360\r\n\027PublicDelegatedPrefixes\022\352\001\n\016Aggreg" + + "atedList\022E.google.cloud.compute.v1.Aggre" + + "gatedListPublicDelegatedPrefixesRequest\032" + + "<.google.cloud.compute.v1.PublicDelegate" + + "dPrefixAggregatedList\"S\202\323\344\223\002C\022A/compute/" + + "v1/projects/{project}/aggregated/publicD" + + "elegatedPrefixes\332A\007project\022\222\002\n\006Delete\022<." + + "google.cloud.compute.v1.DeletePublicDele" + + "gatedPrefixeRequest\032\".google.cloud.compu" + + "te.v1.Operation\"\245\001\202\323\344\223\002c*a/compute/v1/pr" + + "ojects/{project}/regions/{region}/public" + + "DelegatedPrefixes/{public_delegated_pref" + + "ix}\332A&project,region,public_delegated_pr" + + "efix\212N\020RegionOperations\022\205\002\n\003Get\0229.google" + + ".cloud.compute.v1.GetPublicDelegatedPref" + + "ixeRequest\032..google.cloud.compute.v1.Pub" + + "licDelegatedPrefix\"\222\001\202\323\344\223\002c\022a/compute/v1" + + "/projects/{project}/regions/{region}/pub" + + "licDelegatedPrefixes/{public_delegated_p" + + "refix}\332A&project,region,public_delegated" + + "_prefix\022\243\002\n\006Insert\022<.google.cloud.comput" + + "e.v1.InsertPublicDelegatedPrefixeRequest" + + "\032\".google.cloud.compute.v1.Operation\"\266\001\202" + + "\323\344\223\002k\"G/compute/v1/projects/{project}/re" + + "gions/{region}/publicDelegatedPrefixes: " + + "public_delegated_prefix_resource\332A/proje" + + "ct,region,public_delegated_prefix_resour" + + "ce\212N\020RegionOperations\022\331\001\n\004List\022;.google." + + "cloud.compute.v1.ListPublicDelegatedPref" + + "ixesRequest\0322.google.cloud.compute.v1.Pu" + + "blicDelegatedPrefixList\"`\202\323\344\223\002I\022G/comput" + "e/v1/projects/{project}/regions/{region}" - + "/disks/{disk}/addResourcePolicies:3regio" - + "n_disks_add_resource_policies_request_re" - + "source\332AGproject,region,disk,region_disk" - + "s_add_resource_policies_request_resource" - + "\212N\020RegionOperations\022\222\002\n\016CreateSnapshot\0228" - + ".google.cloud.compute.v1.CreateSnapshotR" - + "egionDiskRequest\032\".google.cloud.compute." - + "v1.Operation\"\241\001\202\323\344\223\002`\"K/compute/v1/proje" - + "cts/{project}/regions/{region}/disks/{di" - + "sk}/createSnapshot:\021snapshot_resource\332A%" - + "project,region,disk,snapshot_resource\212N\020" - + "RegionOperations\022\315\001\n\006Delete\0220.google.clo" - + "ud.compute.v1.DeleteRegionDiskRequest\032\"." - + "google.cloud.compute.v1.Operation\"m\202\323\344\223\002" - + ">*\022<" - + "/compute/v1/projects/{project}/regions/{" - + "region}/disks/{disk}\332A\023project,region,di" - + "sk\022\330\001\n\014GetIamPolicy\0226.google.cloud.compu", - "te.v1.GetIamPolicyRegionDiskRequest\032\037.go" - + "ogle.cloud.compute.v1.Policy\"o\202\323\344\223\002O\022M/c" - + "ompute/v1/projects/{project}/regions/{re" - + "gion}/disks/{resource}/getIamPolicy\332A\027pr" - + "oject,region,resource\022\336\001\n\006Insert\0220.googl" - + "e.cloud.compute.v1.InsertRegionDiskReque" - + "st\032\".google.cloud.compute.v1.Operation\"~" - + "\202\323\344\223\002F\"5/compute/v1/projects/{project}/r" - + "egions/{region}/disks:\rdisk_resource\332A\034p" - + "roject,region,disk_resource\212N\020RegionOper" - + "ations\022\252\001\n\004List\022/.google.cloud.compute.v" - + "1.ListRegionDisksRequest\032!.google.cloud." - + "compute.v1.DiskList\"N\202\323\344\223\0027\0225/compute/v1" - + "/projects/{project}/regions/{region}/dis" - + "ks\332A\016project,region\022\365\002\n\026RemoveResourcePo" - + "licies\022@.google.cloud.compute.v1.RemoveR" - + "esourcePoliciesRegionDiskRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\364\001\202\323\344\223\002\215\001\"S" + + "/publicDelegatedPrefixes\332A\016project,regio" + + "n\022\324\002\n\005Patch\022;.google.cloud.compute.v1.Pa" + + "tchPublicDelegatedPrefixeRequest\032\".googl" + + "e.cloud.compute.v1.Operation\"\351\001\202\323\344\223\002\205\0012a" + "/compute/v1/projects/{project}/regions/{" - + "region}/disks/{disk}/removeResourcePolic" - + "ies:6region_disks_remove_resource_polici" - + "es_request_resource\332AJproject,region,dis" - + "k,region_disks_remove_resource_policies_" - + "request_resource\212N\020RegionOperations\022\240\002\n\006" - + "Resize\0220.google.cloud.compute.v1.ResizeR" - + "egionDiskRequest\032\".google.cloud.compute." - + "v1.Operation\"\277\001\202\323\344\223\002k\"C/compute/v1/proje" - + "cts/{project}/regions/{region}/disks/{di" - + "sk}/resize:$region_disks_resize_request_" - + "resource\332A8project,region,disk,region_di" - + "sks_resize_request_resource\212N\020RegionOper" - + "ations\022\240\002\n\014SetIamPolicy\0226.google.cloud.c" - + "ompute.v1.SetIamPolicyRegionDiskRequest\032" - + "\037.google.cloud.compute.v1.Policy\"\266\001\202\323\344\223\002" - + "s\"M/compute/v1/projects/{project}/region" - + "s/{region}/disks/{resource}/setIamPolicy" - + ":\"region_set_policy_request_resource\332A:p" - + "roject,region,resource,region_set_policy" - + "_request_resource\022\255\002\n\tSetLabels\0223.google" - + ".cloud.compute.v1.SetLabelsRegionDiskReq" + + "region}/publicDelegatedPrefixes/{public_" + + "delegated_prefix}: public_delegated_pref" + + "ix_resource\332AGproject,region,public_dele" + + "gated_prefix,public_delegated_prefix_res" + + "ource\212N\020RegionOperations\032r\312A\026compute.goo" + + "gleapis.com\322AVhttps://www.googleapis.com" + + "/auth/compute,https://www.googleapis.com" + + "/auth/cloud-platform2\360\013\n\021RegionAutoscale" + + "rs\022\345\001\n\006Delete\0226.google.cloud.compute.v1." + + "DeleteRegionAutoscalerRequest\032\".google.c" + + "loud.compute.v1.Operation\"\177\202\323\344\223\002J*H/comp" + + "ute/v1/projects/{project}/regions/{regio" + + "n}/autoscalers/{autoscaler}\332A\031project,re" + + "gion,autoscaler\212N\020RegionOperations\022\315\001\n\003G" + + "et\0223.google.cloud.compute.v1.GetRegionAu" + + "toscalerRequest\032#.google.cloud.compute.v" + + "1.Autoscaler\"l\202\323\344\223\002J\022H/compute/v1/projec" + + "ts/{project}/regions/{region}/autoscaler" + + "s/{autoscaler}\332A\031project,region,autoscal" + + "er\022\367\001\n\006Insert\0226.google.cloud.compute.v1." + + "InsertRegionAutoscalerRequest\032\".google.c" + + "loud.compute.v1.Operation\"\220\001\202\323\344\223\002R\";/com" + + "pute/v1/projects/{project}/regions/{regi" + + "on}/autoscalers:\023autoscaler_resource\332A\"p" + + "roject,region,autoscaler_resource\212N\020Regi" + + "onOperations\022\302\001\n\004List\0225.google.cloud.com" + + "pute.v1.ListRegionAutoscalersRequest\032-.g" + + "oogle.cloud.compute.v1.RegionAutoscalerL" + + "ist\"T\202\323\344\223\002=\022;/compute/v1/projects/{proje" + + "ct}/regions/{region}/autoscalers\332A\016proje" + + "ct,region\022\365\001\n\005Patch\0225.google.cloud.compu" + + "te.v1.PatchRegionAutoscalerRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\220\001\202\323\344\223\002R2" + + ";/compute/v1/projects/{project}/regions/" + + "{region}/autoscalers:\023autoscaler_resourc" + + "e\332A\"project,region,autoscaler_resource\212N" + + "\020RegionOperations\022\367\001\n\006Update\0226.google.cl" + + "oud.compute.v1.UpdateRegionAutoscalerReq" + "uest\032\".google.cloud.compute.v1.Operation" - + "\"\306\001\202\323\344\223\002p\"J/compute/v1/projects/{project" - + "}/regions/{region}/disks/{resource}/setL" - + "abels:\"region_set_labels_request_resourc" - + "e\332A:project,region,resource,region_set_l" - + "abels_request_resource\212N\020RegionOperation" - + "s\022\301\002\n\022TestIamPermissions\022<.google.cloud." - + "compute.v1.TestIamPermissionsRegionDiskR" - + "equest\0320.google.cloud.compute.v1.TestPer" - + "missionsResponse\"\272\001\202\323\344\223\002x\"S/compute/v1/p" - + "rojects/{project}/regions/{region}/disks" - + "/{resource}/testIamPermissions:!test_per" - + "missions_request_resource\332A9project,regi" - + "on,resource,test_permissions_request_res" - + "ource\022\353\001\n\006Update\0220.google.cloud.compute." - + "v1.UpdateRegionDiskRequest\032\".google.clou" - + "d.compute.v1.Operation\"\212\001\202\323\344\223\002M2.google.cloud.compute.v1.DeleteRegionH" - + "ealthCheckServiceRequest\032\".google.cloud." - + "compute.v1.Operation\"\233\001\202\323\344\223\002\\*Z/compute/" + + "\"\220\001\202\323\344\223\002R\032;/compute/v1/projects/{project" + + "}/regions/{region}/autoscalers:\023autoscal" + + "er_resource\332A\"project,region,autoscaler_" + + "resource\212N\020RegionOperations\032r\312A\026compute." + + "googleapis.com\322AVhttps://www.googleapis." + + "com/auth/compute,https://www.googleapis." + + "com/auth/cloud-platform2\221\024\n\025RegionBacken" + + "dServices\022\370\001\n\006Delete\022:.google.cloud.comp" + + "ute.v1.DeleteRegionBackendServiceRequest" + + "\032\".google.cloud.compute.v1.Operation\"\215\001\202" + + "\323\344\223\002S*Q/compute/v1/projects/{project}/re" + + "gions/{region}/backendServices/{backend_" + + "service}\332A\036project,region,backend_servic" + + "e\212N\020RegionOperations\022\343\001\n\003Get\0227.google.cl" + + "oud.compute.v1.GetRegionBackendServiceRe" + + "quest\032\'.google.cloud.compute.v1.BackendS" + + "ervice\"z\202\323\344\223\002S\022Q/compute/v1/projects/{pr" + + "oject}/regions/{region}/backendServices/" + + "{backend_service}\332A\036project,region,backe" + + "nd_service\022\313\002\n\tGetHealth\022=.google.cloud." + + "compute.v1.GetHealthRegionBackendService" + + "Request\0322.google.cloud.compute.v1.Backen" + + "dServiceGroupHealth\"\312\001\202\323\344\223\002\200\001\"[/compute/" + + "v1/projects/{project}/regions/{region}/b" + + "ackendServices/{backend_service}/getHeal" + + "th:!resource_group_reference_resource\332A@" + + "project,region,backend_service,resource_" + + "group_reference_resource\022\354\001\n\014GetIamPolic" + + "y\022@.google.cloud.compute.v1.GetIamPolicy" + + "RegionBackendServiceRequest\032\037.google.clo" + + "ud.compute.v1.Policy\"y\202\323\344\223\002Y\022W/compute/v" + + "1/projects/{project}/regions/{region}/ba" + + "ckendServices/{resource}/getIamPolicy\332A\027" + + "project,region,resource\022\211\002\n\006Insert\022:.goo" + + "gle.cloud.compute.v1.InsertRegionBackend" + + "ServiceRequest\032\".google.cloud.compute.v1" + + ".Operation\"\236\001\202\323\344\223\002[\"?/compute/v1/project" + + "s/{project}/regions/{region}/backendServ" + + "ices:\030backend_service_resource\332A\'project" + + ",region,backend_service_resource\212N\020Regio" + + "nOperations\022\310\001\n\004List\0229.google.cloud.comp" + + "ute.v1.ListRegionBackendServicesRequest\032" + + "+.google.cloud.compute.v1.BackendService" + + "List\"X\202\323\344\223\002A\022?/compute/v1/projects/{proj" + + "ect}/regions/{region}/backendServices\332A\016" + + "project,region\022\251\002\n\005Patch\0229.google.cloud." + + "compute.v1.PatchRegionBackendServiceRequ" + + "est\032\".google.cloud.compute.v1.Operation\"" + + "\300\001\202\323\344\223\002m2Q/compute/v1/projects/{project}" + + "/regions/{region}/backendServices/{backe" + + "nd_service}:\030backend_service_resource\332A7" + + "project,region,backend_service,backend_s" + + "ervice_resource\212N\020RegionOperations\022\264\002\n\014S" + + "etIamPolicy\022@.google.cloud.compute.v1.Se" + + "tIamPolicyRegionBackendServiceRequest\032\037." + + "google.cloud.compute.v1.Policy\"\300\001\202\323\344\223\002}\"" + + "W/compute/v1/projects/{project}/regions/" + + "{region}/backendServices/{resource}/setI" + + "amPolicy:\"region_set_policy_request_reso" + + "urce\332A:project,region,resource,region_se" + + "t_policy_request_resource\022\253\002\n\006Update\022:.g" + + "oogle.cloud.compute.v1.UpdateRegionBacke" + + "ndServiceRequest\032\".google.cloud.compute." + + "v1.Operation\"\300\001\202\323\344\223\002m\032Q/compute/v1/proje" + + "cts/{project}/regions/{region}/backendSe" + + "rvices/{backend_service}:\030backend_servic" + + "e_resource\332A7project,region,backend_serv" + + "ice,backend_service_resource\212N\020RegionOpe" + + "rations\032r\312A\026compute.googleapis.com\322AVhtt" + + "ps://www.googleapis.com/auth/compute,htt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "orm2\362\t\n\021RegionCommitments\022\315\001\n\016Aggregated" + + "List\022?.google.cloud.compute.v1.Aggregate" + + "dListRegionCommitmentsRequest\0321.google.c" + + "loud.compute.v1.CommitmentAggregatedList" + + "\"G\202\323\344\223\0027\0225/compute/v1/projects/{project}" + + "/aggregated/commitments\332A\007project\022\315\001\n\003Ge" + + "t\0223.google.cloud.compute.v1.GetRegionCom" + + "mitmentRequest\032#.google.cloud.compute.v1" + + ".Commitment\"l\202\323\344\223\002J\022H/compute/v1/project" + + "s/{project}/regions/{region}/commitments" + + "/{commitment}\332A\031project,region,commitmen" + + "t\022\367\001\n\006Insert\0226.google.cloud.compute.v1.I" + + "nsertRegionCommitmentRequest\032\".google.cl" + + "oud.compute.v1.Operation\"\220\001\202\323\344\223\002R\";/comp" + + "ute/v1/projects/{project}/regions/{regio" + + "n}/commitments:\023commitment_resource\332A\"pr" + + "oject,region,commitment_resource\212N\020Regio" + + "nOperations\022\274\001\n\004List\0225.google.cloud.comp" + + "ute.v1.ListRegionCommitmentsRequest\032\'.go" + + "ogle.cloud.compute.v1.CommitmentList\"T\202\323" + + "\344\223\002=\022;/compute/v1/projects/{project}/reg" + + "ions/{region}/commitments\332A\016project,regi" + + "on\022\217\002\n\006Update\0226.google.cloud.compute.v1." + + "UpdateRegionCommitmentRequest\032\".google.c" + + "loud.compute.v1.Operation\"\250\001\202\323\344\223\002_2H/com" + + "pute/v1/projects/{project}/regions/{regi" + + "on}/commitments/{commitment}:\023commitment" + + "_resource\332A-project,region,commitment,co" + + "mmitment_resource\212N\020RegionOperations\032r\312A" + + "\026compute.googleapis.com\322AVhttps://www.go" + + "ogleapis.com/auth/compute,https://www.go" + + "ogleapis.com/auth/cloud-platform2\277\004\n\017Reg" + + "ionDiskTypes\022\305\001\n\003Get\0221.google.cloud.comp" + + "ute.v1.GetRegionDiskTypeRequest\032!.google" + + ".cloud.compute.v1.DiskType\"h\202\323\344\223\002G\022E/com" + + "pute/v1/projects/{project}/regions/{regi" + + "on}/diskTypes/{disk_type}\332A\030project,regi" + + "on,disk_type\022\274\001\n\004List\0223.google.cloud.com" + + "pute.v1.ListRegionDiskTypesRequest\032+.goo" + + "gle.cloud.compute.v1.RegionDiskTypeList\"" + + "R\202\323\344\223\002;\0229/compute/v1/projects/{project}/" + + "regions/{region}/diskTypes\332A\016project,reg" + + "ion\032\244\001\312A\026compute.googleapis.com\322A\207\001https" + + "://www.googleapis.com/auth/compute.reado" + + "nly,https://www.googleapis.com/auth/comp" + + "ute,https://www.googleapis.com/auth/clou" + + "d-platform2\212\034\n\013RegionDisks\022\346\002\n\023AddResour" + + "cePolicies\022=.google.cloud.compute.v1.Add" + + "ResourcePoliciesRegionDiskRequest\032\".goog" + + "le.cloud.compute.v1.Operation\"\353\001\202\323\344\223\002\207\001\"" + + "P/compute/v1/projects/{project}/regions/" + + "{region}/disks/{disk}/addResourcePolicie" + + "s:3region_disks_add_resource_policies_re", + "quest_resource\332AGproject,region,disk,reg" + + "ion_disks_add_resource_policies_request_" + + "resource\212N\020RegionOperations\022\222\002\n\016CreateSn" + + "apshot\0228.google.cloud.compute.v1.CreateS" + + "napshotRegionDiskRequest\032\".google.cloud." + + "compute.v1.Operation\"\241\001\202\323\344\223\002`\"K/compute/" + + "v1/projects/{project}/regions/{region}/d" + + "isks/{disk}/createSnapshot:\021snapshot_res" + + "ource\332A%project,region,disk,snapshot_res" + + "ource\212N\020RegionOperations\022\315\001\n\006Delete\0220.go" + + "ogle.cloud.compute.v1.DeleteRegionDiskRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"m\202\323\344\223\002>*\022.google.cloud.compute.v1.Delet" + + "eRegionHealthCheckServiceRequest\032\".googl" + + "e.cloud.compute.v1.Operation\"\233\001\202\323\344\223\002\\*Z/" + + "compute/v1/projects/{project}/regions/{r" + + "egion}/healthCheckServices/{health_check" + + "_service}\332A#project,region,health_check_" + + "service\212N\020RegionOperations\022\372\001\n\003Get\022;.goo" + + "gle.cloud.compute.v1.GetRegionHealthChec" + + "kServiceRequest\032+.google.cloud.compute.v" + + "1.HealthCheckService\"\210\001\202\323\344\223\002\\\022Z/compute/" + "v1/projects/{project}/regions/{region}/h" + "ealthCheckServices/{health_check_service" - + "}\332A#project,region,health_check_service\212" - + "N\020RegionOperations\022\372\001\n\003Get\022;.google.clou" - + "d.compute.v1.GetRegionHealthCheckService" - + "Request\032+.google.cloud.compute.v1.Health" - + "CheckService\"\210\001\202\323\344\223\002\\\022Z/compute/v1/proje" - + "cts/{project}/regions/{region}/healthChe" - + "ckServices/{health_check_service}\332A#proj" - + "ect,region,health_check_service\022\233\002\n\006Inse" - + "rt\022>.google.cloud.compute.v1.InsertRegio" - + "nHealthCheckServiceRequest\032\".google.clou" - + "d.compute.v1.Operation\"\254\001\202\323\344\223\002d\"C/comput" - + "e/v1/projects/{project}/regions/{region}" - + "/healthCheckServices:\035health_check_servi" - + "ce_resource\332A,project,region,health_chec" - + "k_service_resource\212N\020RegionOperations\022\325\001" - + "\n\004List\022=.google.cloud.compute.v1.ListReg" - + "ionHealthCheckServicesRequest\0320.google.c" - + "loud.compute.v1.HealthCheckServicesList\"" - + "\\\202\323\344\223\002E\022C/compute/v1/projects/{project}/" - + "regions/{region}/healthCheckServices\332A\016p" - + "roject,region\022\305\002\n\005Patch\022=.google.cloud.c" - + "ompute.v1.PatchRegionHealthCheckServiceR" - + "equest\032\".google.cloud.compute.v1.Operati" - + "on\"\330\001\202\323\344\223\002{2Z/compute/v1/projects/{proje" - + "ct}/regions/{region}/healthCheckServices" - + "/{health_check_service}:\035health_check_se" - + "rvice_resource\332AAproject,region,health_c" - + "heck_service,health_check_service_resour" - + "ce\212N\020RegionOperations\032r\312A\026compute.google" - + "apis.com\322AVhttps://www.googleapis.com/au" - + "th/compute,https://www.googleapis.com/au" - + "th/cloud-platform2\306\014\n\022RegionHealthChecks" - + "\022\354\001\n\006Delete\0227.google.cloud.compute.v1.De" - + "leteRegionHealthCheckRequest\032\".google.cl" - + "oud.compute.v1.Operation\"\204\001\202\323\344\223\002M*K/comp" + + "}\332A#project,region,health_check_service\022" + + "\233\002\n\006Insert\022>.google.cloud.compute.v1.Ins" + + "ertRegionHealthCheckServiceRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\254\001\202\323\344\223\002d\"" + + "C/compute/v1/projects/{project}/regions/" + + "{region}/healthCheckServices:\035health_che" + + "ck_service_resource\332A,project,region,hea" + + "lth_check_service_resource\212N\020RegionOpera" + + "tions\022\325\001\n\004List\022=.google.cloud.compute.v1" + + ".ListRegionHealthCheckServicesRequest\0320." + + "google.cloud.compute.v1.HealthCheckServi" + + "cesList\"\\\202\323\344\223\002E\022C/compute/v1/projects/{p" + + "roject}/regions/{region}/healthCheckServ" + + "ices\332A\016project,region\022\305\002\n\005Patch\022=.google" + + ".cloud.compute.v1.PatchRegionHealthCheck" + + "ServiceRequest\032\".google.cloud.compute.v1" + + ".Operation\"\330\001\202\323\344\223\002{2Z/compute/v1/project" + + "s/{project}/regions/{region}/healthCheck" + + "Services/{health_check_service}:\035health_" + + "check_service_resource\332AAproject,region," + + "health_check_service,health_check_servic" + + "e_resource\212N\020RegionOperations\032r\312A\026comput" + + "e.googleapis.com\322AVhttps://www.googleapi" + + "s.com/auth/compute,https://www.googleapi" + + "s.com/auth/cloud-platform2\306\014\n\022RegionHeal" + + "thChecks\022\354\001\n\006Delete\0227.google.cloud.compu" + + "te.v1.DeleteRegionHealthCheckRequest\032\".g" + + "oogle.cloud.compute.v1.Operation\"\204\001\202\323\344\223\002" + + "M*K/compute/v1/projects/{project}/region" + + "s/{region}/healthChecks/{health_check}\332A" + + "\033project,region,health_check\212N\020RegionOpe" + + "rations\022\324\001\n\003Get\0224.google.cloud.compute.v" + + "1.GetRegionHealthCheckRequest\032$.google.c" + + "loud.compute.v1.HealthCheck\"q\202\323\344\223\002M\022K/co" + + "mpute/v1/projects/{project}/regions/{reg" + + "ion}/healthChecks/{health_check}\332A\033proje" + + "ct,region,health_check\022\375\001\n\006Insert\0227.goog" + + "le.cloud.compute.v1.InsertRegionHealthCh" + + "eckRequest\032\".google.cloud.compute.v1.Ope" + + "ration\"\225\001\202\323\344\223\002U\"\022\022/compute/v1/proj" - + "ects/{project}/regions/{region}/instance" - + "Groups\332A\016project,region\022\206\003\n\rListInstance" - + "s\022A.google.cloud.compute.v1.ListInstance" - + "sRegionInstanceGroupsRequest\032:.google.cl" - + "oud.compute.v1.RegionInstanceGroupsListI" - + "nstances\"\365\001\202\323\344\223\002\227\001\"]/compute/v1/projects" + + "ce_group_manager}/listErrors\332A%project,r" + + "egion,instance_group_manager\022\330\002\n\024ListMan" + + "agedInstances\022O.google.cloud.compute.v1." + + "ListManagedInstancesRegionInstanceGroupM" + + "anagersRequest\032I.google.cloud.compute.v1" + + ".RegionInstanceGroupManagersListInstance" + + "sResponse\"\243\001\202\323\344\223\002u\"s/compute/v1/projects" + "/{project}/regions/{region}/instanceGrou" - + "ps/{instance_group}/listInstances:6regio" - + "n_instance_groups_list_instances_request" - + "_resource\332ATproject,region,instance_grou" - + "p,region_instance_groups_list_instances_" - + "request_resource\022\202\003\n\rSetNamedPorts\022@.goo" - + "gle.cloud.compute.v1.SetNamedPortsRegion" - + "InstanceGroupRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"\212\002\202\323\344\223\002\230\001\"]/compute/v1/" - + "projects/{project}/regions/{region}/inst" - + "anceGroups/{instance_group}/setNamedPort" - + "s:7region_instance_groups_set_named_port" - + "s_request_resource\332AUproject,region,inst" - + "ance_group,region_instance_groups_set_na" - + "med_ports_request_resource\212N\020RegionOpera" - + "tions\032r\312A\026compute.googleapis.com\322AVhttps" - + "://www.googleapis.com/auth/compute,https" - + "://www.googleapis.com/auth/cloud-platfor" - + "m2\346\010\n\027RegionInstanceTemplates\022\200\002\n\006Delete" - + "\022<.google.cloud.compute.v1.DeleteRegionI" - + "nstanceTemplateRequest\032\".google.cloud.co" - + "mpute.v1.Operation\"\223\001\202\323\344\223\002W*U/compute/v1" - + "/projects/{project}/regions/{region}/ins" - + "tanceTemplates/{instance_template}\332A pro" - + "ject,region,instance_template\212N\020RegionOp" - + "erations\022\356\001\n\003Get\0229.google.cloud.compute." - + "v1.GetRegionInstanceTemplateRequest\032).go" - + "ogle.cloud.compute.v1.InstanceTemplate\"\200" - + "\001\202\323\344\223\002W\022U/compute/v1/projects/{project}/" - + "regions/{region}/instanceTemplates/{inst" - + "ance_template}\332A project,region,instance" - + "_template\022\221\002\n\006Insert\022<.google.cloud.comp" - + "ute.v1.InsertRegionInstanceTemplateReque" - + "st\032\".google.cloud.compute.v1.Operation\"\244" - + "\001\202\323\344\223\002_\"A/compute/v1/projects/{project}/" - + "regions/{region}/instanceTemplates:\032inst" - + "ance_template_resource\332A)project,region," - + "instance_template_resource\212N\020RegionOpera" - + "tions\022\316\001\n\004List\022;.google.cloud.compute.v1" - + ".ListRegionInstanceTemplatesRequest\032-.go" - + "ogle.cloud.compute.v1.InstanceTemplateLi" - + "st\"Z\202\323\344\223\002C\022A/compute/v1/projects/{projec" - + "t}/regions/{region}/instanceTemplates\332A\016" - + "project,region\032r\312A\026compute.googleapis.co" - + "m\322AVhttps://www.googleapis.com/auth/comp" - + "ute,https://www.googleapis.com/auth/clou" - + "d-platform2\264\003\n\017RegionInstances\022\254\002\n\nBulkI" - + "nsert\0228.google.cloud.compute.v1.BulkInse" - + "rtRegionInstanceRequest\032\".google.cloud.c" - + "ompute.v1.Operation\"\277\001\202\323\344\223\002n\"D/compute/v" + + "pManagers/{instance_group_manager}/listM" + + "anagedInstances\332A%project,region,instanc" + + "e_group_manager\022\340\002\n\026ListPerInstanceConfi" + + "gs\022Q.google.cloud.compute.v1.ListPerInst" + + "anceConfigsRegionInstanceGroupManagersRe" + + "quest\032K.google.cloud.compute.v1.RegionIn" + + "stanceGroupManagersListInstanceConfigsRe" + + "sp\"\245\001\202\323\344\223\002w\"u/compute/v1/projects/{proje" + + "ct}/regions/{region}/instanceGroupManage" + + "rs/{instance_group_manager}/listPerInsta" + + "nceConfigs\332A%project,region,instance_gro" + + "up_manager\022\322\002\n\005Patch\022?.google.cloud.comp" + + "ute.v1.PatchRegionInstanceGroupManagerRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"\343\001\202\323\344\223\002\201\0012^/compute/v1/projects/{proje" + + "ct}/regions/{region}/instanceGroupManage" + + "rs/{instance_group_manager}:\037instance_gr" + + "oup_manager_resource\332AEproject,region,in" + + "stance_group_manager,instance_group_mana" + + "ger_resource\212N\020RegionOperations\022\320\003\n\027Patc" + + "hPerInstanceConfigs\022Q.google.cloud.compu" + + "te.v1.PatchPerInstanceConfigsRegionInsta" + + "nceGroupManagerRequest\032\".google.cloud.co" + + "mpute.v1.Operation\"\275\002\202\323\344\223\002\272\001\"v/compute/v" + "1/projects/{project}/regions/{region}/in" - + "stances/bulkInsert:&bulk_insert_instance" - + "_resource_resource\332A5project,region,bulk" - + "_insert_instance_resource_resource\212N\020Reg" + + "stanceGroupManagers/{instance_group_mana" + + "ger}/patchPerInstanceConfigs:@region_ins" + + "tance_group_manager_patch_instance_confi" + + "g_req_resource\332Afproject,region,instance" + + "_group_manager,region_instance_group_man" + + "ager_patch_instance_config_req_resource\212" + + "N\020RegionOperations\022\256\003\n\021RecreateInstances" + + "\022K.google.cloud.compute.v1.RecreateInsta" + + "ncesRegionInstanceGroupManagerRequest\032\"." + + "google.cloud.compute.v1.Operation\"\247\002\202\323\344\223" + + "\002\254\001\"p/compute/v1/projects/{project}/regi" + + "ons/{region}/instanceGroupManagers/{inst" + + "ance_group_manager}/recreateInstances:8r" + + "egion_instance_group_managers_recreate_r" + + "equest_resource\332A^project,region,instanc" + + "e_group_manager,region_instance_group_ma" + + "nagers_recreate_request_resource\212N\020Regio" + + "nOperations\022\236\002\n\006Resize\022@.google.cloud.co" + + "mpute.v1.ResizeRegionInstanceGroupManage" + + "rRequest\032\".google.cloud.compute.v1.Opera" + + "tion\"\255\001\202\323\344\223\002g\"e/compute/v1/projects/{pro" + + "ject}/regions/{region}/instanceGroupMana" + + "gers/{instance_group_manager}/resize\332A*p" + + "roject,region,instance_group_manager,siz" + + "e\212N\020RegionOperations\022\274\003\n\023SetInstanceTemp" + + "late\022M.google.cloud.compute.v1.SetInstan" + + "ceTemplateRegionInstanceGroupManagerRequ" + + "est\032\".google.cloud.compute.v1.Operation\"" + + "\261\002\202\323\344\223\002\262\001\"r/compute/v1/projects/{project" + + "}/regions/{region}/instanceGroupManagers" + + "/{instance_group_manager}/setInstanceTem" + + "plate:/compute" + + "/v1/projects/{project}/regions/{region}/" + + "instanceGroups\332A\016project,region\022\206\003\n\rList" + + "Instances\022A.google.cloud.compute.v1.List" + + "InstancesRegionInstanceGroupsRequest\032:.g" + + "oogle.cloud.compute.v1.RegionInstanceGro" + + "upsListInstances\"\365\001\202\323\344\223\002\227\001\"]/compute/v1/" + + "projects/{project}/regions/{region}/inst" + + "anceGroups/{instance_group}/listInstance" + + "s:6region_instance_groups_list_instances" + + "_request_resource\332ATproject,region,insta" + + "nce_group,region_instance_groups_list_in" + + "stances_request_resource\022\202\003\n\rSetNamedPor" + + "ts\022@.google.cloud.compute.v1.SetNamedPor" + + "tsRegionInstanceGroupRequest\032\".google.cl" + + "oud.compute.v1.Operation\"\212\002\202\323\344\223\002\230\001\"]/com" + + "pute/v1/projects/{project}/regions/{regi" + + "on}/instanceGroups/{instance_group}/setN" + + "amedPorts:7region_instance_groups_set_na" + + "med_ports_request_resource\332AUproject,reg" + + "ion,instance_group,region_instance_group" + + "s_set_named_ports_request_resource\212N\020Reg" + "ionOperations\032r\312A\026compute.googleapis.com" + "\322AVhttps://www.googleapis.com/auth/compu" + "te,https://www.googleapis.com/auth/cloud" - + "-platform2\260\t\n\033RegionNetworkEndpointGroup" - + "s\022\222\002\n\006Delete\022@.google.cloud.compute.v1.D", - "eleteRegionNetworkEndpointGroupRequest\032\"" - + ".google.cloud.compute.v1.Operation\"\241\001\202\323\344" - + "\223\002`*^/compute/v1/projects/{project}/regi" - + "ons/{region}/networkEndpointGroups/{netw" - + "ork_endpoint_group}\332A%project,region,net" - + "work_endpoint_group\212N\020RegionOperations\022\204" - + "\002\n\003Get\022=.google.cloud.compute.v1.GetRegi" - + "onNetworkEndpointGroupRequest\032-.google.c" - + "loud.compute.v1.NetworkEndpointGroup\"\216\001\202" - + "\323\344\223\002`\022^/compute/v1/projects/{project}/re" - + "gions/{region}/networkEndpointGroups/{ne" - + "twork_endpoint_group}\332A%project,region,n" - + "etwork_endpoint_group\022\243\002\n\006Insert\022@.googl" - + "e.cloud.compute.v1.InsertRegionNetworkEn" - + "dpointGroupRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\262\001\202\323\344\223\002h\"E/compute/v1/pro" - + "jects/{project}/regions/{region}/network" - + "EndpointGroups:\037network_endpoint_group_r" - + "esource\332A.project,region,network_endpoin" - + "t_group_resource\212N\020RegionOperations\022\332\001\n\004" - + "List\022?.google.cloud.compute.v1.ListRegio" - + "nNetworkEndpointGroupsRequest\0321.google.c" - + "loud.compute.v1.NetworkEndpointGroupList" - + "\"^\202\323\344\223\002G\022E/compute/v1/projects/{project}" - + "/regions/{region}/networkEndpointGroups\332" - + "A\016project,region\032r\312A\026compute.googleapis." - + "com\322AVhttps://www.googleapis.com/auth/co" - + "mpute,https://www.googleapis.com/auth/cl" - + "oud-platform2\362\'\n\035RegionNetworkFirewallPo" - + "licies\022\353\002\n\016AddAssociation\022I.google.cloud" - + ".compute.v1.AddAssociationRegionNetworkF" - + "irewallPolicyRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"\351\001\202\323\344\223\002\211\001\"a/compute/v1/" - + "projects/{project}/regions/{region}/fire" - + "wallPolicies/{firewall_policy}/addAssoci" - + "ation:$firewall_policy_association_resou" - + "rce\332ACproject,region,firewall_policy,fir" - + "ewall_policy_association_resource\212N\020Regi" - + "onOperations\022\307\002\n\007AddRule\022B.google.cloud." - + "compute.v1.AddRuleRegionNetworkFirewallP" - + "olicyRequest\032\".google.cloud.compute.v1.O" - + "peration\"\323\001\202\323\344\223\002{\"Z/compute/v1/projects/" - + "{project}/regions/{region}/firewallPolic" - + "ies/{firewall_policy}/addRule:\035firewall_" - + "policy_rule_resource\332A.google.cloud.compute.v1.GetReg" - + "ionNetworkFirewallPolicyRequest\032\'.google" - + ".cloud.compute.v1.FirewallPolicy\"{\202\323\344\223\002T" - + "\022R/compute/v1/projects/{project}/regions" - + "/{region}/firewallPolicies/{firewall_pol" - + "icy}\332A\036project,region,firewall_policy\022\234\002" - + "\n\016GetAssociation\022I.google.cloud.compute." - + "v1.GetAssociationRegionNetworkFirewallPo" - + "licyRequest\0322.google.cloud.compute.v1.Fi" - + "rewallPolicyAssociation\"\212\001\202\323\344\223\002c\022a/compu" - + "te/v1/projects/{project}/regions/{region" - + "}/firewallPolicies/{firewall_policy}/get" - + "Association\332A\036project,region,firewall_po" - + "licy\022\267\002\n\025GetEffectiveFirewalls\022P.google." - + "cloud.compute.v1.GetEffectiveFirewallsRe" - + "gionNetworkFirewallPolicyRequest\032S.googl" - + "e.cloud.compute.v1.RegionNetworkFirewall" - + "PoliciesGetEffectiveFirewallsResponse\"w\202" - + "\323\344\223\002X\022V/compute/v1/projects/{project}/re" - + "gions/{region}/firewallPolicies/getEffec" - + "tiveFirewalls\332A\026project,region,network\022\364" - + "\001\n\014GetIamPolicy\022G.google.cloud.compute.v" - + "1.GetIamPolicyRegionNetworkFirewallPolic" - + "yRequest\032\037.google.cloud.compute.v1.Polic" - + "y\"z\202\323\344\223\002Z\022X/compute/v1/projects/{project" - + "}/regions/{region}/firewallPolicies/{res" - + "ource}/getIamPolicy\332A\027project,region,res" - + "ource\022\200\002\n\007GetRule\022B.google.cloud.compute" - + ".v1.GetRuleRegionNetworkFirewallPolicyRe" - + "quest\032+.google.cloud.compute.v1.Firewall" - + "PolicyRule\"\203\001\202\323\344\223\002\\\022Z/compute/v1/project" - + "s/{project}/regions/{region}/firewallPol" - + "icies/{firewall_policy}/getRule\332A\036projec" - + "t,region,firewall_policy\022\221\002\n\006Insert\022A.go" - + "ogle.cloud.compute.v1.InsertRegionNetwor" - + "kFirewallPolicyRequest\032\".google.cloud.co" - + "mpute.v1.Operation\"\237\001\202\323\344\223\002\\\"@/compute/v1" - + "/projects/{project}/regions/{region}/fir" - + "ewallPolicies:\030firewall_policy_resource\332" - + "A\'project,region,firewall_policy_resourc" - + "e\212N\020RegionOperations\022\321\001\n\004List\022A.google.c" - + "loud.compute.v1.ListRegionNetworkFirewal" - + "lPoliciesRequest\032+.google.cloud.compute." - + "v1.FirewallPolicyList\"Y\202\323\344\223\002B\022@/compute/" - + "v1/projects/{project}/regions/{region}/f" - + "irewallPolicies\332A\016project,region\022\261\002\n\005Pat" - + "ch\022@.google.cloud.compute.v1.PatchRegion" - + "NetworkFirewallPolicyRequest\032\".google.cl" - + "oud.compute.v1.Operation\"\301\001\202\323\344\223\002n2R/comp" - + "ute/v1/projects/{project}/regions/{regio" - + "n}/firewallPolicies/{firewall_policy}:\030f" - + "irewall_policy_resource\332A7project,region" - + ",firewall_policy,firewall_policy_resourc" - + "e\212N\020RegionOperations\022\315\002\n\tPatchRule\022D.goo" - + "gle.cloud.compute.v1.PatchRuleRegionNetw" - + "orkFirewallPolicyRequest\032\".google.cloud." - + "compute.v1.Operation\"\325\001\202\323\344\223\002}\"\\/compute/" - + "v1/projects/{project}/regions/{region}/f" - + "irewallPolicies/{firewall_policy}/patchR" - + "ule:\035firewall_policy_rule_resource\332A.google.cloud.compute.v" + + "1.GetRegionNetworkFirewallPolicyRequest\032" + + "\'.google.cloud.compute.v1.FirewallPolicy" + + "\"{\202\323\344\223\002T\022R/compute/v1/projects/{project}" + + "/regions/{region}/firewallPolicies/{fire" + + "wall_policy}\332A\036project,region,firewall_p" + + "olicy\022\234\002\n\016GetAssociation\022I.google.cloud." + + "compute.v1.GetAssociationRegionNetworkFi" + + "rewallPolicyRequest\0322.google.cloud.compu" + + "te.v1.FirewallPolicyAssociation\"\212\001\202\323\344\223\002c" + + "\022a/compute/v1/projects/{project}/regions" + + "/{region}/firewallPolicies/{firewall_pol" + + "icy}/getAssociation\332A\036project,region,fir" + + "ewall_policy\022\267\002\n\025GetEffectiveFirewalls\022P" + + ".google.cloud.compute.v1.GetEffectiveFir" + + "ewallsRegionNetworkFirewallPolicyRequest" + + "\032S.google.cloud.compute.v1.RegionNetwork" + + "FirewallPoliciesGetEffectiveFirewallsRes" + + "ponse\"w\202\323\344\223\002X\022V/compute/v1/projects/{pro" + + "ject}/regions/{region}/firewallPolicies/" + + "getEffectiveFirewalls\332A\026project,region,n" + + "etwork\022\364\001\n\014GetIamPolicy\022G.google.cloud.c" + + "ompute.v1.GetIamPolicyRegionNetworkFirew" + + "allPolicyRequest\032\037.google.cloud.compute." + + "v1.Policy\"z\202\323\344\223\002Z\022X/compute/v1/projects/" + + "{project}/regions/{region}/firewallPolic" + + "ies/{resource}/getIamPolicy\332A\027project,re" + + "gion,resource\022\200\002\n\007GetRule\022B.google.cloud" + + ".compute.v1.GetRuleRegionNetworkFirewall" + + "PolicyRequest\032+.google.cloud.compute.v1." + + "FirewallPolicyRule\"\203\001\202\323\344\223\002\\\022Z/compute/v1" + + "/projects/{project}/regions/{region}/fir" + + "ewallPolicies/{firewall_policy}/getRule\332" + + "A\036project,region,firewall_policy\022\221\002\n\006Ins" + + "ert\022A.google.cloud.compute.v1.InsertRegi" + + "onNetworkFirewallPolicyRequest\032\".google." + + "cloud.compute.v1.Operation\"\237\001\202\323\344\223\002\\\"@/co" + + "mpute/v1/projects/{project}/regions/{reg" + + "ion}/firewallPolicies:\030firewall_policy_r" + + "esource\332A\'project,region,firewall_policy" + + "_resource\212N\020RegionOperations\022\321\001\n\004List\022A." + + "google.cloud.compute.v1.ListRegionNetwor" + + "kFirewallPoliciesRequest\032+.google.cloud." + + "compute.v1.FirewallPolicyList\"Y\202\323\344\223\002B\022@/" + + "compute/v1/projects/{project}/regions/{r" + + "egion}/firewallPolicies\332A\016project,region" + + "\022\261\002\n\005Patch\022@.google.cloud.compute.v1.Pat" + + "chRegionNetworkFirewallPolicyRequest\032\".g" + + "oogle.cloud.compute.v1.Operation\"\301\001\202\323\344\223\002" + + "n2R/compute/v1/projects/{project}/region" + + "s/{region}/firewallPolicies/{firewall_po" + + "licy}:\030firewall_policy_resource\332A7projec" + + "t,region,firewall_policy,firewall_policy" + + "_resource\212N\020RegionOperations\022\315\002\n\tPatchRu" + + "le\022D.google.cloud.compute.v1.PatchRuleRe" + + "gionNetworkFirewallPolicyRequest\032\".googl" + + "e.cloud.compute.v1.Operation\"\325\001\202\323\344\223\002}\"\\/" + + "compute/v1/projects/{project}/regions/{r" + + "egion}/firewallPolicies/{firewall_policy" + + "}/patchRule:\035firewall_policy_rule_resour" + + "ce\332A.google.cloud.compute.v1.SetUrlMa" - + "pRegionTargetHttpProxyRequest\032\".google.c" - + "loud.compute.v1.Operation\"\324\001\202\323\344\223\002}\"_/com" + + "n}/sslCertificates\332A\016project,region\032r\312A\026" + + "compute.googleapis.com\322AVhttps://www.goo" + + "gleapis.com/auth/compute,https://www.goo" + + "gleapis.com/auth/cloud-platform2\225\014\n\021Regi" + + "onSslPolicies\022\344\001\n\006Delete\0225.google.cloud." + + "compute.v1.DeleteRegionSslPolicyRequest\032" + + "\".google.cloud.compute.v1.Operation\"\177\202\323\344" + + "\223\002J*H/compute/v1/projects/{project}/regi" + + "ons/{region}/sslPolicies/{ssl_policy}\332A\031" + + "project,region,ssl_policy\212N\020RegionOperat" + + "ions\022\313\001\n\003Get\0222.google.cloud.compute.v1.G" + + "etRegionSslPolicyRequest\032\".google.cloud." + + "compute.v1.SslPolicy\"l\202\323\344\223\002J\022H/compute/v" + + "1/projects/{project}/regions/{region}/ss" + + "lPolicies/{ssl_policy}\332A\031project,region," + + "ssl_policy\022\366\001\n\006Insert\0225.google.cloud.com" + + "pute.v1.InsertRegionSslPolicyRequest\032\".g" + + "oogle.cloud.compute.v1.Operation\"\220\001\202\323\344\223\002" + + "R\";/compute/v1/projects/{project}/region" + + "s/{region}/sslPolicies:\023ssl_policy_resou" + + "rce\332A\"project,region,ssl_policy_resource" + + "\212N\020RegionOperations\022\275\001\n\004List\0225.google.cl" + + "oud.compute.v1.ListRegionSslPoliciesRequ" + + "est\032(.google.cloud.compute.v1.SslPolicie" + + "sList\"T\202\323\344\223\002=\022;/compute/v1/projects/{pro" + + "ject}/regions/{region}/sslPolicies\332A\016pro" + + "ject,region\022\216\002\n\025ListAvailableFeatures\022F." + + "google.cloud.compute.v1.ListAvailableFea" + + "turesRegionSslPoliciesRequest\032A.google.c" + + "loud.compute.v1.SslPoliciesListAvailable" + + "FeaturesResponse\"j\202\323\344\223\002S\022Q/compute/v1/pr" + + "ojects/{project}/regions/{region}/sslPol" + + "icies/listAvailableFeatures\332A\016project,re" + + "gion\022\214\002\n\005Patch\0224.google.cloud.compute.v1" + + ".PatchRegionSslPolicyRequest\032\".google.cl" + + "oud.compute.v1.Operation\"\250\001\202\323\344\223\002_2H/comp" + + "ute/v1/projects/{project}/regions/{regio" + + "n}/sslPolicies/{ssl_policy}:\023ssl_policy_" + + "resource\332A-project,region,ssl_policy,ssl" + + "_policy_resource\212N\020RegionOperations\032r\312A\026" + + "compute.googleapis.com\322AVhttps://www.goo" + + "gleapis.com/auth/compute,https://www.goo" + + "gleapis.com/auth/cloud-platform2\252\013\n\027Regi" + + "onTargetHttpProxies\022\377\001\n\006Delete\022;.google." + + "cloud.compute.v1.DeleteRegionTargetHttpP" + + "roxyRequest\032\".google.cloud.compute.v1.Op" + + "eration\"\223\001\202\323\344\223\002W*U/compute/v1/projects/{" + + "project}/regions/{region}/targetHttpProx" + + "ies/{target_http_proxy}\332A project,region" + + ",target_http_proxy\212N\020RegionOperations\022\354\001" + + "\n\003Get\0228.google.cloud.compute.v1.GetRegio" + + "nTargetHttpProxyRequest\032(.google.cloud.c" + + "ompute.v1.TargetHttpProxy\"\200\001\202\323\344\223\002W\022U/com" + "pute/v1/projects/{project}/regions/{regi" + "on}/targetHttpProxies/{target_http_proxy" - + "}/setUrlMap:\032url_map_reference_resource\332" - + "A;project,region,target_http_proxy,url_m" - + "ap_reference_resource\212N\020RegionOperations" - + "\032r\312A\026compute.googleapis.com\322AVhttps://ww" - + "w.googleapis.com/auth/compute,https://ww" - + "w.googleapis.com/auth/cloud-platform2\263\021\n" - + "\030RegionTargetHttpsProxies\022\203\002\n\006Delete\022<.g" - + "oogle.cloud.compute.v1.DeleteRegionTarge" - + "tHttpsProxyRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\226\001\202\323\344\223\002Y*W/compute/v1/pro" - + "jects/{project}/regions/{region}/targetH" - + "ttpsProxies/{target_https_proxy}\332A!proje" - + "ct,region,target_https_proxy\212N\020RegionOpe" - + "rations\022\361\001\n\003Get\0229.google.cloud.compute.v" - + "1.GetRegionTargetHttpsProxyRequest\032).goo" - + "gle.cloud.compute.v1.TargetHttpsProxy\"\203\001" - + "\202\323\344\223\002Y\022W/compute/v1/projects/{project}/r" - + "egions/{region}/targetHttpsProxies/{targ" - + "et_https_proxy}\332A!project,region,target_" - + "https_proxy\022\224\002\n\006Insert\022<.google.cloud.co" - + "mpute.v1.InsertRegionTargetHttpsProxyReq" - + "uest\032\".google.cloud.compute.v1.Operation" - + "\"\247\001\202\323\344\223\002a\"B/compute/v1/projects/{project" - + "}/regions/{region}/targetHttpsProxies:\033t" - + "arget_https_proxy_resource\332A*project,reg" - + "ion,target_https_proxy_resource\212N\020Region" - + "Operations\022\320\001\n\004List\022<.google.cloud.compu" - + "te.v1.ListRegionTargetHttpsProxiesReques" - + "t\032-.google.cloud.compute.v1.TargetHttpsP" - + "roxyList\"[\202\323\344\223\002D\022B/compute/v1/projects/{" - + "project}/regions/{region}/targetHttpsPro" - + "xies\332A\016project,region\022\272\002\n\005Patch\022;.google" - + ".cloud.compute.v1.PatchRegionTargetHttps" + + "}\332A project,region,target_http_proxy\022\220\002\n" + + "\006Insert\022;.google.cloud.compute.v1.Insert" + + "RegionTargetHttpProxyRequest\032\".google.cl" + + "oud.compute.v1.Operation\"\244\001\202\323\344\223\002_\"A/comp" + + "ute/v1/projects/{project}/regions/{regio" + + "n}/targetHttpProxies:\032target_http_proxy_" + + "resource\332A)project,region,target_http_pr" + + "oxy_resource\212N\020RegionOperations\022\315\001\n\004List" + + "\022;.google.cloud.compute.v1.ListRegionTar" + + "getHttpProxiesRequest\032,.google.cloud.com" + + "pute.v1.TargetHttpProxyList\"Z\202\323\344\223\002C\022A/co" + + "mpute/v1/projects/{project}/regions/{reg" + + "ion}/targetHttpProxies\332A\016project,region\022" + + "\306\002\n\tSetUrlMap\022>.google.cloud.compute.v1." + + "SetUrlMapRegionTargetHttpProxyRequest\032\"." + + "google.cloud.compute.v1.Operation\"\324\001\202\323\344\223" + + "\002}\"_/compute/v1/projects/{project}/regio" + + "ns/{region}/targetHttpProxies/{target_ht" + + "tp_proxy}/setUrlMap:\032url_map_reference_r" + + "esource\332A;project,region,target_http_pro" + + "xy,url_map_reference_resource\212N\020RegionOp" + + "erations\032r\312A\026compute.googleapis.com\322AVht" + + "tps://www.googleapis.com/auth/compute,ht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "form2\263\021\n\030RegionTargetHttpsProxies\022\203\002\n\006De" + + "lete\022<.google.cloud.compute.v1.DeleteReg" + + "ionTargetHttpsProxyRequest\032\".google.clou" + + "d.compute.v1.Operation\"\226\001\202\323\344\223\002Y*W/comput" + + "e/v1/projects/{project}/regions/{region}" + + "/targetHttpsProxies/{target_https_proxy}" + + "\332A!project,region,target_https_proxy\212N\020R" + + "egionOperations\022\361\001\n\003Get\0229.google.cloud.c" + + "ompute.v1.GetRegionTargetHttpsProxyReque" + + "st\032).google.cloud.compute.v1.TargetHttps" + + "Proxy\"\203\001\202\323\344\223\002Y\022W/compute/v1/projects/{pr" + + "oject}/regions/{region}/targetHttpsProxi" + + "es/{target_https_proxy}\332A!project,region" + + ",target_https_proxy\022\224\002\n\006Insert\022<.google." + + "cloud.compute.v1.InsertRegionTargetHttps" + "ProxyRequest\032\".google.cloud.compute.v1.O" - + "peration\"\317\001\202\323\344\223\002v2W/compute/v1/projects/" + + "peration\"\247\001\202\323\344\223\002a\"B/compute/v1/projects/" + "{project}/regions/{region}/targetHttpsPr" - + "oxies/{target_https_proxy}:\033target_https" - + "_proxy_resource\332A=project,region,target_" - + "https_proxy,target_https_proxy_resource\212" - + "N\020RegionOperations\022\264\003\n\022SetSslCertificate" - + "s\022H.google.cloud.compute.v1.SetSslCertif" - + "icatesRegionTargetHttpsProxyRequest\032\".go" - + "ogle.cloud.compute.v1.Operation\"\257\002\202\323\344\223\002\257" - + "\001\"j/compute/v1/projects/{project}/region" - + "s/{region}/targetHttpsProxies/{target_ht" - + "tps_proxy}/setSslCertificates:Aregion_ta" - + "rget_https_proxies_set_ssl_certificates_" - + "request_resource\332Acproject,region,target" - + "_https_proxy,region_target_https_proxies" - + "_set_ssl_certificates_request_resource\212N" - + "\020RegionOperations\022\312\002\n\tSetUrlMap\022?.google" - + ".cloud.compute.v1.SetUrlMapRegionTargetH" - + "ttpsProxyRequest\032\".google.cloud.compute." - + "v1.Operation\"\327\001\202\323\344\223\002\177\"a/compute/v1/proje" - + "cts/{project}/regions/{region}/targetHtt" - + "psProxies/{target_https_proxy}/setUrlMap" - + ":\032url_map_reference_resource\332A.google.cloud.c" - + "ompute.v1.AggregatedListResourcePolicies" - + "Request\0325.google.cloud.compute.v1.Resour" - + "cePolicyAggregatedList\"L\202\323\344\223\002<\022:/compute" - + "/v1/projects/{project}/aggregated/resour" - + "cePolicies\332A\007project\022\363\001\n\006Delete\0224.google" - + ".cloud.compute.v1.DeleteResourcePolicyRe" + + "/validate:)region_url_maps_validate_requ" + + "est_resource\332A@project,region,url_map,re" + + "gion_url_maps_validate_request_resource\032" + + "r\312A\026compute.googleapis.com\322AVhttps://www" + + ".googleapis.com/auth/compute,https://www" + + ".googleapis.com/auth/cloud-platform2\343\003\n\007" + + "Regions\022\233\001\n\003Get\022).google.cloud.compute.v" + + "1.GetRegionRequest\032\037.google.cloud.comput" + + "e.v1.Region\"H\202\323\344\223\0021\022//compute/v1/project" + + "s/{project}/regions/{region}\332A\016project,r" + + "egion\022\222\001\n\004List\022+.google.cloud.compute.v1" + + ".ListRegionsRequest\032#.google.cloud.compu" + + "te.v1.RegionList\"8\202\323\344\223\002(\022&/compute/v1/pr" + + "ojects/{project}/regions\332A\007project\032\244\001\312A\026" + + "compute.googleapis.com\322A\207\001https://www.go" + + "ogleapis.com/auth/compute.readonly,https" + + "://www.googleapis.com/auth/compute,https" + + "://www.googleapis.com/auth/cloud-platfor" + + "m2\233\024\n\014Reservations\022\312\001\n\016AggregatedList\022:." + + "google.cloud.compute.v1.AggregatedListRe" + + "servationsRequest\0322.google.cloud.compute" + + ".v1.ReservationAggregatedList\"H\202\323\344\223\0028\0226/" + + "compute/v1/projects/{project}/aggregated" + + "/reservations\332A\007project\022\333\001\n\006Delete\0221.goo" + + "gle.cloud.compute.v1.DeleteReservationRe" + "quest\032\".google.cloud.compute.v1.Operatio" - + "n\"\216\001\202\323\344\223\002T*R/compute/v1/projects/{projec" - + "t}/regions/{region}/resourcePolicies/{re" - + "source_policy}\332A\036project,region,resource" - + "_policy\212N\020RegionOperations\022\336\001\n\003Get\0221.goo" - + "gle.cloud.compute.v1.GetResourcePolicyRe" - + "quest\032\'.google.cloud.compute.v1.Resource" - + "Policy\"{\202\323\344\223\002T\022R/compute/v1/projects/{pr" - + "oject}/regions/{region}/resourcePolicies" - + "/{resource_policy}\332A\036project,region,reso" - + "urce_policy\022\347\001\n\014GetIamPolicy\022:.google.cl" - + "oud.compute.v1.GetIamPolicyResourcePolic" - + "yRequest\032\037.google.cloud.compute.v1.Polic" - + "y\"z\202\323\344\223\002Z\022X/compute/v1/projects/{project" - + "}/regions/{region}/resourcePolicies/{res" - + "ource}/getIamPolicy\332A\027project,region,res" - + "ource\022\204\002\n\006Insert\0224.google.cloud.compute." - + "v1.InsertResourcePolicyRequest\032\".google." - + "cloud.compute.v1.Operation\"\237\001\202\323\344\223\002\\\"@/co" - + "mpute/v1/projects/{project}/regions/{reg" - + "ion}/resourcePolicies:\030resource_policy_r" - + "esource\332A\'project,region,resource_policy" - + "_resource\212N\020RegionOperations\022\304\001\n\004List\0224." - + "google.cloud.compute.v1.ListResourcePoli" - + "ciesRequest\032+.google.cloud.compute.v1.Re" - + "sourcePolicyList\"Y\202\323\344\223\002B\022@/compute/v1/pr" - + "ojects/{project}/regions/{region}/resour" - + "cePolicies\332A\016project,region\022\257\002\n\014SetIamPo" - + "licy\022:.google.cloud.compute.v1.SetIamPol" - + "icyResourcePolicyRequest\032\037.google.cloud." - + "compute.v1.Policy\"\301\001\202\323\344\223\002~\"X/compute/v1/" - + "projects/{project}/regions/{region}/reso" - + "urcePolicies/{resource}/setIamPolicy:\"re" - + "gion_set_policy_request_resource\332A:proje" - + "ct,region,resource,region_set_policy_req" - + "uest_resource\022\321\002\n\022TestIamPermissions\022@.g" - + "oogle.cloud.compute.v1.TestIamPermission" - + "sResourcePolicyRequest\0320.google.cloud.co" - + "mpute.v1.TestPermissionsResponse\"\306\001\202\323\344\223\002" - + "\203\001\"^/compute/v1/projects/{project}/regio" - + "ns/{region}/resourcePolicies/{resource}/" - + "testIamPermissions:!test_permissions_req" - + "uest_resource\332A9project,region,resource," - + "test_permissions_request_resource\032r\312A\026co" - + "mpute.googleapis.com\322AVhttps://www.googl" - + "eapis.com/auth/compute,https://www.googl" - + "eapis.com/auth/cloud-platform2\226\022\n\007Router" - + "s\022\273\001\n\016AggregatedList\0225.google.cloud.comp" - + "ute.v1.AggregatedListRoutersRequest\032-.go" - + "ogle.cloud.compute.v1.RouterAggregatedLi" - + "st\"C\202\323\344\223\0023\0221/compute/v1/projects/{projec" - + "t}/aggregated/routers\332A\007project\022\317\001\n\006Dele" - + "te\022,.google.cloud.compute.v1.DeleteRoute" - + "rRequest\032\".google.cloud.compute.v1.Opera" - + "tion\"s\202\323\344\223\002B*@/compute/v1/projects/{proj" - + "ect}/regions/{region}/routers/{router}\332A" - + "\025project,region,router\212N\020RegionOperation" - + "s\022\263\001\n\003Get\022).google.cloud.compute.v1.GetR" - + "outerRequest\032\037.google.cloud.compute.v1.R" - + "outer\"`\202\323\344\223\002B\022@/compute/v1/projects/{pro" - + "ject}/regions/{region}/routers/{router}\332" - + "A\025project,region,router\022\365\001\n\021GetNatMappin" - + "gInfo\0228.google.cloud.compute.v1.GetNatMa" - + "ppingInfoRoutersRequest\0322.google.cloud.c" - + "ompute.v1.VmEndpointNatMappingsList\"r\202\323\344" - + "\223\002T\022R/compute/v1/projects/{project}/regi" - + "ons/{region}/routers/{router}/getNatMapp" - + "ingInfo\332A\025project,region,router\022\351\001\n\017GetR" - + "outerStatus\0225.google.cloud.compute.v1.Ge" - + "tRouterStatusRouterRequest\032-.google.clou" - + "d.compute.v1.RouterStatusResponse\"p\202\323\344\223\002" - + "R\022P/compute/v1/projects/{project}/region" - + "s/{region}/routers/{router}/getRouterSta" - + "tus\332A\025project,region,router\022\341\001\n\006Insert\022," - + ".google.cloud.compute.v1.InsertRouterReq" - + "uest\032\".google.cloud.compute.v1.Operation" - + "\"\204\001\202\323\344\223\002J\"7/compute/v1/projects/{project" - + "}/regions/{region}/routers:\017router_resou" - + "rce\332A\036project,region,router_resource\212N\020R" - + "egionOperations\022\252\001\n\004List\022+.google.cloud." - + "compute.v1.ListRoutersRequest\032#.google.c" - + "loud.compute.v1.RouterList\"P\202\323\344\223\0029\0227/com" + + "n\"z\202\323\344\223\002H*F/compute/v1/projects/{project" + + "}/zones/{zone}/reservations/{reservation" + + "}\332A\030project,zone,reservation\212N\016ZoneOpera" + + "tions\022\306\001\n\003Get\022..google.cloud.compute.v1." + + "GetReservationRequest\032$.google.cloud.com" + + "pute.v1.Reservation\"i\202\323\344\223\002H\022F/compute/v1" + + "/projects/{project}/zones/{zone}/reserva" + + "tions/{reservation}\332A\030project,zone,reser" + + "vation\022\332\001\n\014GetIamPolicy\0227.google.cloud.c" + + "ompute.v1.GetIamPolicyReservationRequest" + + "\032\037.google.cloud.compute.v1.Policy\"p\202\323\344\223\002" + + "R\022P/compute/v1/projects/{project}/zones/" + + "{zone}/reservations/{resource}/getIamPol" + + "icy\332A\025project,zone,resource\022\355\001\n\006Insert\0221" + + ".google.cloud.compute.v1.InsertReservati" + + "onRequest\032\".google.cloud.compute.v1.Oper" + + "ation\"\213\001\202\323\344\223\002P\"8/compute/v1/projects/{pr" + + "oject}/zones/{zone}/reservations:\024reserv" + + "ation_resource\332A!project,zone,reservatio" + + "n_resource\212N\016ZoneOperations\022\263\001\n\004List\0220.g" + + "oogle.cloud.compute.v1.ListReservationsR" + + "equest\032(.google.cloud.compute.v1.Reserva" + + "tionList\"O\202\323\344\223\002:\0228/compute/v1/projects/{" + + "project}/zones/{zone}/reservations\332A\014pro" + + "ject,zone\022\256\002\n\006Resize\0221.google.cloud.comp" + + "ute.v1.ResizeReservationRequest\032\".google" + + ".cloud.compute.v1.Operation\"\314\001\202\323\344\223\002u\"M/c" + + "ompute/v1/projects/{project}/zones/{zone" + + "}/reservations/{reservation}/resize:$res" + + "ervations_resize_request_resource\332A=proj" + + "ect,zone,reservation,reservations_resize" + + "_request_resource\212N\016ZoneOperations\022\236\002\n\014S" + + "etIamPolicy\0227.google.cloud.compute.v1.Se" + + "tIamPolicyReservationRequest\032\037.google.cl" + + "oud.compute.v1.Policy\"\263\001\202\323\344\223\002t\"P/compute" + + "/v1/projects/{project}/zones/{zone}/rese" + + "rvations/{resource}/setIamPolicy: zone_s" + + "et_policy_request_resource\332A6project,zon" + + "e,resource,zone_set_policy_request_resou" + + "rce\022\303\002\n\022TestIamPermissions\022=.google.clou" + + "d.compute.v1.TestIamPermissionsReservati" + + "onRequest\0320.google.cloud.compute.v1.Test" + + "PermissionsResponse\"\273\001\202\323\344\223\002{\"V/compute/v" + + "1/projects/{project}/zones/{zone}/reserv" + + "ations/{resource}/testIamPermissions:!te" + + "st_permissions_request_resource\332A7projec" + + "t,zone,resource,test_permissions_request" + + "_resource\022\207\002\n\006Update\0221.google.cloud.comp" + + "ute.v1.UpdateReservationRequest\032\".google" + + ".cloud.compute.v1.Operation\"\245\001\202\323\344\223\002^2F/c" + + "ompute/v1/projects/{project}/zones/{zone" + + "}/reservations/{reservation}:\024reservatio" + + "n_resource\332A-project,zone,reservation,re" + + "servation_resource\212N\016ZoneOperations\032r\312A\026" + + "compute.googleapis.com\322AVhttps://www.goo" + + "gleapis.com/auth/compute,https://www.goo" + + "gleapis.com/auth/cloud-platform2\363\020\n\020Reso" + + "urcePolicies\022\325\001\n\016AggregatedList\022>.google" + + ".cloud.compute.v1.AggregatedListResource" + + "PoliciesRequest\0325.google.cloud.compute.v" + + "1.ResourcePolicyAggregatedList\"L\202\323\344\223\002<\022:" + + "/compute/v1/projects/{project}/aggregate" + + "d/resourcePolicies\332A\007project\022\363\001\n\006Delete\022" + + "4.google.cloud.compute.v1.DeleteResource" + + "PolicyRequest\032\".google.cloud.compute.v1." + + "Operation\"\216\001\202\323\344\223\002T*R/compute/v1/projects" + + "/{project}/regions/{region}/resourcePoli" + + "cies/{resource_policy}\332A\036project,region," + + "resource_policy\212N\020RegionOperations\022\336\001\n\003G" + + "et\0221.google.cloud.compute.v1.GetResource" + + "PolicyRequest\032\'.google.cloud.compute.v1." + + "ResourcePolicy\"{\202\323\344\223\002T\022R/compute/v1/proj" + + "ects/{project}/regions/{region}/resource" + + "Policies/{resource_policy}\332A\036project,reg" + + "ion,resource_policy\022\347\001\n\014GetIamPolicy\022:.g" + + "oogle.cloud.compute.v1.GetIamPolicyResou" + + "rcePolicyRequest\032\037.google.cloud.compute." + + "v1.Policy\"z\202\323\344\223\002Z\022X/compute/v1/projects/" + + "{project}/regions/{region}/resourcePolic" + + "ies/{resource}/getIamPolicy\332A\027project,re" + + "gion,resource\022\204\002\n\006Insert\0224.google.cloud." + + "compute.v1.InsertResourcePolicyRequest\032\"" + + ".google.cloud.compute.v1.Operation\"\237\001\202\323\344" + + "\223\002\\\"@/compute/v1/projects/{project}/regi" + + "ons/{region}/resourcePolicies:\030resource_" + + "policy_resource\332A\'project,region,resourc" + + "e_policy_resource\212N\020RegionOperations\022\304\001\n" + + "\004List\0224.google.cloud.compute.v1.ListReso" + + "urcePoliciesRequest\032+.google.cloud.compu" + + "te.v1.ResourcePolicyList\"Y\202\323\344\223\002B\022@/compu" + + "te/v1/projects/{project}/regions/{region" + + "}/resourcePolicies\332A\016project,region\022\257\002\n\014" + + "SetIamPolicy\022:.google.cloud.compute.v1.S" + + "etIamPolicyResourcePolicyRequest\032\037.googl" + + "e.cloud.compute.v1.Policy\"\301\001\202\323\344\223\002~\"X/com" + "pute/v1/projects/{project}/regions/{regi" - + "on}/routers\332A\016project,region\022\357\001\n\005Patch\022+" - + ".google.cloud.compute.v1.PatchRouterRequ" - + "est\032\".google.cloud.compute.v1.Operation\"" - + "\224\001\202\323\344\223\002S2@/compute/v1/projects/{project}" - + "/regions/{region}/routers/{router}:\017rout" - + "er_resource\332A%project,region,router,rout" - + "er_resource\212N\020RegionOperations\022\365\001\n\007Previ" - + "ew\022-.google.cloud.compute.v1.PreviewRout" - + "erRequest\032/.google.cloud.compute.v1.Rout" - + "ersPreviewResponse\"\211\001\202\323\344\223\002[\"H/compute/v1" - + "/projects/{project}/regions/{region}/rou" - + "ters/{router}/preview:\017router_resource\332A" - + "%project,region,router,router_resource\022\361" - + "\001\n\006Update\022,.google.cloud.compute.v1.Upda" - + "teRouterRequest\032\".google.cloud.compute.v" - + "1.Operation\"\224\001\202\323\344\223\002S\032@/compute/v1/projec" + + "on}/resourcePolicies/{resource}/setIamPo" + + "licy:\"region_set_policy_request_resource" + + "\332A:project,region,resource,region_set_po" + + "licy_request_resource\022\321\002\n\022TestIamPermiss" + + "ions\022@.google.cloud.compute.v1.TestIamPe" + + "rmissionsResourcePolicyRequest\0320.google." + + "cloud.compute.v1.TestPermissionsResponse" + + "\"\306\001\202\323\344\223\002\203\001\"^/compute/v1/projects/{projec" + + "t}/regions/{region}/resourcePolicies/{re" + + "source}/testIamPermissions:!test_permiss" + + "ions_request_resource\332A9project,region,r" + + "esource,test_permissions_request_resourc" + + "e\032r\312A\026compute.googleapis.com\322AVhttps://w" + + "ww.googleapis.com/auth/compute,https://w" + + "ww.googleapis.com/auth/cloud-platform2\226\022" + + "\n\007Routers\022\273\001\n\016AggregatedList\0225.google.cl" + + "oud.compute.v1.AggregatedListRoutersRequ" + + "est\032-.google.cloud.compute.v1.RouterAggr" + + "egatedList\"C\202\323\344\223\0023\0221/compute/v1/projects" + + "/{project}/aggregated/routers\332A\007project\022" + + "\317\001\n\006Delete\022,.google.cloud.compute.v1.Del" + + "eteRouterRequest\032\".google.cloud.compute." + + "v1.Operation\"s\202\323\344\223\002B*@/compute/v1/projec" + "ts/{project}/regions/{region}/routers/{r" - + "outer}:\017router_resource\332A%project,region" - + ",router,router_resource\212N\020RegionOperatio" - + "ns\032r\312A\026compute.googleapis.com\322AVhttps://" - + "www.googleapis.com/auth/compute,https://" - + "www.googleapis.com/auth/cloud-platform2\300" - + "\006\n\006Routes\022\272\001\n\006Delete\022+.google.cloud.comp" - + "ute.v1.DeleteRouteRequest\032\".google.cloud" - + ".compute.v1.Operation\"_\202\323\344\223\0026*4/compute/" - + "v1/projects/{project}/global/routes/{rou" - + "te}\332A\rproject,route\212N\020GlobalOperations\022\235" - + "\001\n\003Get\022(.google.cloud.compute.v1.GetRout" - + "eRequest\032\036.google.cloud.compute.v1.Route" - + "\"L\202\323\344\223\0026\0224/compute/v1/projects/{project}" - + "/global/routes/{route}\332A\rproject,route\022\313" - + "\001\n\006Insert\022+.google.cloud.compute.v1.Inse" - + "rtRouteRequest\032\".google.cloud.compute.v1" - + ".Operation\"p\202\323\344\223\002>\",/compute/v1/projects" - + "/{project}/global/routes:\016route_resource" - + "\332A\026project,route_resource\212N\020GlobalOperat" - + "ions\022\226\001\n\004List\022*.google.cloud.compute.v1." - + "ListRoutesRequest\032\".google.cloud.compute" - + ".v1.RouteList\">\202\323\344\223\002.\022,/compute/v1/proje" - + "cts/{project}/global/routes\332A\007project\032r\312" - + "A\026compute.googleapis.com\322AVhttps://www.g" - + "oogleapis.com/auth/compute,https://www.g" - + "oogleapis.com/auth/cloud-platform2\357\030\n\020Se" - + "curityPolicies\022\251\002\n\007AddRule\0225.google.clou" - + "d.compute.v1.AddRuleSecurityPolicyReques" - + "t\032\".google.cloud.compute.v1.Operation\"\302\001" - + "\202\323\344\223\002q\"P/compute/v1/projects/{project}/g" - + "lobal/securityPolicies/{security_policy}" - + "/addRule:\035security_policy_rule_resource\332" - + "A5project,security_policy,security_polic" - + "y_rule_resource\212N\020GlobalOperations\022\327\001\n\016A" - + "ggregatedList\022>.google.cloud.compute.v1." - + "AggregatedListSecurityPoliciesRequest\0327." - + "google.cloud.compute.v1.SecurityPolicies" - + "AggregatedList\"L\202\323\344\223\002<\022:/compute/v1/proj" - + "ects/{project}/aggregated/securityPolici" - + "es\332A\007project\022\341\001\n\006Delete\0224.google.cloud.c" - + "ompute.v1.DeleteSecurityPolicyRequest\032\"." - + "google.cloud.compute.v1.Operation\"}\202\323\344\223\002" - + "J*H/compute/v1/projects/{project}/global" - + "/securityPolicies/{security_policy}\332A\027pr" - + "oject,security_policy\212N\020GlobalOperations" - + "\022\315\001\n\003Get\0221.google.cloud.compute.v1.GetSe" - + "curityPolicyRequest\032\'.google.cloud.compu" - + "te.v1.SecurityPolicy\"j\202\323\344\223\002J\022H/compute/v" - + "1/projects/{project}/global/securityPoli" - + "cies/{security_policy}\332A\027project,securit" - + "y_policy\022\341\001\n\007GetRule\0225.google.cloud.comp" - + "ute.v1.GetRuleSecurityPolicyRequest\032+.go" - + "ogle.cloud.compute.v1.SecurityPolicyRule" - + "\"r\202\323\344\223\002R\022P/compute/v1/projects/{project}" - + "/global/securityPolicies/{security_polic" - + "y}/getRule\332A\027project,security_policy\022\363\001\n" - + "\006Insert\0224.google.cloud.compute.v1.Insert" - + "SecurityPolicyRequest\032\".google.cloud.com" - + "pute.v1.Operation\"\216\001\202\323\344\223\002R\"6/compute/v1/" - + "projects/{project}/global/securityPolici" - + "es:\030security_policy_resource\332A project,s" - + "ecurity_policy_resource\212N\020GlobalOperatio" - + "ns\022\263\001\n\004List\0224.google.cloud.compute.v1.Li" - + "stSecurityPoliciesRequest\032+.google.cloud" - + ".compute.v1.SecurityPolicyList\"H\202\323\344\223\0028\0226" - + "/compute/v1/projects/{project}/global/se" - + "curityPolicies\332A\007project\022\256\002\n\037ListPreconf" - + "iguredExpressionSets\022O.google.cloud.comp" - + "ute.v1.ListPreconfiguredExpressionSetsSe" - + "curityPoliciesRequest\032P.google.cloud.com" - + "pute.v1.SecurityPoliciesListPreconfigure" - + "dExpressionSetsResponse\"h\202\323\344\223\002X\022V/comput" - + "e/v1/projects/{project}/global/securityP" - + "olicies/listPreconfiguredExpressionSets\332" - + "A\007project\022\223\002\n\005Patch\0223.google.cloud.compu" - + "te.v1.PatchSecurityPolicyRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\260\001\202\323\344\223\002d2H/" - + "compute/v1/projects/{project}/global/sec" - + "urityPolicies/{security_policy}:\030securit" - + "y_policy_resource\332A0project,security_pol" - + "icy,security_policy_resource\212N\020GlobalOpe" - + "rations\022\257\002\n\tPatchRule\0227.google.cloud.com" - + "pute.v1.PatchRuleSecurityPolicyRequest\032\"" - + ".google.cloud.compute.v1.Operation\"\304\001\202\323\344" - + "\223\002s\"R/compute/v1/projects/{project}/glob" - + "al/securityPolicies/{security_policy}/pa" - + "tchRule:\035security_policy_rule_resource\332A" - + "5project,security_policy,security_policy" - + "_rule_resource\212N\020GlobalOperations\022\365\001\n\nRe" - + "moveRule\0228.google.cloud.compute.v1.Remov" - + "eRuleSecurityPolicyRequest\032\".google.clou" - + "d.compute.v1.Operation\"\210\001\202\323\344\223\002U\"S/comput" - + "e/v1/projects/{project}/global/securityP" - + "olicies/{security_policy}/removeRule\332A\027p" - + "roject,security_policy\212N\020GlobalOperation" - + "s\022\253\002\n\tSetLabels\0227.google.cloud.compute.v" - + "1.SetLabelsSecurityPolicyRequest\032\".googl" - + "e.cloud.compute.v1.Operation\"\300\001\202\323\344\223\002q\"K/" - + "compute/v1/projects/{project}/global/sec" - + "urityPolicies/{resource}/setLabels:\"glob" - + "al_set_labels_request_resource\332A3project" - + ",resource,global_set_labels_request_reso" - + "urce\212N\020GlobalOperations\032r\312A\026compute.goog" - + "leapis.com\322AVhttps://www.googleapis.com/" - + "auth/compute,https://www.googleapis.com/" - + "auth/cloud-platform2\360\023\n\022ServiceAttachmen" - + "ts\022\334\001\n\016AggregatedList\022@.google.cloud.com" - + "pute.v1.AggregatedListServiceAttachments" - + "Request\0328.google.cloud.compute.v1.Servic" - + "eAttachmentAggregatedList\"N\202\323\344\223\002>\022/compute/v1/proj" - + "ects/{project}/global/sslPolicies/{ssl_p" - + "olicy}\332A\022project,ssl_policy\212N\020GlobalOper" - + "ations\022\264\001\n\003Get\022,.google.cloud.compute.v1" - + ".GetSslPolicyRequest\032\".google.cloud.comp" - + "ute.v1.SslPolicy\"[\202\323\344\223\002@\022>/compute/v1/pr" - + "ojects/{project}/global/sslPolicies/{ssl" - + "_policy}\332A\022project,ssl_policy\022\336\001\n\006Insert" - + "\022/.google.cloud.compute.v1.InsertSslPoli" + + "atform2\300\006\n\006Routes\022\272\001\n\006Delete\022+.google.cl" + + "oud.compute.v1.DeleteRouteRequest\032\".goog" + + "le.cloud.compute.v1.Operation\"_\202\323\344\223\0026*4/" + + "compute/v1/projects/{project}/global/rou" + + "tes/{route}\332A\rproject,route\212N\020GlobalOper" + + "ations\022\235\001\n\003Get\022(.google.cloud.compute.v1" + + ".GetRouteRequest\032\036.google.cloud.compute." + + "v1.Route\"L\202\323\344\223\0026\0224/compute/v1/projects/{" + + "project}/global/routes/{route}\332A\rproject" + + ",route\022\313\001\n\006Insert\022+.google.cloud.compute" + + ".v1.InsertRouteRequest\032\".google.cloud.co" + + "mpute.v1.Operation\"p\202\323\344\223\002>\",/compute/v1/" + + "projects/{project}/global/routes:\016route_" + + "resource\332A\026project,route_resource\212N\020Glob" + + "alOperations\022\226\001\n\004List\022*.google.cloud.com" + + "pute.v1.ListRoutesRequest\032\".google.cloud" + + ".compute.v1.RouteList\">\202\323\344\223\002.\022,/compute/" + + "v1/projects/{project}/global/routes\332A\007pr" + + "oject\032r\312A\026compute.googleapis.com\322AVhttps" + + "://www.googleapis.com/auth/compute,https" + + "://www.googleapis.com/auth/cloud-platfor" + + "m2\357\030\n\020SecurityPolicies\022\251\002\n\007AddRule\0225.goo" + + "gle.cloud.compute.v1.AddRuleSecurityPoli" + "cyRequest\032\".google.cloud.compute.v1.Oper" - + "ation\"\177\202\323\344\223\002H\"1/compute/v1/projects/{pro" - + "ject}/global/sslPolicies:\023ssl_policy_res" - + "ource\332A\033project,ssl_policy_resource\212N\020Gl" - + "obalOperations\022\246\001\n\004List\022/.google.cloud.c" - + "ompute.v1.ListSslPoliciesRequest\032(.googl" - + "e.cloud.compute.v1.SslPoliciesList\"C\202\323\344\223" - + "\0023\0221/compute/v1/projects/{project}/globa" - + "l/sslPolicies\332A\007project\022\367\001\n\025ListAvailabl" - + "eFeatures\022@.google.cloud.compute.v1.List" - + "AvailableFeaturesSslPoliciesRequest\032A.go" - + "ogle.cloud.compute.v1.SslPoliciesListAva" - + "ilableFeaturesResponse\"Y\202\323\344\223\002I\022G/compute" + + "ation\"\302\001\202\323\344\223\002q\"P/compute/v1/projects/{pr" + + "oject}/global/securityPolicies/{security" + + "_policy}/addRule:\035security_policy_rule_r" + + "esource\332A5project,security_policy,securi" + + "ty_policy_rule_resource\212N\020GlobalOperatio" + + "ns\022\327\001\n\016AggregatedList\022>.google.cloud.com" + + "pute.v1.AggregatedListSecurityPoliciesRe" + + "quest\0327.google.cloud.compute.v1.Security" + + "PoliciesAggregatedList\"L\202\323\344\223\002<\022:/compute" + + "/v1/projects/{project}/aggregated/securi" + + "tyPolicies\332A\007project\022\341\001\n\006Delete\0224.google" + + ".cloud.compute.v1.DeleteSecurityPolicyRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"}\202\323\344\223\002J*H/compute/v1/projects/{project" + + "}/global/securityPolicies/{security_poli" + + "cy}\332A\027project,security_policy\212N\020GlobalOp" + + "erations\022\315\001\n\003Get\0221.google.cloud.compute." + + "v1.GetSecurityPolicyRequest\032\'.google.clo" + + "ud.compute.v1.SecurityPolicy\"j\202\323\344\223\002J\022H/c" + + "ompute/v1/projects/{project}/global/secu" + + "rityPolicies/{security_policy}\332A\027project" + + ",security_policy\022\341\001\n\007GetRule\0225.google.cl" + + "oud.compute.v1.GetRuleSecurityPolicyRequ" + + "est\032+.google.cloud.compute.v1.SecurityPo" + + "licyRule\"r\202\323\344\223\002R\022P/compute/v1/projects/{" + + "project}/global/securityPolicies/{securi" + + "ty_policy}/getRule\332A\027project,security_po" + + "licy\022\363\001\n\006Insert\0224.google.cloud.compute.v" + + "1.InsertSecurityPolicyRequest\032\".google.c" + + "loud.compute.v1.Operation\"\216\001\202\323\344\223\002R\"6/com" + + "pute/v1/projects/{project}/global/securi" + + "tyPolicies:\030security_policy_resource\332A p" + + "roject,security_policy_resource\212N\020Global" + + "Operations\022\263\001\n\004List\0224.google.cloud.compu" + + "te.v1.ListSecurityPoliciesRequest\032+.goog" + + "le.cloud.compute.v1.SecurityPolicyList\"H" + + "\202\323\344\223\0028\0226/compute/v1/projects/{project}/g" + + "lobal/securityPolicies\332A\007project\022\256\002\n\037Lis" + + "tPreconfiguredExpressionSets\022O.google.cl" + + "oud.compute.v1.ListPreconfiguredExpressi" + + "onSetsSecurityPoliciesRequest\032P.google.c" + + "loud.compute.v1.SecurityPoliciesListPrec" + + "onfiguredExpressionSetsResponse\"h\202\323\344\223\002X\022" + + "V/compute/v1/projects/{project}/global/s" + + "ecurityPolicies/listPreconfiguredExpress" + + "ionSets\332A\007project\022\223\002\n\005Patch\0223.google.clo" + + "ud.compute.v1.PatchSecurityPolicyRequest" + + "\032\".google.cloud.compute.v1.Operation\"\260\001\202" + + "\323\344\223\002d2H/compute/v1/projects/{project}/gl" + + "obal/securityPolicies/{security_policy}:" + + "\030security_policy_resource\332A0project,secu" + + "rity_policy,security_policy_resource\212N\020G" + + "lobalOperations\022\257\002\n\tPatchRule\0227.google.c" + + "loud.compute.v1.PatchRuleSecurityPolicyR" + + "equest\032\".google.cloud.compute.v1.Operati" + + "on\"\304\001\202\323\344\223\002s\"R/compute/v1/projects/{proje" + + "ct}/global/securityPolicies/{security_po" + + "licy}/patchRule:\035security_policy_rule_re" + + "source\332A5project,security_policy,securit" + + "y_policy_rule_resource\212N\020GlobalOperation" + + "s\022\365\001\n\nRemoveRule\0228.google.cloud.compute." + + "v1.RemoveRuleSecurityPolicyRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\210\001\202\323\344\223\002U\"" + + "S/compute/v1/projects/{project}/global/s" + + "ecurityPolicies/{security_policy}/remove" + + "Rule\332A\027project,security_policy\212N\020GlobalO" + + "perations\022\253\002\n\tSetLabels\0227.google.cloud.c" + + "ompute.v1.SetLabelsSecurityPolicyRequest" + + "\032\".google.cloud.compute.v1.Operation\"\300\001\202" + + "\323\344\223\002q\"K/compute/v1/projects/{project}/gl" + + "obal/securityPolicies/{resource}/setLabe" + + "ls:\"global_set_labels_request_resource\332A" + + "3project,resource,global_set_labels_requ" + + "est_resource\212N\020GlobalOperations\032r\312A\026comp" + + "ute.googleapis.com\322AVhttps://www.googlea" + + "pis.com/auth/compute,https://www.googlea" + + "pis.com/auth/cloud-platform2\360\023\n\022ServiceA" + + "ttachments\022\334\001\n\016AggregatedList\022@.google.c" + + "loud.compute.v1.AggregatedListServiceAtt" + + "achmentsRequest\0328.google.cloud.compute.v" + + "1.ServiceAttachmentAggregatedList\"N\202\323\344\223\002" + + ">\022/compute" + "/v1/projects/{project}/global/sslPolicie" - + "s/listAvailableFeatures\332A\007project\022\365\001\n\005Pa" - + "tch\022..google.cloud.compute.v1.PatchSslPo" - + "licyRequest\032\".google.cloud.compute.v1.Op" - + "eration\"\227\001\202\323\344\223\002U2>/compute/v1/projects/{" - + "project}/global/sslPolicies/{ssl_policy}" - + ":\023ssl_policy_resource\332A&project,ssl_poli" - + "cy,ssl_policy_resource\212N\020GlobalOperation" - + "s\032r\312A\026compute.googleapis.com\322AVhttps://w" - + "ww.googleapis.com/auth/compute,https://w" - + "ww.googleapis.com/auth/cloud-platform2\335\031" - + "\n\013Subnetworks\022\307\001\n\016AggregatedList\0229.googl" - + "e.cloud.compute.v1.AggregatedListSubnetw" - + "orksRequest\0321.google.cloud.compute.v1.Su" - + "bnetworkAggregatedList\"G\202\323\344\223\0027\0225/compute" - + "/v1/projects/{project}/aggregated/subnet" - + "works\332A\007project\022\337\001\n\006Delete\0220.google.clou" - + "d.compute.v1.DeleteSubnetworkRequest\032\".g" - + "oogle.cloud.compute.v1.Operation\"\177\202\323\344\223\002J" - + "*H/compute/v1/projects/{project}/regions" - + "/{region}/subnetworks/{subnetwork}\332A\031pro" - + "ject,region,subnetwork\212N\020RegionOperation" - + "s\022\356\002\n\021ExpandIpCidrRange\022;.google.cloud.c" - + "ompute.v1.ExpandIpCidrRangeSubnetworkReq" + + "s/{ssl_policy}\332A\022project,ssl_policy\212N\020Gl" + + "obalOperations\022\264\001\n\003Get\022,.google.cloud.co" + + "mpute.v1.GetSslPolicyRequest\032\".google.cl" + + "oud.compute.v1.SslPolicy\"[\202\323\344\223\002@\022>/compu" + + "te/v1/projects/{project}/global/sslPolic" + + "ies/{ssl_policy}\332A\022project,ssl_policy\022\336\001" + + "\n\006Insert\022/.google.cloud.compute.v1.Inser" + + "tSslPolicyRequest\032\".google.cloud.compute" + + ".v1.Operation\"\177\202\323\344\223\002H\"1/compute/v1/proje" + + "cts/{project}/global/sslPolicies:\023ssl_po" + + "licy_resource\332A\033project,ssl_policy_resou" + + "rce\212N\020GlobalOperations\022\246\001\n\004List\022/.google" + + ".cloud.compute.v1.ListSslPoliciesRequest" + + "\032(.google.cloud.compute.v1.SslPoliciesLi" + + "st\"C\202\323\344\223\0023\0221/compute/v1/projects/{projec" + + "t}/global/sslPolicies\332A\007project\022\367\001\n\025List" + + "AvailableFeatures\022@.google.cloud.compute" + + ".v1.ListAvailableFeaturesSslPoliciesRequ" + + "est\032A.google.cloud.compute.v1.SslPolicie" + + "sListAvailableFeaturesResponse\"Y\202\323\344\223\002I\022G" + + "/compute/v1/projects/{project}/global/ss" + + "lPolicies/listAvailableFeatures\332A\007projec" + + "t\022\365\001\n\005Patch\022..google.cloud.compute.v1.Pa" + + "tchSslPolicyRequest\032\".google.cloud.compu" + + "te.v1.Operation\"\227\001\202\323\344\223\002U2>/compute/v1/pr" + + "ojects/{project}/global/sslPolicies/{ssl" + + "_policy}:\023ssl_policy_resource\332A&project," + + "ssl_policy,ssl_policy_resource\212N\020GlobalO" + + "perations\032r\312A\026compute.googleapis.com\322AVh" + + "ttps://www.googleapis.com/auth/compute,h" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tform2\335\031\n\013Subnetworks\022\307\001\n\016AggregatedList" + + "\0229.google.cloud.compute.v1.AggregatedLis" + + "tSubnetworksRequest\0321.google.cloud.compu" + + "te.v1.SubnetworkAggregatedList\"G\202\323\344\223\0027\0225" + + "/compute/v1/projects/{project}/aggregate" + + "d/subnetworks\332A\007project\022\337\001\n\006Delete\0220.goo" + + "gle.cloud.compute.v1.DeleteSubnetworkReq" + "uest\032\".google.cloud.compute.v1.Operation" - + "\"\367\001\202\323\344\223\002\217\001\"Z/compute/v1/projects/{projec" - + "t}/regions/{region}/subnetworks/{subnetw" - + "ork}/expandIpCidrRange:1subnetworks_expa" - + "nd_ip_cidr_range_request_resource\332AKproj" - + "ect,region,subnetwork,subnetworks_expand" - + "_ip_cidr_range_request_resource\212N\020Region" - + "Operations\022\307\001\n\003Get\022-.google.cloud.comput" - + "e.v1.GetSubnetworkRequest\032#.google.cloud" - + ".compute.v1.Subnetwork\"l\202\323\344\223\002J\022H/compute" - + "/v1/projects/{project}/regions/{region}/" - + "subnetworks/{subnetwork}\332A\031project,regio" - + "n,subnetwork\022\336\001\n\014GetIamPolicy\0226.google.c" - + "loud.compute.v1.GetIamPolicySubnetworkRe" - + "quest\032\037.google.cloud.compute.v1.Policy\"u" - + "\202\323\344\223\002U\022S/compute/v1/projects/{project}/r" - + "egions/{region}/subnetworks/{resource}/g" - + "etIamPolicy\332A\027project,region,resource\022\361\001" - + "\n\006Insert\0220.google.cloud.compute.v1.Inser" - + "tSubnetworkRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\220\001\202\323\344\223\002R\";/compute/v1/pro" - + "jects/{project}/regions/{region}/subnetw" - + "orks:\023subnetwork_resource\332A\"project,regi" - + "on,subnetwork_resource\212N\020RegionOperation" - + "s\022\266\001\n\004List\022/.google.cloud.compute.v1.Lis" - + "tSubnetworksRequest\032\'.google.cloud.compu" - + "te.v1.SubnetworkList\"T\202\323\344\223\002=\022;/compute/v" - + "1/projects/{project}/regions/{region}/su" - + "bnetworks\332A\016project,region\022\321\001\n\nListUsabl" - + "e\0225.google.cloud.compute.v1.ListUsableSu" - + "bnetworksRequest\0328.google.cloud.compute." - + "v1.UsableSubnetworksAggregatedList\"R\202\323\344\223" - + "\002B\022@/compute/v1/projects/{project}/aggre" - + "gated/subnetworks/listUsable\332A\007project\022\207" - + "\002\n\005Patch\022/.google.cloud.compute.v1.Patch" - + "SubnetworkRequest\032\".google.cloud.compute" - + ".v1.Operation\"\250\001\202\323\344\223\002_2H/compute/v1/proj" - + "ects/{project}/regions/{region}/subnetwo" - + "rks/{subnetwork}:\023subnetwork_resource\332A-" - + "project,region,subnetwork,subnetwork_res" - + "ource\212N\020RegionOperations\022\246\002\n\014SetIamPolic" - + "y\0226.google.cloud.compute.v1.SetIamPolicy" - + "SubnetworkRequest\032\037.google.cloud.compute" - + ".v1.Policy\"\274\001\202\323\344\223\002y\"S/compute/v1/project" - + "s/{project}/regions/{region}/subnetworks" - + "/{resource}/setIamPolicy:\"region_set_pol" - + "icy_request_resource\332A:project,region,re" - + "source,region_set_policy_request_resourc" - + "e\022\223\003\n\030SetPrivateIpGoogleAccess\022B.google." - + "cloud.compute.v1.SetPrivateIpGoogleAcces" - + "sSubnetworkRequest\032\".google.cloud.comput" - + "e.v1.Operation\"\216\002\202\323\344\223\002\236\001\"a/compute/v1/pr" - + "ojects/{project}/regions/{region}/subnet" - + "works/{subnetwork}/setPrivateIpGoogleAcc" - + "ess:9subnetworks_set_private_ip_google_a" - + "ccess_request_resource\332ASproject,region," - + "subnetwork,subnetworks_set_private_ip_go" - + "ogle_access_request_resource\212N\020RegionOpe" - + "rations\022\307\002\n\022TestIamPermissions\022<.google." - + "cloud.compute.v1.TestIamPermissionsSubne" - + "tworkRequest\0320.google.cloud.compute.v1.T" - + "estPermissionsResponse\"\300\001\202\323\344\223\002~\"Y/comput" + + "\"\177\202\323\344\223\002J*H/compute/v1/projects/{project}" + + "/regions/{region}/subnetworks/{subnetwor" + + "k}\332A\031project,region,subnetwork\212N\020RegionO" + + "perations\022\356\002\n\021ExpandIpCidrRange\022;.google" + + ".cloud.compute.v1.ExpandIpCidrRangeSubne" + + "tworkRequest\032\".google.cloud.compute.v1.O" + + "peration\"\367\001\202\323\344\223\002\217\001\"Z/compute/v1/projects" + + "/{project}/regions/{region}/subnetworks/" + + "{subnetwork}/expandIpCidrRange:1subnetwo" + + "rks_expand_ip_cidr_range_request_resourc" + + "e\332AKproject,region,subnetwork,subnetwork" + + "s_expand_ip_cidr_range_request_resource\212" + + "N\020RegionOperations\022\307\001\n\003Get\022-.google.clou" + + "d.compute.v1.GetSubnetworkRequest\032#.goog" + + "le.cloud.compute.v1.Subnetwork\"l\202\323\344\223\002J\022H" + + "/compute/v1/projects/{project}/regions/{" + + "region}/subnetworks/{subnetwork}\332A\031proje" + + "ct,region,subnetwork\022\336\001\n\014GetIamPolicy\0226." + + "google.cloud.compute.v1.GetIamPolicySubn" + + "etworkRequest\032\037.google.cloud.compute.v1." + + "Policy\"u\202\323\344\223\002U\022S/compute/v1/projects/{pr" + + "oject}/regions/{region}/subnetworks/{res" + + "ource}/getIamPolicy\332A\027project,region,res" + + "ource\022\361\001\n\006Insert\0220.google.cloud.compute." + + "v1.InsertSubnetworkRequest\032\".google.clou" + + "d.compute.v1.Operation\"\220\001\202\323\344\223\002R\";/comput" + "e/v1/projects/{project}/regions/{region}" - + "/subnetworks/{resource}/testIamPermissio" - + "ns:!test_permissions_request_resource\332A9" - + "project,region,resource,test_permissions" - + "_request_resource\032r\312A\026compute.googleapis" - + ".com\322AVhttps://www.googleapis.com/auth/c" - + "ompute,https://www.googleapis.com/auth/c" - + "loud-platform2\236\n\n\021TargetGrpcProxies\022\350\001\n\006" - + "Delete\0225.google.cloud.compute.v1.DeleteT" - + "argetGrpcProxyRequest\032\".google.cloud.com" - + "pute.v1.Operation\"\202\001\202\323\344\223\002M*K/compute/v1/" - + "projects/{project}/global/targetGrpcProx" - + "ies/{target_grpc_proxy}\332A\031project,target" - + "_grpc_proxy\212N\020GlobalOperations\022\324\001\n\003Get\0222" - + ".google.cloud.compute.v1.GetTargetGrpcPr" - + "oxyRequest\032(.google.cloud.compute.v1.Tar" - + "getGrpcProxy\"o\202\323\344\223\002M\022K/compute/v1/projec" - + "ts/{project}/global/targetGrpcProxies/{t" - + "arget_grpc_proxy}\332A\031project,target_grpc_" - + "proxy\022\371\001\n\006Insert\0225.google.cloud.compute." - + "v1.InsertTargetGrpcProxyRequest\032\".google" - + ".cloud.compute.v1.Operation\"\223\001\202\323\344\223\002U\"7/c" - + "ompute/v1/projects/{project}/global/targ" - + "etGrpcProxies:\032target_grpc_proxy_resourc" - + "e\332A\"project,target_grpc_proxy_resource\212N" - + "\020GlobalOperations\022\266\001\n\004List\0225.google.clou" - + "d.compute.v1.ListTargetGrpcProxiesReques" - + "t\032,.google.cloud.compute.v1.TargetGrpcPr" - + "oxyList\"I\202\323\344\223\0029\0227/compute/v1/projects/{p" - + "roject}/global/targetGrpcProxies\332A\007proje" - + "ct\022\235\002\n\005Patch\0224.google.cloud.compute.v1.P" - + "atchTargetGrpcProxyRequest\032\".google.clou" - + "d.compute.v1.Operation\"\271\001\202\323\344\223\002i2K/comput" - + "e/v1/projects/{project}/global/targetGrp" - + "cProxies/{target_grpc_proxy}:\032target_grp" - + "c_proxy_resource\332A4project,target_grpc_p" - + "roxy,target_grpc_proxy_resource\212N\020Global" - + "Operations\032r\312A\026compute.googleapis.com\322AV" - + "https://www.googleapis.com/auth/compute," - + "https://www.googleapis.com/auth/cloud-pl" - + "atform2\244\016\n\021TargetHttpProxies\022\330\001\n\016Aggrega" - + "tedList\022?.google.cloud.compute.v1.Aggreg" - + "atedListTargetHttpProxiesRequest\0326.googl" - + "e.cloud.compute.v1.TargetHttpProxyAggreg" - + "atedList\"M\202\323\344\223\002=\022;/compute/v1/projects/{" - + "project}/aggregated/targetHttpProxies\332A\007" - + "project\022\350\001\n\006Delete\0225.google.cloud.comput" - + "e.v1.DeleteTargetHttpProxyRequest\032\".goog" - + "le.cloud.compute.v1.Operation\"\202\001\202\323\344\223\002M*K" - + "/compute/v1/projects/{project}/global/ta" - + "rgetHttpProxies/{target_http_proxy}\332A\031pr" - + "oject,target_http_proxy\212N\020GlobalOperatio" - + "ns\022\324\001\n\003Get\0222.google.cloud.compute.v1.Get" - + "TargetHttpProxyRequest\032(.google.cloud.co" - + "mpute.v1.TargetHttpProxy\"o\202\323\344\223\002M\022K/compu" - + "te/v1/projects/{project}/global/targetHt" - + "tpProxies/{target_http_proxy}\332A\031project," - + "target_http_proxy\022\371\001\n\006Insert\0225.google.cl" - + "oud.compute.v1.InsertTargetHttpProxyRequ" - + "est\032\".google.cloud.compute.v1.Operation\"" - + "\223\001\202\323\344\223\002U\"7/compute/v1/projects/{project}" - + "/global/targetHttpProxies:\032target_http_p" - + "roxy_resource\332A\"project,target_http_prox" - + "y_resource\212N\020GlobalOperations\022\266\001\n\004List\0225" - + ".google.cloud.compute.v1.ListTargetHttpP" - + "roxiesRequest\032,.google.cloud.compute.v1." - + "TargetHttpProxyList\"I\202\323\344\223\0029\0227/compute/v1" - + "/projects/{project}/global/targetHttpPro" - + "xies\332A\007project\022\235\002\n\005Patch\0224.google.cloud." - + "compute.v1.PatchTargetHttpProxyRequest\032\"" - + ".google.cloud.compute.v1.Operation\"\271\001\202\323\344" - + "\223\002i2K/compute/v1/projects/{project}/glob" - + "al/targetHttpProxies/{target_http_proxy}" - + ":\032target_http_proxy_resource\332A4project,t" - + "arget_http_proxy,target_http_proxy_resou" - + "rce\212N\020GlobalOperations\022\250\002\n\tSetUrlMap\0228.g" - + "oogle.cloud.compute.v1.SetUrlMapTargetHt" - + "tpProxyRequest\032\".google.cloud.compute.v1" - + ".Operation\"\274\001\202\323\344\223\002l\"N/compute/v1/project" - + "s/{project}/targetHttpProxies/{target_ht" - + "tp_proxy}/setUrlMap:\032url_map_reference_r" - + "esource\332A4project,target_http_proxy,url_" - + "map_reference_resource\212N\020GlobalOperation" - + "s\032r\312A\026compute.googleapis.com\322AVhttps://w" - + "ww.googleapis.com/auth/compute,https://w" - + "ww.googleapis.com/auth/cloud-platform2\242\032" - + "\n\022TargetHttpsProxies\022\333\001\n\016AggregatedList\022" - + "@.google.cloud.compute.v1.AggregatedList" - + "TargetHttpsProxiesRequest\0327.google.cloud" - + ".compute.v1.TargetHttpsProxyAggregatedLi" - + "st\"N\202\323\344\223\002>\022\022.google.cloud.compute.v1.AggregatedLis" - + "tTargetTcpProxiesRequest\0325.google.cloud." - + "compute.v1.TargetTcpProxyAggregatedList\"" - + "L\202\323\344\223\002<\022:/compute/v1/projects/{project}/" - + "aggregated/targetTcpProxies\332A\007project\022\343\001" - + "\n\006Delete\0224.google.cloud.compute.v1.Delet" - + "eTargetTcpProxyRequest\032\".google.cloud.co" - + "mpute.v1.Operation\"\177\202\323\344\223\002K*I/compute/v1/" - + "projects/{project}/global/targetTcpProxi" - + "es/{target_tcp_proxy}\332A\030project,target_t" - + "cp_proxy\212N\020GlobalOperations\022\317\001\n\003Get\0221.go" - + "ogle.cloud.compute.v1.GetTargetTcpProxyR" - + "equest\032\'.google.cloud.compute.v1.TargetT" - + "cpProxy\"l\202\323\344\223\002K\022I/compute/v1/projects/{p" - + "roject}/global/targetTcpProxies/{target_" - + "tcp_proxy}\332A\030project,target_tcp_proxy\022\365\001" - + "\n\006Insert\0224.google.cloud.compute.v1.Inser" - + "tTargetTcpProxyRequest\032\".google.cloud.co" - + "mpute.v1.Operation\"\220\001\202\323\344\223\002S\"6/compute/v1" - + "/projects/{project}/global/targetTcpProx" - + "ies:\031target_tcp_proxy_resource\332A!project" - + ",target_tcp_proxy_resource\212N\020GlobalOpera" - + "tions\022\263\001\n\004List\0224.google.cloud.compute.v1" - + ".ListTargetTcpProxiesRequest\032+.google.cl" - + "oud.compute.v1.TargetTcpProxyList\"H\202\323\344\223\002" - + "8\0226/compute/v1/projects/{project}/global" - + "/targetTcpProxies\332A\007project\022\376\002\n\021SetBacke" - + "ndService\022?.google.cloud.compute.v1.SetB" - + "ackendServiceTargetTcpProxyRequest\032\".goo" - + "gle.cloud.compute.v1.Operation\"\203\002\202\323\344\223\002\226\001" - + "\"[/compute/v1/projects/{project}/global/" - + "targetTcpProxies/{target_tcp_proxy}/setB" - + "ackendService:7target_tcp_proxies_set_ba" - + "ckend_service_request_resource\332APproject" - + ",target_tcp_proxy,target_tcp_proxies_set" - + "_backend_service_request_resource\212N\020Glob" - + "alOperations\022\357\002\n\016SetProxyHeader\022<.google" - + ".cloud.compute.v1.SetProxyHeaderTargetTc" - + "pProxyRequest\032\".google.cloud.compute.v1." - + "Operation\"\372\001\202\323\344\223\002\220\001\"X/compute/v1/project" - + "s/{project}/global/targetTcpProxies/{tar" - + "get_tcp_proxy}/setProxyHeader:4target_tc" - + "p_proxies_set_proxy_header_request_resou" - + "rce\332AMproject,target_tcp_proxy,target_tc" - + "p_proxies_set_proxy_header_request_resou" - + "rce\212N\020GlobalOperations\032r\312A\026compute.googl" - + "eapis.com\322AVhttps://www.googleapis.com/a" - + "uth/compute,https://www.googleapis.com/a" - + "uth/cloud-platform2\354\014\n\021TargetVpnGateways" - + "\022\331\001\n\016AggregatedList\022?.google.cloud.compu" - + "te.v1.AggregatedListTargetVpnGatewaysReq" - + "uest\0327.google.cloud.compute.v1.TargetVpn" - + "GatewayAggregatedList\"M\202\323\344\223\002=\022;/compute/" - + "v1/projects/{project}/aggregated/targetV" - + "pnGateways\332A\007project\022\374\001\n\006Delete\0226.google" - + ".cloud.compute.v1.DeleteTargetVpnGateway" - + "Request\032\".google.cloud.compute.v1.Operat" - + "ion\"\225\001\202\323\344\223\002X*V/compute/v1/projects/{proj" - + "ect}/regions/{region}/targetVpnGateways/" - + "{target_vpn_gateway}\332A!project,region,ta" - + "rget_vpn_gateway\212N\020RegionOperations\022\352\001\n\003" - + "Get\0223.google.cloud.compute.v1.GetTargetV" - + "pnGatewayRequest\032).google.cloud.compute." - + "v1.TargetVpnGateway\"\202\001\202\323\344\223\002X\022V/compute/v" - + "1/projects/{project}/regions/{region}/ta" - + "rgetVpnGateways/{target_vpn_gateway}\332A!p" - + "roject,region,target_vpn_gateway\022\215\002\n\006Ins" - + "ert\0226.google.cloud.compute.v1.InsertTarg" - + "etVpnGatewayRequest\032\".google.cloud.compu" - + "te.v1.Operation\"\246\001\202\323\344\223\002`\"A/compute/v1/pr" - + "ojects/{project}/regions/{region}/target" - + "VpnGateways:\033target_vpn_gateway_resource" - + "\332A*project,region,target_vpn_gateway_res" - + "ource\212N\020RegionOperations\022\310\001\n\004List\0225.goog" - + "le.cloud.compute.v1.ListTargetVpnGateway" - + "sRequest\032-.google.cloud.compute.v1.Targe" - + "tVpnGatewayList\"Z\202\323\344\223\002C\022A/compute/v1/pro" - + "jects/{project}/regions/{region}/targetV" - + "pnGateways\332A\016project,region\022\277\002\n\tSetLabel" - + "s\0229.google.cloud.compute.v1.SetLabelsTar" - + "getVpnGatewayRequest\032\".google.cloud.comp" - + "ute.v1.Operation\"\322\001\202\323\344\223\002|\"V/compute/v1/p" - + "rojects/{project}/regions/{region}/targe" - + "tVpnGateways/{resource}/setLabels:\"regio" - + "n_set_labels_request_resource\332A:project," - + "region,resource,region_set_labels_reques" - + "t_resource\212N\020RegionOperations\032r\312A\026comput" - + "e.googleapis.com\322AVhttps://www.googleapi" - + "s.com/auth/compute,https://www.googleapi" - + "s.com/auth/cloud-platform2\236\020\n\007UrlMaps\022\274\001" - + "\n\016AggregatedList\0225.google.cloud.compute." - + "v1.AggregatedListUrlMapsRequest\032..google" - + ".cloud.compute.v1.UrlMapsAggregatedList\"" - + "C\202\323\344\223\0023\0221/compute/v1/projects/{project}/" - + "aggregated/urlMaps\332A\007project\022\300\001\n\006Delete\022" - + ",.google.cloud.compute.v1.DeleteUrlMapRe" + + "\"\226\001\202\323\344\223\002W\";/compute/v1/projects/{project" + + "}/zones/{zone}/targetInstances:\030target_i" + + "nstance_resource\332A%project,zone,target_i" + + "nstance_resource\212N\016ZoneOperations\022\274\001\n\004Li" + + "st\0223.google.cloud.compute.v1.ListTargetI" + + "nstancesRequest\032+.google.cloud.compute.v" + + "1.TargetInstanceList\"R\202\323\344\223\002=\022;/compute/v" + + "1/projects/{project}/zones/{zone}/target" + + "Instances\332A\014project,zone\032r\312A\026compute.goo" + + "gleapis.com\322AVhttps://www.googleapis.com" + + "/auth/compute,https://www.googleapis.com" + + "/auth/cloud-platform2\213\031\n\013TargetPools\022\341\002\n" + + "\016AddHealthCheck\0228.google.cloud.compute.v" + + "1.AddHealthCheckTargetPoolRequest\032\".goog" + + "le.cloud.compute.v1.Operation\"\360\001\202\323\344\223\002\212\001\"" + + "X/compute/v1/projects/{project}/regions/" + + "{region}/targetPools/{target_pool}/addHe" + + "althCheck:.target_pools_add_health_check" + + "_request_resource\332AIproject,region,targe" + + "t_pool,target_pools_add_health_check_req" + + "uest_resource\212N\020RegionOperations\022\320\002\n\013Add" + + "Instance\0225.google.cloud.compute.v1.AddIn" + + "stanceTargetPoolRequest\032\".google.cloud.c" + + "ompute.v1.Operation\"\345\001\202\323\344\223\002\203\001\"U/compute/" + + "v1/projects/{project}/regions/{region}/t" + + "argetPools/{target_pool}/addInstance:*ta" + + "rget_pools_add_instance_request_resource" + + "\332AEproject,region,target_pool,target_poo" + + "ls_add_instance_request_resource\212N\020Regio" + + "nOperations\022\307\001\n\016AggregatedList\0229.google." + + "cloud.compute.v1.AggregatedListTargetPoo" + + "lsRequest\0321.google.cloud.compute.v1.Targ" + + "etPoolAggregatedList\"G\202\323\344\223\0027\0225/compute/v" + + "1/projects/{project}/aggregated/targetPo" + + "ols\332A\007project\022\342\001\n\006Delete\0220.google.cloud." + + "compute.v1.DeleteTargetPoolRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\201\001\202\323\344\223\002K*" + + "I/compute/v1/projects/{project}/regions/" + + "{region}/targetPools/{target_pool}\332A\032pro" + + "ject,region,target_pool\212N\020RegionOperatio" + + "ns\022\311\001\n\003Get\022-.google.cloud.compute.v1.Get" + + "TargetPoolRequest\032#.google.cloud.compute" + + ".v1.TargetPool\"n\202\323\344\223\002K\022I/compute/v1/proj" + + "ects/{project}/regions/{region}/targetPo" + + "ols/{target_pool}\332A\032project,region,targe" + + "t_pool\022\247\002\n\tGetHealth\0223.google.cloud.comp" + + "ute.v1.GetHealthTargetPoolRequest\0321.goog" + + "le.cloud.compute.v1.TargetPoolInstanceHe" + + "alth\"\261\001\202\323\344\223\002r\"S/compute/v1/projects/{pro" + + "ject}/regions/{region}/targetPools/{targ" + + "et_pool}/getHealth:\033instance_reference_r" + + "esource\332A6project,region,target_pool,ins" + + "tance_reference_resource\022\363\001\n\006Insert\0220.go" + + "ogle.cloud.compute.v1.InsertTargetPoolRe" + "quest\032\".google.cloud.compute.v1.Operatio" - + "n\"d\202\323\344\223\0029*7/compute/v1/projects/{project" - + "}/global/urlMaps/{url_map}\332A\017project,url" - + "_map\212N\020GlobalOperations\022\244\001\n\003Get\022).google" - + ".cloud.compute.v1.GetUrlMapRequest\032\037.goo" - + "gle.cloud.compute.v1.UrlMap\"Q\202\323\344\223\0029\0227/co" - + "mpute/v1/projects/{project}/global/urlMa" - + "ps/{url_map}\332A\017project,url_map\022\321\001\n\006Inser" - + "t\022,.google.cloud.compute.v1.InsertUrlMap" + + "n\"\222\001\202\323\344\223\002S\";/compute/v1/projects/{projec" + + "t}/regions/{region}/targetPools:\024target_" + + "pool_resource\332A#project,region,target_po" + + "ol_resource\212N\020RegionOperations\022\266\001\n\004List\022" + + "/.google.cloud.compute.v1.ListTargetPool" + + "sRequest\032\'.google.cloud.compute.v1.Targe" + + "tPoolList\"T\202\323\344\223\002=\022;/compute/v1/projects/" + + "{project}/regions/{region}/targetPools\332A" + + "\016project,region\022\360\002\n\021RemoveHealthCheck\022;." + + "google.cloud.compute.v1.RemoveHealthChec" + + "kTargetPoolRequest\032\".google.cloud.comput" + + "e.v1.Operation\"\371\001\202\323\344\223\002\220\001\"[/compute/v1/pr" + + "ojects/{project}/regions/{region}/target" + + "Pools/{target_pool}/removeHealthCheck:1t" + + "arget_pools_remove_health_check_request_" + + "resource\332ALproject,region,target_pool,ta" + + "rget_pools_remove_health_check_request_r" + + "esource\212N\020RegionOperations\022\337\002\n\016RemoveIns" + + "tance\0228.google.cloud.compute.v1.RemoveIn" + + "stanceTargetPoolRequest\032\".google.cloud.c" + + "ompute.v1.Operation\"\356\001\202\323\344\223\002\211\001\"X/compute/" + + "v1/projects/{project}/regions/{region}/t" + + "argetPools/{target_pool}/removeInstance:" + + "-target_pools_remove_instance_request_re" + + "source\332AHproject,region,target_pool,targ" + + "et_pools_remove_instance_request_resourc" + + "e\212N\020RegionOperations\022\247\002\n\tSetBackup\0223.goo" + + "gle.cloud.compute.v1.SetBackupTargetPool" + "Request\032\".google.cloud.compute.v1.Operat" - + "ion\"u\202\323\344\223\002A\"-/compute/v1/projects/{proje" - + "ct}/global/urlMaps:\020url_map_resource\332A\030p" - + "roject,url_map_resource\212N\020GlobalOperatio" - + "ns\022\246\002\n\017InvalidateCache\0225.google.cloud.co" - + "mpute.v1.InvalidateCacheUrlMapRequest\032\"." - + "google.cloud.compute.v1.Operation\"\267\001\202\323\344\223" - + "\002k\"G/compute/v1/projects/{project}/globa" - + "l/urlMaps/{url_map}/invalidateCache: cac" - + "he_invalidation_rule_resource\332A0project," - + "url_map,cache_invalidation_rule_resource" - + "\212N\020GlobalOperations\022\231\001\n\004List\022+.google.cl" - + "oud.compute.v1.ListUrlMapsRequest\032#.goog" - + "le.cloud.compute.v1.UrlMapList\"?\202\323\344\223\002/\022-" - + "/compute/v1/projects/{project}/global/ur" - + "lMaps\332A\007project\022\342\001\n\005Patch\022+.google.cloud" - + ".compute.v1.PatchUrlMapRequest\032\".google." - + "cloud.compute.v1.Operation\"\207\001\202\323\344\223\002K27/co" - + "mpute/v1/projects/{project}/global/urlMa" - + "ps/{url_map}:\020url_map_resource\332A project" - + ",url_map,url_map_resource\212N\020GlobalOperat" - + "ions\022\344\001\n\006Update\022,.google.cloud.compute.v" - + "1.UpdateUrlMapRequest\032\".google.cloud.com" - + "pute.v1.Operation\"\207\001\202\323\344\223\002K\0327/compute/v1/" - + "projects/{project}/global/urlMaps/{url_m" - + "ap}:\020url_map_resource\332A project,url_map," - + "url_map_resource\212N\020GlobalOperations\022\220\002\n\010" - + "Validate\022..google.cloud.compute.v1.Valid" - + "ateUrlMapRequest\0320.google.cloud.compute." - + "v1.UrlMapsValidateResponse\"\241\001\202\323\344\223\002f\"@/co" - + "mpute/v1/projects/{project}/global/urlMa" - + "ps/{url_map}/validate:\"url_maps_validate" - + "_request_resource\332A2project,url_map,url_" - + "maps_validate_request_resource\032r\312A\026compu" + + "ion\"\300\001\202\323\344\223\002p\"S/compute/v1/projects/{proj" + + "ect}/regions/{region}/targetPools/{targe" + + "t_pool}/setBackup:\031target_reference_reso" + + "urce\332A4project,region,target_pool,target" + + "_reference_resource\212N\020RegionOperations\032r" + + "\312A\026compute.googleapis.com\322AVhttps://www." + + "googleapis.com/auth/compute,https://www." + + "googleapis.com/auth/cloud-platform2\243\026\n\020T" + + "argetSslProxies\022\343\001\n\006Delete\0224.google.clou" + + "d.compute.v1.DeleteTargetSslProxyRequest" + + "\032\".google.cloud.compute.v1.Operation\"\177\202\323" + + "\344\223\002K*I/compute/v1/projects/{project}/glo" + + "bal/targetSslProxies/{target_ssl_proxy}\332" + + "A\030project,target_ssl_proxy\212N\020GlobalOpera" + + "tions\022\317\001\n\003Get\0221.google.cloud.compute.v1." + + "GetTargetSslProxyRequest\032\'.google.cloud." + + "compute.v1.TargetSslProxy\"l\202\323\344\223\002K\022I/comp" + + "ute/v1/projects/{project}/global/targetS" + + "slProxies/{target_ssl_proxy}\332A\030project,t" + + "arget_ssl_proxy\022\365\001\n\006Insert\0224.google.clou" + + "d.compute.v1.InsertTargetSslProxyRequest" + + "\032\".google.cloud.compute.v1.Operation\"\220\001\202" + + "\323\344\223\002S\"6/compute/v1/projects/{project}/gl" + + "obal/targetSslProxies:\031target_ssl_proxy_" + + "resource\332A!project,target_ssl_proxy_reso" + + "urce\212N\020GlobalOperations\022\263\001\n\004List\0224.googl" + + "e.cloud.compute.v1.ListTargetSslProxiesR" + + "equest\032+.google.cloud.compute.v1.TargetS" + + "slProxyList\"H\202\323\344\223\0028\0226/compute/v1/project" + + "s/{project}/global/targetSslProxies\332A\007pr" + + "oject\022\376\002\n\021SetBackendService\022?.google.clo" + + "ud.compute.v1.SetBackendServiceTargetSsl" + + "ProxyRequest\032\".google.cloud.compute.v1.O" + + "peration\"\203\002\202\323\344\223\002\226\001\"[/compute/v1/projects" + + "/{project}/global/targetSslProxies/{targ" + + "et_ssl_proxy}/setBackendService:7target_" + + "ssl_proxies_set_backend_service_request_" + + "resource\332APproject,target_ssl_proxy,targ" + + "et_ssl_proxies_set_backend_service_reque" + + "st_resource\212N\020GlobalOperations\022\376\002\n\021SetCe" + + "rtificateMap\022?.google.cloud.compute.v1.S" + + "etCertificateMapTargetSslProxyRequest\032\"." + + "google.cloud.compute.v1.Operation\"\203\002\202\323\344\223" + + "\002\226\001\"[/compute/v1/projects/{project}/glob" + + "al/targetSslProxies/{target_ssl_proxy}/s" + + "etCertificateMap:7target_ssl_proxies_set" + + "_certificate_map_request_resource\332APproj" + + "ect,target_ssl_proxy,target_ssl_proxies_" + + "set_certificate_map_request_resource\212N\020G" + + "lobalOperations\022\357\002\n\016SetProxyHeader\022<.goo" + + "gle.cloud.compute.v1.SetProxyHeaderTarge" + + "tSslProxyRequest\032\".google.cloud.compute." + + "v1.Operation\"\372\001\202\323\344\223\002\220\001\"X/compute/v1/proj" + + "ects/{project}/global/targetSslProxies/{" + + "target_ssl_proxy}/setProxyHeader:4target" + + "_ssl_proxies_set_proxy_header_request_re" + + "source\332AMproject,target_ssl_proxy,target" + + "_ssl_proxies_set_proxy_header_request_re" + + "source\212N\020GlobalOperations\022\203\003\n\022SetSslCert" + + "ificates\022@.google.cloud.compute.v1.SetSs" + + "lCertificatesTargetSslProxyRequest\032\".goo" + + "gle.cloud.compute.v1.Operation\"\206\002\202\323\344\223\002\230\001" + + "\"\\/compute/v1/projects/{project}/global/" + + "targetSslProxies/{target_ssl_proxy}/setS" + + "slCertificates:8target_ssl_proxies_set_s" + + "sl_certificates_request_resource\332AQproje" + + "ct,target_ssl_proxy,target_ssl_proxies_s" + + "et_ssl_certificates_request_resource\212N\020G" + + "lobalOperations\022\272\002\n\014SetSslPolicy\022:.googl" + + "e.cloud.compute.v1.SetSslPolicyTargetSsl" + + "ProxyRequest\032\".google.cloud.compute.v1.O" + + "peration\"\311\001\202\323\344\223\002w\"V/compute/v1/projects/" + + "{project}/global/targetSslProxies/{targe" + + "t_ssl_proxy}/setSslPolicy:\035ssl_policy_re" + + "ference_resource\332A6project,target_ssl_pr" + + "oxy,ssl_policy_reference_resource\212N\020Glob" + + "alOperations\032r\312A\026compute.googleapis.com\322" + + "AVhttps://www.googleapis.com/auth/comput" + + "e,https://www.googleapis.com/auth/cloud-" + + "platform2\267\017\n\020TargetTcpProxies\022\325\001\n\016Aggreg" + + "atedList\022>.google.cloud.compute.v1.Aggre" + + "gatedListTargetTcpProxiesRequest\0325.googl" + + "e.cloud.compute.v1.TargetTcpProxyAggrega" + + "tedList\"L\202\323\344\223\002<\022:/compute/v1/projects/{p" + + "roject}/aggregated/targetTcpProxies\332A\007pr" + + "oject\022\343\001\n\006Delete\0224.google.cloud.compute." + + "v1.DeleteTargetTcpProxyRequest\032\".google." + + "cloud.compute.v1.Operation\"\177\202\323\344\223\002K*I/com" + + "pute/v1/projects/{project}/global/target" + + "TcpProxies/{target_tcp_proxy}\332A\030project," + + "target_tcp_proxy\212N\020GlobalOperations\022\317\001\n\003" + + "Get\0221.google.cloud.compute.v1.GetTargetT" + + "cpProxyRequest\032\'.google.cloud.compute.v1" + + ".TargetTcpProxy\"l\202\323\344\223\002K\022I/compute/v1/pro" + + "jects/{project}/global/targetTcpProxies/" + + "{target_tcp_proxy}\332A\030project,target_tcp_" + + "proxy\022\365\001\n\006Insert\0224.google.cloud.compute." + + "v1.InsertTargetTcpProxyRequest\032\".google." + + "cloud.compute.v1.Operation\"\220\001\202\323\344\223\002S\"6/co" + + "mpute/v1/projects/{project}/global/targe" + + "tTcpProxies:\031target_tcp_proxy_resource\332A" + + "!project,target_tcp_proxy_resource\212N\020Glo" + + "balOperations\022\263\001\n\004List\0224.google.cloud.co" + + "mpute.v1.ListTargetTcpProxiesRequest\032+.g" + + "oogle.cloud.compute.v1.TargetTcpProxyLis" + + "t\"H\202\323\344\223\0028\0226/compute/v1/projects/{project" + + "}/global/targetTcpProxies\332A\007project\022\376\002\n\021" + + "SetBackendService\022?.google.cloud.compute" + + ".v1.SetBackendServiceTargetTcpProxyReque" + + "st\032\".google.cloud.compute.v1.Operation\"\203" + + "\002\202\323\344\223\002\226\001\"[/compute/v1/projects/{project}" + + "/global/targetTcpProxies/{target_tcp_pro" + + "xy}/setBackendService:7target_tcp_proxie" + + "s_set_backend_service_request_resource\332A" + + "Pproject,target_tcp_proxy,target_tcp_pro" + + "xies_set_backend_service_request_resourc" + + "e\212N\020GlobalOperations\022\357\002\n\016SetProxyHeader\022" + + "<.google.cloud.compute.v1.SetProxyHeader" + + "TargetTcpProxyRequest\032\".google.cloud.com" + + "pute.v1.Operation\"\372\001\202\323\344\223\002\220\001\"X/compute/v1" + + "/projects/{project}/global/targetTcpProx" + + "ies/{target_tcp_proxy}/setProxyHeader:4t" + + "arget_tcp_proxies_set_proxy_header_reque" + + "st_resource\332AMproject,target_tcp_proxy,t" + + "arget_tcp_proxies_set_proxy_header_reque" + + "st_resource\212N\020GlobalOperations\032r\312A\026compu" + "te.googleapis.com\322AVhttps://www.googleap" + "is.com/auth/compute,https://www.googleap" - + "is.com/auth/cloud-platform2\237\020\n\013VpnGatewa" - + "ys\022\307\001\n\016AggregatedList\0229.google.cloud.com" - + "pute.v1.AggregatedListVpnGatewaysRequest" - + "\0321.google.cloud.compute.v1.VpnGatewayAgg" - + "regatedList\"G\202\323\344\223\0027\0225/compute/v1/project" - + "s/{project}/aggregated/vpnGateways\332A\007pro" - + "ject\022\342\001\n\006Delete\0220.google.cloud.compute.v" - + "1.DeleteVpnGatewayRequest\032\".google.cloud" - + ".compute.v1.Operation\"\201\001\202\323\344\223\002K*I/compute" - + "/v1/projects/{project}/regions/{region}/" - + "vpnGateways/{vpn_gateway}\332A\032project,regi" - + "on,vpn_gateway\212N\020RegionOperations\022\311\001\n\003Ge" - + "t\022-.google.cloud.compute.v1.GetVpnGatewa" - + "yRequest\032#.google.cloud.compute.v1.VpnGa" - + "teway\"n\202\323\344\223\002K\022I/compute/v1/projects/{pro" - + "ject}/regions/{region}/vpnGateways/{vpn_" - + "gateway}\332A\032project,region,vpn_gateway\022\361\001" - + "\n\tGetStatus\0223.google.cloud.compute.v1.Ge" - + "tStatusVpnGatewayRequest\0325.google.cloud." - + "compute.v1.VpnGatewaysGetStatusResponse\"" - + "x\202\323\344\223\002U\022S/compute/v1/projects/{project}/" - + "regions/{region}/vpnGateways/{vpn_gatewa" - + "y}/getStatus\332A\032project,region,vpn_gatewa" - + "y\022\363\001\n\006Insert\0220.google.cloud.compute.v1.I" - + "nsertVpnGatewayRequest\032\".google.cloud.co" - + "mpute.v1.Operation\"\222\001\202\323\344\223\002S\";/compute/v1" - + "/projects/{project}/regions/{region}/vpn" - + "Gateways:\024vpn_gateway_resource\332A#project" - + ",region,vpn_gateway_resource\212N\020RegionOpe" - + "rations\022\266\001\n\004List\022/.google.cloud.compute." - + "v1.ListVpnGatewaysRequest\032\'.google.cloud" - + ".compute.v1.VpnGatewayList\"T\202\323\344\223\002=\022;/com" - + "pute/v1/projects/{project}/regions/{regi" - + "on}/vpnGateways\332A\016project,region\022\263\002\n\tSet" - + "Labels\0223.google.cloud.compute.v1.SetLabe" - + "lsVpnGatewayRequest\032\".google.cloud.compu" - + "te.v1.Operation\"\314\001\202\323\344\223\002v\"P/compute/v1/pr" - + "ojects/{project}/regions/{region}/vpnGat" - + "eways/{resource}/setLabels:\"region_set_l" - + "abels_request_resource\332A:project,region," - + "resource,region_set_labels_request_resou" - + "rce\212N\020RegionOperations\022\307\002\n\022TestIamPermis" - + "sions\022<.google.cloud.compute.v1.TestIamP" - + "ermissionsVpnGatewayRequest\0320.google.clo" - + "ud.compute.v1.TestPermissionsResponse\"\300\001" - + "\202\323\344\223\002~\"Y/compute/v1/projects/{project}/r" - + "egions/{region}/vpnGateways/{resource}/t" - + "estIamPermissions:!test_permissions_requ" - + "est_resource\332A9project,region,resource,t" - + "est_permissions_request_resource\032r\312A\026com" - + "pute.googleapis.com\322AVhttps://www.google" - + "apis.com/auth/compute,https://www.google" - + "apis.com/auth/cloud-platform2\312\013\n\nVpnTunn" - + "els\022\304\001\n\016AggregatedList\0228.google.cloud.co" - + "mpute.v1.AggregatedListVpnTunnelsRequest" - + "\0320.google.cloud.compute.v1.VpnTunnelAggr" - + "egatedList\"F\202\323\344\223\0026\0224/compute/v1/projects" - + "/{project}/aggregated/vpnTunnels\332A\007proje" - + "ct\022\335\001\n\006Delete\022/.google.cloud.compute.v1." - + "DeleteVpnTunnelRequest\032\".google.cloud.co" - + "mpute.v1.Operation\"~\202\323\344\223\002I*G/compute/v1/" - + "projects/{project}/regions/{region}/vpnT" - + "unnels/{vpn_tunnel}\332A\031project,region,vpn" - + "_tunnel\212N\020RegionOperations\022\304\001\n\003Get\022,.goo" - + "gle.cloud.compute.v1.GetVpnTunnelRequest" - + "\032\".google.cloud.compute.v1.VpnTunnel\"k\202\323" - + "\344\223\002I\022G/compute/v1/projects/{project}/reg" - + "ions/{region}/vpnTunnels/{vpn_tunnel}\332A\031" - + "project,region,vpn_tunnel\022\357\001\n\006Insert\022/.g" - + "oogle.cloud.compute.v1.InsertVpnTunnelRe" - + "quest\032\".google.cloud.compute.v1.Operatio" - + "n\"\217\001\202\323\344\223\002Q\":/compute/v1/projects/{projec" - + "t}/regions/{region}/vpnTunnels:\023vpn_tunn" - + "el_resource\332A\"project,region,vpn_tunnel_" - + "resource\212N\020RegionOperations\022\263\001\n\004List\022..g" - + "oogle.cloud.compute.v1.ListVpnTunnelsReq" - + "uest\032&.google.cloud.compute.v1.VpnTunnel" - + "List\"S\202\323\344\223\002<\022:/compute/v1/projects/{proj" - + "ect}/regions/{region}/vpnTunnels\332A\016proje" - + "ct,region\022\261\002\n\tSetLabels\0222.google.cloud.c" - + "ompute.v1.SetLabelsVpnTunnelRequest\032\".go", - "ogle.cloud.compute.v1.Operation\"\313\001\202\323\344\223\002u" - + "\"O/compute/v1/projects/{project}/regions" - + "/{region}/vpnTunnels/{resource}/setLabel" + + "is.com/auth/cloud-platform2\354\014\n\021TargetVpn" + + "Gateways\022\331\001\n\016AggregatedList\022?.google.clo" + + "ud.compute.v1.AggregatedListTargetVpnGat" + + "ewaysRequest\0327.google.cloud.compute.v1.T" + + "argetVpnGatewayAggregatedList\"M\202\323\344\223\002=\022;/" + + "compute/v1/projects/{project}/aggregated" + + "/targetVpnGateways\332A\007project\022\374\001\n\006Delete\022" + + "6.google.cloud.compute.v1.DeleteTargetVp" + + "nGatewayRequest\032\".google.cloud.compute.v" + + "1.Operation\"\225\001\202\323\344\223\002X*V/compute/v1/projec" + + "ts/{project}/regions/{region}/targetVpnG" + + "ateways/{target_vpn_gateway}\332A!project,r" + + "egion,target_vpn_gateway\212N\020RegionOperati" + + "ons\022\352\001\n\003Get\0223.google.cloud.compute.v1.Ge" + + "tTargetVpnGatewayRequest\032).google.cloud." + + "compute.v1.TargetVpnGateway\"\202\001\202\323\344\223\002X\022V/c" + + "ompute/v1/projects/{project}/regions/{re" + + "gion}/targetVpnGateways/{target_vpn_gate" + + "way}\332A!project,region,target_vpn_gateway" + + "\022\215\002\n\006Insert\0226.google.cloud.compute.v1.In" + + "sertTargetVpnGatewayRequest\032\".google.clo" + + "ud.compute.v1.Operation\"\246\001\202\323\344\223\002`\"A/compu" + + "te/v1/projects/{project}/regions/{region" + + "}/targetVpnGateways:\033target_vpn_gateway_" + + "resource\332A*project,region,target_vpn_gat" + + "eway_resource\212N\020RegionOperations\022\310\001\n\004Lis" + + "t\0225.google.cloud.compute.v1.ListTargetVp" + + "nGatewaysRequest\032-.google.cloud.compute." + + "v1.TargetVpnGatewayList\"Z\202\323\344\223\002C\022A/comput" + + "e/v1/projects/{project}/regions/{region}" + + "/targetVpnGateways\332A\016project,region\022\277\002\n\t" + + "SetLabels\0229.google.cloud.compute.v1.SetL" + + "abelsTargetVpnGatewayRequest\032\".google.cl" + + "oud.compute.v1.Operation\"\322\001\202\323\344\223\002|\"V/comp" + + "ute/v1/projects/{project}/regions/{regio" + + "n}/targetVpnGateways/{resource}/setLabel" + "s:\"region_set_labels_request_resource\332A:" + "project,region,resource,region_set_label" + "s_request_resource\212N\020RegionOperations\032r\312" + "A\026compute.googleapis.com\322AVhttps://www.g" + "oogleapis.com/auth/compute,https://www.g" - + "oogleapis.com/auth/cloud-platform2\243\007\n\016Zo" - + "neOperations\022\330\001\n\006Delete\0223.google.cloud.c" - + "ompute.v1.DeleteZoneOperationRequest\0324.g" - + "oogle.cloud.compute.v1.DeleteZoneOperati" - + "onResponse\"c\202\323\344\223\002D*B/compute/v1/projects" - + "/{project}/zones/{zone}/operations/{oper" - + "ation}\332A\026project,zone,operation\022\303\001\n\003Get\022" - + "0.google.cloud.compute.v1.GetZoneOperati" - + "onRequest\032\".google.cloud.compute.v1.Oper" - + "ation\"f\202\323\344\223\002D\022B/compute/v1/projects/{pro" - + "ject}/zones/{zone}/operations/{operation" - + "}\332A\026project,zone,operation\220N\001\022\261\001\n\004List\0222" - + ".google.cloud.compute.v1.ListZoneOperati" - + "onsRequest\032&.google.cloud.compute.v1.Ope" - + "rationList\"M\202\323\344\223\0028\0226/compute/v1/projects" - + "/{project}/zones/{zone}/operations\332A\014pro" - + "ject,zone\022\307\001\n\004Wait\0221.google.cloud.comput" - + "e.v1.WaitZoneOperationRequest\032\".google.c" - + "loud.compute.v1.Operation\"h\202\323\344\223\002I\"G/comp" - + "ute/v1/projects/{project}/zones/{zone}/o" - + "perations/{operation}/wait\332A\026project,zon" - + "e,operation\032r\312A\026compute.googleapis.com\322A" - + "Vhttps://www.googleapis.com/auth/compute" - + ",https://www.googleapis.com/auth/cloud-p" - + "latform2\321\003\n\005Zones\022\221\001\n\003Get\022\'.google.cloud" - + ".compute.v1.GetZoneRequest\032\035.google.clou" - + "d.compute.v1.Zone\"B\202\323\344\223\002-\022+/compute/v1/p" - + "rojects/{project}/zones/{zone}\332A\014project" - + ",zone\022\214\001\n\004List\022).google.cloud.compute.v1" - + ".ListZonesRequest\032!.google.cloud.compute" - + ".v1.ZoneList\"6\202\323\344\223\002&\022$/compute/v1/projec" - + "ts/{project}/zones\332A\007project\032\244\001\312A\026comput" - + "e.googleapis.com\322A\207\001https://www.googleap" - + "is.com/auth/compute.readonly,https://www" - + ".googleapis.com/auth/compute,https://www" - + ".googleapis.com/auth/cloud-platformB\260\001\n\033" - + "com.google.cloud.compute.v1P\001Z>google.go" - + "lang.org/genproto/googleapis/cloud/compu" - + "te/v1;compute\252\002\027Google.Cloud.Compute.V1\312" - + "\002\027Google\\Cloud\\Compute\\V1\352\002\032Google::Clou" - + "d::Compute::V1b\006proto3" + + "oogleapis.com/auth/cloud-platform2\236\020\n\007Ur" + + "lMaps\022\274\001\n\016AggregatedList\0225.google.cloud." + + "compute.v1.AggregatedListUrlMapsRequest\032" + + "..google.cloud.compute.v1.UrlMapsAggrega" + + "tedList\"C\202\323\344\223\0023\0221/compute/v1/projects/{p" + + "roject}/aggregated/urlMaps\332A\007project\022\300\001\n" + + "\006Delete\022,.google.cloud.compute.v1.Delete" + + "UrlMapRequest\032\".google.cloud.compute.v1." + + "Operation\"d\202\323\344\223\0029*7/compute/v1/projects/" + + "{project}/global/urlMaps/{url_map}\332A\017pro" + + "ject,url_map\212N\020GlobalOperations\022\244\001\n\003Get\022" + + ").google.cloud.compute.v1.GetUrlMapReque" + + "st\032\037.google.cloud.compute.v1.UrlMap\"Q\202\323\344" + + "\223\0029\0227/compute/v1/projects/{project}/glob" + + "al/urlMaps/{url_map}\332A\017project,url_map\022\321" + + "\001\n\006Insert\022,.google.cloud.compute.v1.Inse" + + "rtUrlMapRequest\032\".google.cloud.compute.v" + + "1.Operation\"u\202\323\344\223\002A\"-/compute/v1/project" + + "s/{project}/global/urlMaps:\020url_map_reso" + + "urce\332A\030project,url_map_resource\212N\020Global" + + "Operations\022\246\002\n\017InvalidateCache\0225.google." + + "cloud.compute.v1.InvalidateCacheUrlMapRe" + + "quest\032\".google.cloud.compute.v1.Operatio" + + "n\"\267\001\202\323\344\223\002k\"G/compute/v1/projects/{projec" + + "t}/global/urlMaps/{url_map}/invalidateCa" + + "che: cache_invalidation_rule_resource\332A0" + + "project,url_map,cache_invalidation_rule_" + + "resource\212N\020GlobalOperations\022\231\001\n\004List\022+.g" + + "oogle.cloud.compute.v1.ListUrlMapsReques" + + "t\032#.google.cloud.compute.v1.UrlMapList\"?" + + "\202\323\344\223\002/\022-/compute/v1/projects/{project}/g" + + "lobal/urlMaps\332A\007project\022\342\001\n\005Patch\022+.goog" + + "le.cloud.compute.v1.PatchUrlMapRequest\032\"" + + ".google.cloud.compute.v1.Operation\"\207\001\202\323\344" + + "\223\002K27/compute/v1/projects/{project}/glob" + + "al/urlMaps/{url_map}:\020url_map_resource\332A" + + " project,url_map,url_map_resource\212N\020Glob" + + "alOperations\022\344\001\n\006Update\022,.google.cloud.c" + + "ompute.v1.UpdateUrlMapRequest\032\".google.c" + + "loud.compute.v1.Operation\"\207\001\202\323\344\223\002K\0327/com" + + "pute/v1/projects/{project}/global/urlMap" + + "s/{url_map}:\020url_map_resource\332A project," + + "url_map,url_map_resource\212N\020GlobalOperati" + + "ons\022\220\002\n\010Validate\022..google.cloud.compute." + + "v1.ValidateUrlMapRequest\0320.google.cloud." + + "compute.v1.UrlMapsValidateResponse\"\241\001\202\323\344" + + "\223\002f\"@/compute/v1/projects/{project}/glob" + + "al/urlMaps/{url_map}/validate:\"url_maps_" + + "validate_request_resource\332A2project,url_" + + "map,url_maps_validate_request_resource\032r" + + "\312A\026compute.googleapis.com\322AVhttps://www." + + "googleapis.com/auth/compute,https://www." + + "googleapis.com/auth/cloud-platform2\237\020\n\013V" + + "pnGateways\022\307\001\n\016AggregatedList\0229.google.c" + + "loud.compute.v1.AggregatedListVpnGateway" + + "sRequest\0321.google.cloud.compute.v1.VpnGa" + + "tewayAggregatedList\"G\202\323\344\223\0027\0225/compute/v1" + + "/projects/{project}/aggregated/vpnGatewa" + + "ys\332A\007project\022\342\001\n\006Delete\0220.google.cloud.c" + + "ompute.v1.DeleteVpnGatewayRequest\032\".goog" + + "le.cloud.compute.v1.Operation\"\201\001\202\323\344\223\002K*I" + + "/compute/v1/projects/{project}/regions/{" + + "region}/vpnGateways/{vpn_gateway}\332A\032proj" + + "ect,region,vpn_gateway\212N\020RegionOperation" + + "s\022\311\001\n\003Get\022-.google.cloud.compute.v1.GetV" + + "pnGatewayRequest\032#.google.cloud.compute." + + "v1.VpnGateway\"n\202\323\344\223\002K\022I/compute/v1/proje" + + "cts/{project}/regions/{region}/vpnGatewa" + + "ys/{vpn_gateway}\332A\032project,region,vpn_ga" + + "teway\022\361\001\n\tGetStatus\0223.google.cloud.compu" + + "te.v1.GetStatusVpnGatewayRequest\0325.googl" + + "e.cloud.compute.v1.VpnGatewaysGetStatusR" + + "esponse\"x\202\323\344\223\002U\022S/compute/v1/projects/{p" + + "roject}/regions/{region}/vpnGateways/{vp" + + "n_gateway}/getStatus\332A\032project,region,vp" + + "n_gateway\022\363\001\n\006Insert\0220.google.cloud.comp" + + "ute.v1.InsertVpnGatewayRequest\032\".google." + + "cloud.compute.v1.Operation\"\222\001\202\323\344\223\002S\";/co" + + "mpute/v1/projects/{project}/regions/{reg" + + "ion}/vpnGateways:\024vpn_gateway_resource\332A" + + "#project,region,vpn_gateway_resource\212N\020R" + + "egionOperations\022\266\001\n\004List\022/.google.cloud." + + "compute.v1.ListVpnGatewaysRequest\032\'.goog" + + "le.cloud.compute.v1.VpnGatewayList\"T\202\323\344\223" + + "\002=\022;/compute/v1/projects/{project}/regio" + + "ns/{region}/vpnGateways\332A\016project,region" + + "\022\263\002\n\tSetLabels\0223.google.cloud.compute.v1" + + ".SetLabelsVpnGatewayRequest\032\".google.clo" + + "ud.compute.v1.Operation\"\314\001\202\323\344\223\002v\"P/compu" + + "te/v1/projects/{project}/regions/{region" + + "}/vpnGateways/{resource}/setLabels:\"regi" + + "on_set_labels_request_resource\332A:project" + + ",region,resource,region_set_labels_reque" + + "st_resource\212N\020RegionOperations\022\307\002\n\022TestI" + + "amPermissions\022<.google.cloud.compute.v1." + + "TestIamPermissionsVpnGatewayRequest\0320.go" + + "ogle.cloud.compute.v1.TestPermissionsRes" + + "ponse\"\300\001\202\323\344\223\002~\"Y/compute/v1/projects/{pr" + + "oject}/regions/{region}/vpnGateways/{res" + + "ource}/testIamPermissions:!test_permissi" + + "ons_request_resource\332A9project,region,re" + + "source,test_permissions_request_resource" + + "\032r\312A\026compute.googleapis.com\322AVhttps://ww" + + "w.googleapis.com/auth/compute,https://ww" + + "w.googleapis.com/auth/cloud-platform2\312\013\n" + + "\nVpnTunnels\022\304\001\n\016AggregatedList\0228.google." + + "cloud.compute.v1.AggregatedListVpnTunnel" + + "sRequest\0320.google.cloud.compute.v1.VpnTu" + + "nnelAggregatedList\"F\202\323\344\223\0026\0224/compute/v1/" + + "projects/{project}/aggregated/vpnTunnels" + + "\332A\007project\022\335\001\n\006Delete\022/.google.cloud.com" + + "pute.v1.DeleteVpnTunnelRequest\032\".google." + + "cloud.compute.v1.Operation\"~\202\323\344\223\002I*G/com", + "pute/v1/projects/{project}/regions/{regi" + + "on}/vpnTunnels/{vpn_tunnel}\332A\031project,re" + + "gion,vpn_tunnel\212N\020RegionOperations\022\304\001\n\003G" + + "et\022,.google.cloud.compute.v1.GetVpnTunne" + + "lRequest\032\".google.cloud.compute.v1.VpnTu" + + "nnel\"k\202\323\344\223\002I\022G/compute/v1/projects/{proj" + + "ect}/regions/{region}/vpnTunnels/{vpn_tu" + + "nnel}\332A\031project,region,vpn_tunnel\022\357\001\n\006In" + + "sert\022/.google.cloud.compute.v1.InsertVpn" + + "TunnelRequest\032\".google.cloud.compute.v1." + + "Operation\"\217\001\202\323\344\223\002Q\":/compute/v1/projects" + + "/{project}/regions/{region}/vpnTunnels:\023" + + "vpn_tunnel_resource\332A\"project,region,vpn" + + "_tunnel_resource\212N\020RegionOperations\022\263\001\n\004" + + "List\022..google.cloud.compute.v1.ListVpnTu" + + "nnelsRequest\032&.google.cloud.compute.v1.V" + + "pnTunnelList\"S\202\323\344\223\002<\022:/compute/v1/projec" + + "ts/{project}/regions/{region}/vpnTunnels" + + "\332A\016project,region\022\261\002\n\tSetLabels\0222.google" + + ".cloud.compute.v1.SetLabelsVpnTunnelRequ" + + "est\032\".google.cloud.compute.v1.Operation\"" + + "\313\001\202\323\344\223\002u\"O/compute/v1/projects/{project}" + + "/regions/{region}/vpnTunnels/{resource}/" + + "setLabels:\"region_set_labels_request_res" + + "ource\332A:project,region,resource,region_s" + + "et_labels_request_resource\212N\020RegionOpera" + + "tions\032r\312A\026compute.googleapis.com\322AVhttps" + + "://www.googleapis.com/auth/compute,https" + + "://www.googleapis.com/auth/cloud-platfor" + + "m2\243\007\n\016ZoneOperations\022\330\001\n\006Delete\0223.google" + + ".cloud.compute.v1.DeleteZoneOperationReq" + + "uest\0324.google.cloud.compute.v1.DeleteZon" + + "eOperationResponse\"c\202\323\344\223\002D*B/compute/v1/" + + "projects/{project}/zones/{zone}/operatio" + + "ns/{operation}\332A\026project,zone,operation\022" + + "\303\001\n\003Get\0220.google.cloud.compute.v1.GetZon" + + "eOperationRequest\032\".google.cloud.compute" + + ".v1.Operation\"f\202\323\344\223\002D\022B/compute/v1/proje" + + "cts/{project}/zones/{zone}/operations/{o" + + "peration}\332A\026project,zone,operation\220N\001\022\261\001" + + "\n\004List\0222.google.cloud.compute.v1.ListZon" + + "eOperationsRequest\032&.google.cloud.comput" + + "e.v1.OperationList\"M\202\323\344\223\0028\0226/compute/v1/" + + "projects/{project}/zones/{zone}/operatio" + + "ns\332A\014project,zone\022\307\001\n\004Wait\0221.google.clou" + + "d.compute.v1.WaitZoneOperationRequest\032\"." + + "google.cloud.compute.v1.Operation\"h\202\323\344\223\002" + + "I\"G/compute/v1/projects/{project}/zones/" + + "{zone}/operations/{operation}/wait\332A\026pro" + + "ject,zone,operation\032r\312A\026compute.googleap" + + "is.com\322AVhttps://www.googleapis.com/auth" + + "/compute,https://www.googleapis.com/auth" + + "/cloud-platform2\321\003\n\005Zones\022\221\001\n\003Get\022\'.goog" + + "le.cloud.compute.v1.GetZoneRequest\032\035.goo" + + "gle.cloud.compute.v1.Zone\"B\202\323\344\223\002-\022+/comp" + + "ute/v1/projects/{project}/zones/{zone}\332A" + + "\014project,zone\022\214\001\n\004List\022).google.cloud.co" + + "mpute.v1.ListZonesRequest\032!.google.cloud" + + ".compute.v1.ZoneList\"6\202\323\344\223\002&\022$/compute/v" + + "1/projects/{project}/zones\332A\007project\032\244\001\312" + + "A\026compute.googleapis.com\322A\207\001https://www." + + "googleapis.com/auth/compute.readonly,htt" + + "ps://www.googleapis.com/auth/compute,htt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "ormB\260\001\n\033com.google.cloud.compute.v1P\001Z>g" + + "oogle.golang.org/genproto/googleapis/clo" + + "ud/compute/v1;compute\252\002\027Google.Cloud.Com" + + "pute.V1\312\002\027Google\\Cloud\\Compute\\V1\352\002\032Goog" + + "le::Cloud::Compute::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -31406,8 +31434,16 @@ private static void _clinit_autosplit_dinit_2() { new java.lang.String[] { "NodeTemplate", "NodeTemplate", }); - internal_static_google_cloud_compute_v1_NodeTemplate_descriptor = + internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_descriptor = getDescriptor().getMessageTypes().get(813); + internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_descriptor, + new java.lang.String[] { + "Nodes", + }); + internal_static_google_cloud_compute_v1_NodeTemplate_descriptor = + getDescriptor().getMessageTypes().get(814); internal_static_google_cloud_compute_v1_NodeTemplate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeTemplate_descriptor, @@ -31451,7 +31487,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_NodeTemplateAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(814); + getDescriptor().getMessageTypes().get(815); internal_static_google_cloud_compute_v1_NodeTemplateAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeTemplateAggregatedList_descriptor, @@ -31480,7 +31516,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_NodeTemplateList_descriptor = - getDescriptor().getMessageTypes().get(815); + getDescriptor().getMessageTypes().get(816); internal_static_google_cloud_compute_v1_NodeTemplateList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeTemplateList_descriptor, @@ -31498,7 +31534,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_NodeTemplateNodeTypeFlexibility_descriptor = - getDescriptor().getMessageTypes().get(816); + getDescriptor().getMessageTypes().get(817); internal_static_google_cloud_compute_v1_NodeTemplateNodeTypeFlexibility_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeTemplateNodeTypeFlexibility_descriptor, @@ -31506,7 +31542,7 @@ private static void _clinit_autosplit_dinit_2() { "Cpus", "LocalSsd", "Memory", "Cpus", "LocalSsd", "Memory", }); internal_static_google_cloud_compute_v1_NodeTemplatesScopedList_descriptor = - getDescriptor().getMessageTypes().get(817); + getDescriptor().getMessageTypes().get(818); internal_static_google_cloud_compute_v1_NodeTemplatesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeTemplatesScopedList_descriptor, @@ -31514,7 +31550,7 @@ private static void _clinit_autosplit_dinit_2() { "NodeTemplates", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_NodeType_descriptor = - getDescriptor().getMessageTypes().get(818); + getDescriptor().getMessageTypes().get(819); internal_static_google_cloud_compute_v1_NodeType_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeType_descriptor, @@ -31545,7 +31581,7 @@ private static void _clinit_autosplit_dinit_2() { "Zone", }); internal_static_google_cloud_compute_v1_NodeTypeAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(819); + getDescriptor().getMessageTypes().get(820); internal_static_google_cloud_compute_v1_NodeTypeAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeTypeAggregatedList_descriptor, @@ -31574,7 +31610,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_NodeTypeList_descriptor = - getDescriptor().getMessageTypes().get(820); + getDescriptor().getMessageTypes().get(821); internal_static_google_cloud_compute_v1_NodeTypeList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeTypeList_descriptor, @@ -31592,7 +31628,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_NodeTypesScopedList_descriptor = - getDescriptor().getMessageTypes().get(821); + getDescriptor().getMessageTypes().get(822); internal_static_google_cloud_compute_v1_NodeTypesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NodeTypesScopedList_descriptor, @@ -31600,7 +31636,7 @@ private static void _clinit_autosplit_dinit_2() { "NodeTypes", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_NotificationEndpoint_descriptor = - getDescriptor().getMessageTypes().get(822); + getDescriptor().getMessageTypes().get(823); internal_static_google_cloud_compute_v1_NotificationEndpoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NotificationEndpoint_descriptor, @@ -31623,7 +31659,7 @@ private static void _clinit_autosplit_dinit_2() { "SelfLink", }); internal_static_google_cloud_compute_v1_NotificationEndpointGrpcSettings_descriptor = - getDescriptor().getMessageTypes().get(823); + getDescriptor().getMessageTypes().get(824); internal_static_google_cloud_compute_v1_NotificationEndpointGrpcSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NotificationEndpointGrpcSettings_descriptor, @@ -31640,7 +31676,7 @@ private static void _clinit_autosplit_dinit_2() { "RetryDurationSec", }); internal_static_google_cloud_compute_v1_NotificationEndpointList_descriptor = - getDescriptor().getMessageTypes().get(824); + getDescriptor().getMessageTypes().get(825); internal_static_google_cloud_compute_v1_NotificationEndpointList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_NotificationEndpointList_descriptor, @@ -31658,7 +31694,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_Operation_descriptor = - getDescriptor().getMessageTypes().get(825); + getDescriptor().getMessageTypes().get(826); internal_static_google_cloud_compute_v1_Operation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Operation_descriptor, @@ -31712,7 +31748,7 @@ private static void _clinit_autosplit_dinit_2() { "Zone", }); internal_static_google_cloud_compute_v1_OperationAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(826); + getDescriptor().getMessageTypes().get(827); internal_static_google_cloud_compute_v1_OperationAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_OperationAggregatedList_descriptor, @@ -31741,7 +31777,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_OperationList_descriptor = - getDescriptor().getMessageTypes().get(827); + getDescriptor().getMessageTypes().get(828); internal_static_google_cloud_compute_v1_OperationList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_OperationList_descriptor, @@ -31759,7 +31795,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_OperationsScopedList_descriptor = - getDescriptor().getMessageTypes().get(828); + getDescriptor().getMessageTypes().get(829); internal_static_google_cloud_compute_v1_OperationsScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_OperationsScopedList_descriptor, @@ -31767,7 +31803,7 @@ private static void _clinit_autosplit_dinit_2() { "Operations", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_OutlierDetection_descriptor = - getDescriptor().getMessageTypes().get(829); + getDescriptor().getMessageTypes().get(830); internal_static_google_cloud_compute_v1_OutlierDetection_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_OutlierDetection_descriptor, @@ -31796,7 +31832,7 @@ private static void _clinit_autosplit_dinit_2() { "SuccessRateStdevFactor", }); internal_static_google_cloud_compute_v1_PacketIntervals_descriptor = - getDescriptor().getMessageTypes().get(830); + getDescriptor().getMessageTypes().get(831); internal_static_google_cloud_compute_v1_PacketIntervals_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketIntervals_descriptor, @@ -31815,7 +31851,7 @@ private static void _clinit_autosplit_dinit_2() { "Type", }); internal_static_google_cloud_compute_v1_PacketMirroring_descriptor = - getDescriptor().getMessageTypes().get(831); + getDescriptor().getMessageTypes().get(832); internal_static_google_cloud_compute_v1_PacketMirroring_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroring_descriptor, @@ -31848,7 +31884,7 @@ private static void _clinit_autosplit_dinit_2() { "SelfLink", }); internal_static_google_cloud_compute_v1_PacketMirroringAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(832); + getDescriptor().getMessageTypes().get(833); internal_static_google_cloud_compute_v1_PacketMirroringAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringAggregatedList_descriptor, @@ -31877,7 +31913,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_PacketMirroringFilter_descriptor = - getDescriptor().getMessageTypes().get(833); + getDescriptor().getMessageTypes().get(834); internal_static_google_cloud_compute_v1_PacketMirroringFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringFilter_descriptor, @@ -31885,7 +31921,7 @@ private static void _clinit_autosplit_dinit_2() { "IPProtocols", "CidrRanges", "Direction", "Direction", }); internal_static_google_cloud_compute_v1_PacketMirroringForwardingRuleInfo_descriptor = - getDescriptor().getMessageTypes().get(834); + getDescriptor().getMessageTypes().get(835); internal_static_google_cloud_compute_v1_PacketMirroringForwardingRuleInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringForwardingRuleInfo_descriptor, @@ -31893,7 +31929,7 @@ private static void _clinit_autosplit_dinit_2() { "CanonicalUrl", "Url", "CanonicalUrl", "Url", }); internal_static_google_cloud_compute_v1_PacketMirroringList_descriptor = - getDescriptor().getMessageTypes().get(835); + getDescriptor().getMessageTypes().get(836); internal_static_google_cloud_compute_v1_PacketMirroringList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringList_descriptor, @@ -31911,7 +31947,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfo_descriptor = - getDescriptor().getMessageTypes().get(836); + getDescriptor().getMessageTypes().get(837); internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfo_descriptor, @@ -31919,7 +31955,7 @@ private static void _clinit_autosplit_dinit_2() { "Instances", "Subnetworks", "Tags", }); internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfoInstanceInfo_descriptor = - getDescriptor().getMessageTypes().get(837); + getDescriptor().getMessageTypes().get(838); internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfoInstanceInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfoInstanceInfo_descriptor, @@ -31927,7 +31963,7 @@ private static void _clinit_autosplit_dinit_2() { "CanonicalUrl", "Url", "CanonicalUrl", "Url", }); internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfoSubnetInfo_descriptor = - getDescriptor().getMessageTypes().get(838); + getDescriptor().getMessageTypes().get(839); internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfoSubnetInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfoSubnetInfo_descriptor, @@ -31935,7 +31971,7 @@ private static void _clinit_autosplit_dinit_2() { "CanonicalUrl", "Url", "CanonicalUrl", "Url", }); internal_static_google_cloud_compute_v1_PacketMirroringNetworkInfo_descriptor = - getDescriptor().getMessageTypes().get(839); + getDescriptor().getMessageTypes().get(840); internal_static_google_cloud_compute_v1_PacketMirroringNetworkInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringNetworkInfo_descriptor, @@ -31943,7 +31979,7 @@ private static void _clinit_autosplit_dinit_2() { "CanonicalUrl", "Url", "CanonicalUrl", "Url", }); internal_static_google_cloud_compute_v1_PacketMirroringsScopedList_descriptor = - getDescriptor().getMessageTypes().get(840); + getDescriptor().getMessageTypes().get(841); internal_static_google_cloud_compute_v1_PacketMirroringsScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PacketMirroringsScopedList_descriptor, @@ -31951,7 +31987,7 @@ private static void _clinit_autosplit_dinit_2() { "PacketMirrorings", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_PatchAutoscalerRequest_descriptor = - getDescriptor().getMessageTypes().get(841); + getDescriptor().getMessageTypes().get(842); internal_static_google_cloud_compute_v1_PatchAutoscalerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchAutoscalerRequest_descriptor, @@ -31965,7 +32001,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchBackendBucketRequest_descriptor = - getDescriptor().getMessageTypes().get(842); + getDescriptor().getMessageTypes().get(843); internal_static_google_cloud_compute_v1_PatchBackendBucketRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchBackendBucketRequest_descriptor, @@ -31973,7 +32009,7 @@ private static void _clinit_autosplit_dinit_2() { "BackendBucket", "BackendBucketResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(843); + getDescriptor().getMessageTypes().get(844); internal_static_google_cloud_compute_v1_PatchBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchBackendServiceRequest_descriptor, @@ -31981,7 +32017,7 @@ private static void _clinit_autosplit_dinit_2() { "BackendService", "BackendServiceResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(844); + getDescriptor().getMessageTypes().get(845); internal_static_google_cloud_compute_v1_PatchFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchFirewallPolicyRequest_descriptor, @@ -31989,7 +32025,7 @@ private static void _clinit_autosplit_dinit_2() { "FirewallPolicy", "FirewallPolicyResource", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchFirewallRequest_descriptor = - getDescriptor().getMessageTypes().get(845); + getDescriptor().getMessageTypes().get(846); internal_static_google_cloud_compute_v1_PatchFirewallRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchFirewallRequest_descriptor, @@ -31997,7 +32033,7 @@ private static void _clinit_autosplit_dinit_2() { "Firewall", "FirewallResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchForwardingRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(846); + getDescriptor().getMessageTypes().get(847); internal_static_google_cloud_compute_v1_PatchForwardingRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchForwardingRuleRequest_descriptor, @@ -32010,7 +32046,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchGlobalForwardingRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(847); + getDescriptor().getMessageTypes().get(848); internal_static_google_cloud_compute_v1_PatchGlobalForwardingRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchGlobalForwardingRuleRequest_descriptor, @@ -32018,7 +32054,7 @@ private static void _clinit_autosplit_dinit_2() { "ForwardingRule", "ForwardingRuleResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchGlobalPublicDelegatedPrefixeRequest_descriptor = - getDescriptor().getMessageTypes().get(848); + getDescriptor().getMessageTypes().get(849); internal_static_google_cloud_compute_v1_PatchGlobalPublicDelegatedPrefixeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchGlobalPublicDelegatedPrefixeRequest_descriptor, @@ -32030,7 +32066,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchHealthCheckRequest_descriptor = - getDescriptor().getMessageTypes().get(849); + getDescriptor().getMessageTypes().get(850); internal_static_google_cloud_compute_v1_PatchHealthCheckRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchHealthCheckRequest_descriptor, @@ -32038,7 +32074,7 @@ private static void _clinit_autosplit_dinit_2() { "HealthCheck", "HealthCheckResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchImageRequest_descriptor = - getDescriptor().getMessageTypes().get(850); + getDescriptor().getMessageTypes().get(851); internal_static_google_cloud_compute_v1_PatchImageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchImageRequest_descriptor, @@ -32046,7 +32082,7 @@ private static void _clinit_autosplit_dinit_2() { "Image", "ImageResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(851); + getDescriptor().getMessageTypes().get(852); internal_static_google_cloud_compute_v1_PatchInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchInstanceGroupManagerRequest_descriptor, @@ -32059,7 +32095,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchInterconnectAttachmentRequest_descriptor = - getDescriptor().getMessageTypes().get(852); + getDescriptor().getMessageTypes().get(853); internal_static_google_cloud_compute_v1_PatchInterconnectAttachmentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchInterconnectAttachmentRequest_descriptor, @@ -32072,7 +32108,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchInterconnectRequest_descriptor = - getDescriptor().getMessageTypes().get(853); + getDescriptor().getMessageTypes().get(854); internal_static_google_cloud_compute_v1_PatchInterconnectRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchInterconnectRequest_descriptor, @@ -32080,7 +32116,7 @@ private static void _clinit_autosplit_dinit_2() { "Interconnect", "InterconnectResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchNetworkEdgeSecurityServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(854); + getDescriptor().getMessageTypes().get(855); internal_static_google_cloud_compute_v1_PatchNetworkEdgeSecurityServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchNetworkEdgeSecurityServiceRequest_descriptor, @@ -32097,7 +32133,7 @@ private static void _clinit_autosplit_dinit_2() { "UpdateMask", }); internal_static_google_cloud_compute_v1_PatchNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(855); + getDescriptor().getMessageTypes().get(856); internal_static_google_cloud_compute_v1_PatchNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchNetworkFirewallPolicyRequest_descriptor, @@ -32105,7 +32141,7 @@ private static void _clinit_autosplit_dinit_2() { "FirewallPolicy", "FirewallPolicyResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchNetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(856); + getDescriptor().getMessageTypes().get(857); internal_static_google_cloud_compute_v1_PatchNetworkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchNetworkRequest_descriptor, @@ -32113,7 +32149,7 @@ private static void _clinit_autosplit_dinit_2() { "Network", "NetworkResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchNodeGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(857); + getDescriptor().getMessageTypes().get(858); internal_static_google_cloud_compute_v1_PatchNodeGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchNodeGroupRequest_descriptor, @@ -32121,7 +32157,7 @@ private static void _clinit_autosplit_dinit_2() { "NodeGroup", "NodeGroupResource", "Project", "RequestId", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_PatchPacketMirroringRequest_descriptor = - getDescriptor().getMessageTypes().get(858); + getDescriptor().getMessageTypes().get(859); internal_static_google_cloud_compute_v1_PatchPacketMirroringRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchPacketMirroringRequest_descriptor, @@ -32134,7 +32170,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchPerInstanceConfigsInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(859); + getDescriptor().getMessageTypes().get(860); internal_static_google_cloud_compute_v1_PatchPerInstanceConfigsInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchPerInstanceConfigsInstanceGroupManagerRequest_descriptor, @@ -32147,7 +32183,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchPerInstanceConfigsRegionInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(860); + getDescriptor().getMessageTypes().get(861); internal_static_google_cloud_compute_v1_PatchPerInstanceConfigsRegionInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchPerInstanceConfigsRegionInstanceGroupManagerRequest_descriptor, @@ -32160,7 +32196,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchPublicAdvertisedPrefixeRequest_descriptor = - getDescriptor().getMessageTypes().get(861); + getDescriptor().getMessageTypes().get(862); internal_static_google_cloud_compute_v1_PatchPublicAdvertisedPrefixeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchPublicAdvertisedPrefixeRequest_descriptor, @@ -32172,7 +32208,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchPublicDelegatedPrefixeRequest_descriptor = - getDescriptor().getMessageTypes().get(862); + getDescriptor().getMessageTypes().get(863); internal_static_google_cloud_compute_v1_PatchPublicDelegatedPrefixeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchPublicDelegatedPrefixeRequest_descriptor, @@ -32185,7 +32221,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionAutoscalerRequest_descriptor = - getDescriptor().getMessageTypes().get(863); + getDescriptor().getMessageTypes().get(864); internal_static_google_cloud_compute_v1_PatchRegionAutoscalerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionAutoscalerRequest_descriptor, @@ -32199,7 +32235,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(864); + getDescriptor().getMessageTypes().get(865); internal_static_google_cloud_compute_v1_PatchRegionBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionBackendServiceRequest_descriptor, @@ -32212,7 +32248,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionHealthCheckRequest_descriptor = - getDescriptor().getMessageTypes().get(865); + getDescriptor().getMessageTypes().get(866); internal_static_google_cloud_compute_v1_PatchRegionHealthCheckRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionHealthCheckRequest_descriptor, @@ -32220,7 +32256,7 @@ private static void _clinit_autosplit_dinit_2() { "HealthCheck", "HealthCheckResource", "Project", "Region", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionHealthCheckServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(866); + getDescriptor().getMessageTypes().get(867); internal_static_google_cloud_compute_v1_PatchRegionHealthCheckServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionHealthCheckServiceRequest_descriptor, @@ -32233,7 +32269,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(867); + getDescriptor().getMessageTypes().get(868); internal_static_google_cloud_compute_v1_PatchRegionInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionInstanceGroupManagerRequest_descriptor, @@ -32246,7 +32282,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(868); + getDescriptor().getMessageTypes().get(869); internal_static_google_cloud_compute_v1_PatchRegionNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionNetworkFirewallPolicyRequest_descriptor, @@ -32259,7 +32295,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionSecurityPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(869); + getDescriptor().getMessageTypes().get(870); internal_static_google_cloud_compute_v1_PatchRegionSecurityPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionSecurityPolicyRequest_descriptor, @@ -32272,7 +32308,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionSslPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(870); + getDescriptor().getMessageTypes().get(871); internal_static_google_cloud_compute_v1_PatchRegionSslPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionSslPolicyRequest_descriptor, @@ -32280,7 +32316,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RequestId", "SslPolicy", "SslPolicyResource", "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(871); + getDescriptor().getMessageTypes().get(872); internal_static_google_cloud_compute_v1_PatchRegionTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionTargetHttpsProxyRequest_descriptor, @@ -32293,7 +32329,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRegionUrlMapRequest_descriptor = - getDescriptor().getMessageTypes().get(872); + getDescriptor().getMessageTypes().get(873); internal_static_google_cloud_compute_v1_PatchRegionUrlMapRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRegionUrlMapRequest_descriptor, @@ -32301,7 +32337,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RequestId", "UrlMap", "UrlMapResource", "RequestId", }); internal_static_google_cloud_compute_v1_PatchRouterRequest_descriptor = - getDescriptor().getMessageTypes().get(873); + getDescriptor().getMessageTypes().get(874); internal_static_google_cloud_compute_v1_PatchRouterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRouterRequest_descriptor, @@ -32309,7 +32345,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RequestId", "Router", "RouterResource", "RequestId", }); internal_static_google_cloud_compute_v1_PatchRuleFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(874); + getDescriptor().getMessageTypes().get(875); internal_static_google_cloud_compute_v1_PatchRuleFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRuleFirewallPolicyRequest_descriptor, @@ -32322,7 +32358,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRuleNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(875); + getDescriptor().getMessageTypes().get(876); internal_static_google_cloud_compute_v1_PatchRuleNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRuleNetworkFirewallPolicyRequest_descriptor, @@ -32336,7 +32372,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRuleRegionNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(876); + getDescriptor().getMessageTypes().get(877); internal_static_google_cloud_compute_v1_PatchRuleRegionNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRuleRegionNetworkFirewallPolicyRequest_descriptor, @@ -32351,7 +32387,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchRuleSecurityPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(877); + getDescriptor().getMessageTypes().get(878); internal_static_google_cloud_compute_v1_PatchRuleSecurityPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchRuleSecurityPolicyRequest_descriptor, @@ -32365,7 +32401,7 @@ private static void _clinit_autosplit_dinit_2() { "ValidateOnly", }); internal_static_google_cloud_compute_v1_PatchSecurityPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(878); + getDescriptor().getMessageTypes().get(879); internal_static_google_cloud_compute_v1_PatchSecurityPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchSecurityPolicyRequest_descriptor, @@ -32373,7 +32409,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "RequestId", "SecurityPolicy", "SecurityPolicyResource", "RequestId", }); internal_static_google_cloud_compute_v1_PatchServiceAttachmentRequest_descriptor = - getDescriptor().getMessageTypes().get(879); + getDescriptor().getMessageTypes().get(880); internal_static_google_cloud_compute_v1_PatchServiceAttachmentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchServiceAttachmentRequest_descriptor, @@ -32386,7 +32422,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchSslPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(880); + getDescriptor().getMessageTypes().get(881); internal_static_google_cloud_compute_v1_PatchSslPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchSslPolicyRequest_descriptor, @@ -32394,7 +32430,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "RequestId", "SslPolicy", "SslPolicyResource", "RequestId", }); internal_static_google_cloud_compute_v1_PatchSubnetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(881); + getDescriptor().getMessageTypes().get(882); internal_static_google_cloud_compute_v1_PatchSubnetworkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchSubnetworkRequest_descriptor, @@ -32409,7 +32445,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_PatchTargetGrpcProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(882); + getDescriptor().getMessageTypes().get(883); internal_static_google_cloud_compute_v1_PatchTargetGrpcProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchTargetGrpcProxyRequest_descriptor, @@ -32417,7 +32453,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "RequestId", "TargetGrpcProxy", "TargetGrpcProxyResource", "RequestId", }); internal_static_google_cloud_compute_v1_PatchTargetHttpProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(883); + getDescriptor().getMessageTypes().get(884); internal_static_google_cloud_compute_v1_PatchTargetHttpProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchTargetHttpProxyRequest_descriptor, @@ -32425,7 +32461,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "RequestId", "TargetHttpProxy", "TargetHttpProxyResource", "RequestId", }); internal_static_google_cloud_compute_v1_PatchTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(884); + getDescriptor().getMessageTypes().get(885); internal_static_google_cloud_compute_v1_PatchTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchTargetHttpsProxyRequest_descriptor, @@ -32433,7 +32469,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "RequestId", "TargetHttpsProxy", "TargetHttpsProxyResource", "RequestId", }); internal_static_google_cloud_compute_v1_PatchUrlMapRequest_descriptor = - getDescriptor().getMessageTypes().get(885); + getDescriptor().getMessageTypes().get(886); internal_static_google_cloud_compute_v1_PatchUrlMapRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PatchUrlMapRequest_descriptor, @@ -32441,7 +32477,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "RequestId", "UrlMap", "UrlMapResource", "RequestId", }); internal_static_google_cloud_compute_v1_PathMatcher_descriptor = - getDescriptor().getMessageTypes().get(886); + getDescriptor().getMessageTypes().get(887); internal_static_google_cloud_compute_v1_PathMatcher_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PathMatcher_descriptor, @@ -32462,7 +32498,7 @@ private static void _clinit_autosplit_dinit_2() { "Name", }); internal_static_google_cloud_compute_v1_PathRule_descriptor = - getDescriptor().getMessageTypes().get(887); + getDescriptor().getMessageTypes().get(888); internal_static_google_cloud_compute_v1_PathRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PathRule_descriptor, @@ -32476,7 +32512,7 @@ private static void _clinit_autosplit_dinit_2() { "UrlRedirect", }); internal_static_google_cloud_compute_v1_PerInstanceConfig_descriptor = - getDescriptor().getMessageTypes().get(888); + getDescriptor().getMessageTypes().get(889); internal_static_google_cloud_compute_v1_PerInstanceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PerInstanceConfig_descriptor, @@ -32491,7 +32527,7 @@ private static void _clinit_autosplit_dinit_2() { "Status", }); internal_static_google_cloud_compute_v1_Policy_descriptor = - getDescriptor().getMessageTypes().get(889); + getDescriptor().getMessageTypes().get(890); internal_static_google_cloud_compute_v1_Policy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Policy_descriptor, @@ -32507,7 +32543,7 @@ private static void _clinit_autosplit_dinit_2() { "Version", }); internal_static_google_cloud_compute_v1_PreconfiguredWafSet_descriptor = - getDescriptor().getMessageTypes().get(890); + getDescriptor().getMessageTypes().get(891); internal_static_google_cloud_compute_v1_PreconfiguredWafSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PreconfiguredWafSet_descriptor, @@ -32515,7 +32551,7 @@ private static void _clinit_autosplit_dinit_2() { "ExpressionSets", }); internal_static_google_cloud_compute_v1_PreservedState_descriptor = - getDescriptor().getMessageTypes().get(891); + getDescriptor().getMessageTypes().get(892); internal_static_google_cloud_compute_v1_PreservedState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PreservedState_descriptor, @@ -32539,7 +32575,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_PreservedStatePreservedDisk_descriptor = - getDescriptor().getMessageTypes().get(892); + getDescriptor().getMessageTypes().get(893); internal_static_google_cloud_compute_v1_PreservedStatePreservedDisk_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PreservedStatePreservedDisk_descriptor, @@ -32547,7 +32583,7 @@ private static void _clinit_autosplit_dinit_2() { "AutoDelete", "Mode", "Source", "AutoDelete", "Mode", "Source", }); internal_static_google_cloud_compute_v1_PreviewRouterRequest_descriptor = - getDescriptor().getMessageTypes().get(893); + getDescriptor().getMessageTypes().get(894); internal_static_google_cloud_compute_v1_PreviewRouterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PreviewRouterRequest_descriptor, @@ -32555,7 +32591,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "Router", "RouterResource", }); internal_static_google_cloud_compute_v1_Project_descriptor = - getDescriptor().getMessageTypes().get(894); + getDescriptor().getMessageTypes().get(895); internal_static_google_cloud_compute_v1_Project_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Project_descriptor, @@ -32588,7 +32624,7 @@ private static void _clinit_autosplit_dinit_2() { "XpnProjectStatus", }); internal_static_google_cloud_compute_v1_ProjectsDisableXpnResourceRequest_descriptor = - getDescriptor().getMessageTypes().get(895); + getDescriptor().getMessageTypes().get(896); internal_static_google_cloud_compute_v1_ProjectsDisableXpnResourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ProjectsDisableXpnResourceRequest_descriptor, @@ -32596,7 +32632,7 @@ private static void _clinit_autosplit_dinit_2() { "XpnResource", "XpnResource", }); internal_static_google_cloud_compute_v1_ProjectsEnableXpnResourceRequest_descriptor = - getDescriptor().getMessageTypes().get(896); + getDescriptor().getMessageTypes().get(897); internal_static_google_cloud_compute_v1_ProjectsEnableXpnResourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ProjectsEnableXpnResourceRequest_descriptor, @@ -32604,7 +32640,7 @@ private static void _clinit_autosplit_dinit_2() { "XpnResource", "XpnResource", }); internal_static_google_cloud_compute_v1_ProjectsGetXpnResources_descriptor = - getDescriptor().getMessageTypes().get(897); + getDescriptor().getMessageTypes().get(898); internal_static_google_cloud_compute_v1_ProjectsGetXpnResources_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ProjectsGetXpnResources_descriptor, @@ -32612,7 +32648,7 @@ private static void _clinit_autosplit_dinit_2() { "Kind", "NextPageToken", "Resources", "Kind", "NextPageToken", }); internal_static_google_cloud_compute_v1_ProjectsListXpnHostsRequest_descriptor = - getDescriptor().getMessageTypes().get(898); + getDescriptor().getMessageTypes().get(899); internal_static_google_cloud_compute_v1_ProjectsListXpnHostsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ProjectsListXpnHostsRequest_descriptor, @@ -32620,7 +32656,7 @@ private static void _clinit_autosplit_dinit_2() { "Organization", "Organization", }); internal_static_google_cloud_compute_v1_ProjectsSetDefaultNetworkTierRequest_descriptor = - getDescriptor().getMessageTypes().get(899); + getDescriptor().getMessageTypes().get(900); internal_static_google_cloud_compute_v1_ProjectsSetDefaultNetworkTierRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ProjectsSetDefaultNetworkTierRequest_descriptor, @@ -32628,7 +32664,7 @@ private static void _clinit_autosplit_dinit_2() { "NetworkTier", "NetworkTier", }); internal_static_google_cloud_compute_v1_PublicAdvertisedPrefix_descriptor = - getDescriptor().getMessageTypes().get(900); + getDescriptor().getMessageTypes().get(901); internal_static_google_cloud_compute_v1_PublicAdvertisedPrefix_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PublicAdvertisedPrefix_descriptor, @@ -32658,7 +32694,7 @@ private static void _clinit_autosplit_dinit_2() { "Status", }); internal_static_google_cloud_compute_v1_PublicAdvertisedPrefixList_descriptor = - getDescriptor().getMessageTypes().get(901); + getDescriptor().getMessageTypes().get(902); internal_static_google_cloud_compute_v1_PublicAdvertisedPrefixList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PublicAdvertisedPrefixList_descriptor, @@ -32676,7 +32712,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_PublicAdvertisedPrefixPublicDelegatedPrefix_descriptor = - getDescriptor().getMessageTypes().get(902); + getDescriptor().getMessageTypes().get(903); internal_static_google_cloud_compute_v1_PublicAdvertisedPrefixPublicDelegatedPrefix_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PublicAdvertisedPrefixPublicDelegatedPrefix_descriptor, @@ -32685,7 +32721,7 @@ private static void _clinit_autosplit_dinit_2() { "Region", "Status", }); internal_static_google_cloud_compute_v1_PublicDelegatedPrefix_descriptor = - getDescriptor().getMessageTypes().get(903); + getDescriptor().getMessageTypes().get(904); internal_static_google_cloud_compute_v1_PublicDelegatedPrefix_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PublicDelegatedPrefix_descriptor, @@ -32717,7 +32753,7 @@ private static void _clinit_autosplit_dinit_2() { "Status", }); internal_static_google_cloud_compute_v1_PublicDelegatedPrefixAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(904); + getDescriptor().getMessageTypes().get(905); internal_static_google_cloud_compute_v1_PublicDelegatedPrefixAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PublicDelegatedPrefixAggregatedList_descriptor, @@ -32746,7 +32782,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_PublicDelegatedPrefixList_descriptor = - getDescriptor().getMessageTypes().get(905); + getDescriptor().getMessageTypes().get(906); internal_static_google_cloud_compute_v1_PublicDelegatedPrefixList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PublicDelegatedPrefixList_descriptor, @@ -32764,7 +32800,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_PublicDelegatedPrefixPublicDelegatedSubPrefix_descriptor = - getDescriptor().getMessageTypes().get(906); + getDescriptor().getMessageTypes().get(907); internal_static_google_cloud_compute_v1_PublicDelegatedPrefixPublicDelegatedSubPrefix_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PublicDelegatedPrefixPublicDelegatedSubPrefix_descriptor, @@ -32785,7 +32821,7 @@ private static void _clinit_autosplit_dinit_2() { "Status", }); internal_static_google_cloud_compute_v1_PublicDelegatedPrefixesScopedList_descriptor = - getDescriptor().getMessageTypes().get(907); + getDescriptor().getMessageTypes().get(908); internal_static_google_cloud_compute_v1_PublicDelegatedPrefixesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_PublicDelegatedPrefixesScopedList_descriptor, @@ -32793,7 +32829,7 @@ private static void _clinit_autosplit_dinit_2() { "PublicDelegatedPrefixes", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_Quota_descriptor = - getDescriptor().getMessageTypes().get(908); + getDescriptor().getMessageTypes().get(909); internal_static_google_cloud_compute_v1_Quota_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Quota_descriptor, @@ -32801,7 +32837,7 @@ private static void _clinit_autosplit_dinit_2() { "Limit", "Metric", "Owner", "Usage", "Limit", "Metric", "Owner", "Usage", }); internal_static_google_cloud_compute_v1_QuotaExceededInfo_descriptor = - getDescriptor().getMessageTypes().get(909); + getDescriptor().getMessageTypes().get(910); internal_static_google_cloud_compute_v1_QuotaExceededInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_QuotaExceededInfo_descriptor, @@ -32819,7 +32855,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_RawDisk_descriptor = - getDescriptor().getMessageTypes().get(910); + getDescriptor().getMessageTypes().get(911); internal_static_google_cloud_compute_v1_RawDisk_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RawDisk_descriptor, @@ -32827,7 +32863,7 @@ private static void _clinit_autosplit_dinit_2() { "ContainerType", "Sha1Checksum", "Source", "ContainerType", "Sha1Checksum", "Source", }); internal_static_google_cloud_compute_v1_RecreateInstancesInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(911); + getDescriptor().getMessageTypes().get(912); internal_static_google_cloud_compute_v1_RecreateInstancesInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RecreateInstancesInstanceGroupManagerRequest_descriptor, @@ -32840,7 +32876,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RecreateInstancesRegionInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(912); + getDescriptor().getMessageTypes().get(913); internal_static_google_cloud_compute_v1_RecreateInstancesRegionInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RecreateInstancesRegionInstanceGroupManagerRequest_descriptor, @@ -32853,7 +32889,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_Reference_descriptor = - getDescriptor().getMessageTypes().get(913); + getDescriptor().getMessageTypes().get(914); internal_static_google_cloud_compute_v1_Reference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Reference_descriptor, @@ -32868,7 +32904,7 @@ private static void _clinit_autosplit_dinit_2() { "Target", }); internal_static_google_cloud_compute_v1_Region_descriptor = - getDescriptor().getMessageTypes().get(914); + getDescriptor().getMessageTypes().get(915); internal_static_google_cloud_compute_v1_Region_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Region_descriptor, @@ -32895,7 +32931,7 @@ private static void _clinit_autosplit_dinit_2() { "SupportsPzs", }); internal_static_google_cloud_compute_v1_RegionAutoscalerList_descriptor = - getDescriptor().getMessageTypes().get(915); + getDescriptor().getMessageTypes().get(916); internal_static_google_cloud_compute_v1_RegionAutoscalerList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionAutoscalerList_descriptor, @@ -32913,7 +32949,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_RegionDiskTypeList_descriptor = - getDescriptor().getMessageTypes().get(916); + getDescriptor().getMessageTypes().get(917); internal_static_google_cloud_compute_v1_RegionDiskTypeList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionDiskTypeList_descriptor, @@ -32931,7 +32967,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_RegionDisksAddResourcePoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(917); + getDescriptor().getMessageTypes().get(918); internal_static_google_cloud_compute_v1_RegionDisksAddResourcePoliciesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionDisksAddResourcePoliciesRequest_descriptor, @@ -32939,7 +32975,7 @@ private static void _clinit_autosplit_dinit_2() { "ResourcePolicies", }); internal_static_google_cloud_compute_v1_RegionDisksRemoveResourcePoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(918); + getDescriptor().getMessageTypes().get(919); internal_static_google_cloud_compute_v1_RegionDisksRemoveResourcePoliciesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionDisksRemoveResourcePoliciesRequest_descriptor, @@ -32947,7 +32983,7 @@ private static void _clinit_autosplit_dinit_2() { "ResourcePolicies", }); internal_static_google_cloud_compute_v1_RegionDisksResizeRequest_descriptor = - getDescriptor().getMessageTypes().get(919); + getDescriptor().getMessageTypes().get(920); internal_static_google_cloud_compute_v1_RegionDisksResizeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionDisksResizeRequest_descriptor, @@ -32955,7 +32991,7 @@ private static void _clinit_autosplit_dinit_2() { "SizeGb", "SizeGb", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupList_descriptor = - getDescriptor().getMessageTypes().get(920); + getDescriptor().getMessageTypes().get(921); internal_static_google_cloud_compute_v1_RegionInstanceGroupList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupList_descriptor, @@ -32973,7 +33009,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerDeleteInstanceConfigReq_descriptor = - getDescriptor().getMessageTypes().get(921); + getDescriptor().getMessageTypes().get(922); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerDeleteInstanceConfigReq_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerDeleteInstanceConfigReq_descriptor, @@ -32981,7 +33017,7 @@ private static void _clinit_autosplit_dinit_2() { "Names", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerList_descriptor = - getDescriptor().getMessageTypes().get(922); + getDescriptor().getMessageTypes().get(923); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerList_descriptor, @@ -32999,7 +33035,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerPatchInstanceConfigReq_descriptor = - getDescriptor().getMessageTypes().get(923); + getDescriptor().getMessageTypes().get(924); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerPatchInstanceConfigReq_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerPatchInstanceConfigReq_descriptor, @@ -33007,7 +33043,7 @@ private static void _clinit_autosplit_dinit_2() { "PerInstanceConfigs", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerUpdateInstanceConfigReq_descriptor = - getDescriptor().getMessageTypes().get(924); + getDescriptor().getMessageTypes().get(925); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerUpdateInstanceConfigReq_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerUpdateInstanceConfigReq_descriptor, @@ -33015,7 +33051,7 @@ private static void _clinit_autosplit_dinit_2() { "PerInstanceConfigs", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersAbandonInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(925); + getDescriptor().getMessageTypes().get(926); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersAbandonInstancesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersAbandonInstancesRequest_descriptor, @@ -33023,7 +33059,7 @@ private static void _clinit_autosplit_dinit_2() { "Instances", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersApplyUpdatesRequest_descriptor = - getDescriptor().getMessageTypes().get(926); + getDescriptor().getMessageTypes().get(927); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersApplyUpdatesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersApplyUpdatesRequest_descriptor, @@ -33037,7 +33073,7 @@ private static void _clinit_autosplit_dinit_2() { "MostDisruptiveAllowedAction", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersCreateInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(927); + getDescriptor().getMessageTypes().get(928); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersCreateInstancesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersCreateInstancesRequest_descriptor, @@ -33045,7 +33081,7 @@ private static void _clinit_autosplit_dinit_2() { "Instances", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(928); + getDescriptor().getMessageTypes().get(929); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_descriptor, @@ -33053,7 +33089,7 @@ private static void _clinit_autosplit_dinit_2() { "Instances", "SkipInstancesOnValidationError", "SkipInstancesOnValidationError", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListErrorsResponse_descriptor = - getDescriptor().getMessageTypes().get(929); + getDescriptor().getMessageTypes().get(930); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListErrorsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListErrorsResponse_descriptor, @@ -33061,7 +33097,7 @@ private static void _clinit_autosplit_dinit_2() { "Items", "NextPageToken", "NextPageToken", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListInstanceConfigsResp_descriptor = - getDescriptor().getMessageTypes().get(930); + getDescriptor().getMessageTypes().get(931); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListInstanceConfigsResp_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListInstanceConfigsResp_descriptor, @@ -33069,7 +33105,7 @@ private static void _clinit_autosplit_dinit_2() { "Items", "NextPageToken", "Warning", "NextPageToken", "Warning", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListInstancesResponse_descriptor = - getDescriptor().getMessageTypes().get(931); + getDescriptor().getMessageTypes().get(932); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListInstancesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListInstancesResponse_descriptor, @@ -33077,7 +33113,7 @@ private static void _clinit_autosplit_dinit_2() { "ManagedInstances", "NextPageToken", "NextPageToken", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersRecreateRequest_descriptor = - getDescriptor().getMessageTypes().get(932); + getDescriptor().getMessageTypes().get(933); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersRecreateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersRecreateRequest_descriptor, @@ -33085,7 +33121,7 @@ private static void _clinit_autosplit_dinit_2() { "Instances", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersSetTargetPoolsRequest_descriptor = - getDescriptor().getMessageTypes().get(933); + getDescriptor().getMessageTypes().get(934); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersSetTargetPoolsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersSetTargetPoolsRequest_descriptor, @@ -33093,7 +33129,7 @@ private static void _clinit_autosplit_dinit_2() { "Fingerprint", "TargetPools", "Fingerprint", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersSetTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(934); + getDescriptor().getMessageTypes().get(935); internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersSetTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersSetTemplateRequest_descriptor, @@ -33101,7 +33137,7 @@ private static void _clinit_autosplit_dinit_2() { "InstanceTemplate", "InstanceTemplate", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupsListInstances_descriptor = - getDescriptor().getMessageTypes().get(935); + getDescriptor().getMessageTypes().get(936); internal_static_google_cloud_compute_v1_RegionInstanceGroupsListInstances_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupsListInstances_descriptor, @@ -33119,7 +33155,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupsListInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(936); + getDescriptor().getMessageTypes().get(937); internal_static_google_cloud_compute_v1_RegionInstanceGroupsListInstancesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupsListInstancesRequest_descriptor, @@ -33127,7 +33163,7 @@ private static void _clinit_autosplit_dinit_2() { "InstanceState", "PortName", "InstanceState", "PortName", }); internal_static_google_cloud_compute_v1_RegionInstanceGroupsSetNamedPortsRequest_descriptor = - getDescriptor().getMessageTypes().get(937); + getDescriptor().getMessageTypes().get(938); internal_static_google_cloud_compute_v1_RegionInstanceGroupsSetNamedPortsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionInstanceGroupsSetNamedPortsRequest_descriptor, @@ -33135,7 +33171,7 @@ private static void _clinit_autosplit_dinit_2() { "Fingerprint", "NamedPorts", "Fingerprint", }); internal_static_google_cloud_compute_v1_RegionList_descriptor = - getDescriptor().getMessageTypes().get(938); + getDescriptor().getMessageTypes().get(939); internal_static_google_cloud_compute_v1_RegionList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionList_descriptor, @@ -33153,7 +33189,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_descriptor = - getDescriptor().getMessageTypes().get(939); + getDescriptor().getMessageTypes().get(940); internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_descriptor, @@ -33161,7 +33197,7 @@ private static void _clinit_autosplit_dinit_2() { "FirewallPolicys", "Firewalls", }); internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy_descriptor = - getDescriptor().getMessageTypes().get(940); + getDescriptor().getMessageTypes().get(941); internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy_descriptor, @@ -33169,7 +33205,7 @@ private static void _clinit_autosplit_dinit_2() { "DisplayName", "Name", "Rules", "Type", "DisplayName", "Name", "Type", }); internal_static_google_cloud_compute_v1_RegionSetLabelsRequest_descriptor = - getDescriptor().getMessageTypes().get(941); + getDescriptor().getMessageTypes().get(942); internal_static_google_cloud_compute_v1_RegionSetLabelsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionSetLabelsRequest_descriptor, @@ -33187,7 +33223,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_RegionSetPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(942); + getDescriptor().getMessageTypes().get(943); internal_static_google_cloud_compute_v1_RegionSetPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionSetPolicyRequest_descriptor, @@ -33195,7 +33231,7 @@ private static void _clinit_autosplit_dinit_2() { "Bindings", "Etag", "Policy", "Etag", "Policy", }); internal_static_google_cloud_compute_v1_RegionTargetHttpsProxiesSetSslCertificatesRequest_descriptor = - getDescriptor().getMessageTypes().get(943); + getDescriptor().getMessageTypes().get(944); internal_static_google_cloud_compute_v1_RegionTargetHttpsProxiesSetSslCertificatesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionTargetHttpsProxiesSetSslCertificatesRequest_descriptor, @@ -33203,7 +33239,7 @@ private static void _clinit_autosplit_dinit_2() { "SslCertificates", }); internal_static_google_cloud_compute_v1_RegionUrlMapsValidateRequest_descriptor = - getDescriptor().getMessageTypes().get(944); + getDescriptor().getMessageTypes().get(945); internal_static_google_cloud_compute_v1_RegionUrlMapsValidateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RegionUrlMapsValidateRequest_descriptor, @@ -33211,7 +33247,7 @@ private static void _clinit_autosplit_dinit_2() { "Resource", "Resource", }); internal_static_google_cloud_compute_v1_RemoveAssociationFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(945); + getDescriptor().getMessageTypes().get(946); internal_static_google_cloud_compute_v1_RemoveAssociationFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveAssociationFirewallPolicyRequest_descriptor, @@ -33219,7 +33255,7 @@ private static void _clinit_autosplit_dinit_2() { "FirewallPolicy", "Name", "RequestId", "Name", "RequestId", }); internal_static_google_cloud_compute_v1_RemoveAssociationNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(946); + getDescriptor().getMessageTypes().get(947); internal_static_google_cloud_compute_v1_RemoveAssociationNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveAssociationNetworkFirewallPolicyRequest_descriptor, @@ -33227,7 +33263,7 @@ private static void _clinit_autosplit_dinit_2() { "FirewallPolicy", "Name", "Project", "RequestId", "Name", "RequestId", }); internal_static_google_cloud_compute_v1_RemoveAssociationRegionNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(947); + getDescriptor().getMessageTypes().get(948); internal_static_google_cloud_compute_v1_RemoveAssociationRegionNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveAssociationRegionNetworkFirewallPolicyRequest_descriptor, @@ -33235,7 +33271,7 @@ private static void _clinit_autosplit_dinit_2() { "FirewallPolicy", "Name", "Project", "Region", "RequestId", "Name", "RequestId", }); internal_static_google_cloud_compute_v1_RemoveHealthCheckTargetPoolRequest_descriptor = - getDescriptor().getMessageTypes().get(948); + getDescriptor().getMessageTypes().get(949); internal_static_google_cloud_compute_v1_RemoveHealthCheckTargetPoolRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveHealthCheckTargetPoolRequest_descriptor, @@ -33248,7 +33284,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RemoveInstanceTargetPoolRequest_descriptor = - getDescriptor().getMessageTypes().get(949); + getDescriptor().getMessageTypes().get(950); internal_static_google_cloud_compute_v1_RemoveInstanceTargetPoolRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveInstanceTargetPoolRequest_descriptor, @@ -33261,7 +33297,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RemoveInstancesInstanceGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(950); + getDescriptor().getMessageTypes().get(951); internal_static_google_cloud_compute_v1_RemoveInstancesInstanceGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveInstancesInstanceGroupRequest_descriptor, @@ -33274,7 +33310,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RemovePeeringNetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(951); + getDescriptor().getMessageTypes().get(952); internal_static_google_cloud_compute_v1_RemovePeeringNetworkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemovePeeringNetworkRequest_descriptor, @@ -33286,7 +33322,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RemoveResourcePoliciesDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(952); + getDescriptor().getMessageTypes().get(953); internal_static_google_cloud_compute_v1_RemoveResourcePoliciesDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveResourcePoliciesDiskRequest_descriptor, @@ -33299,7 +33335,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RemoveResourcePoliciesInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(953); + getDescriptor().getMessageTypes().get(954); internal_static_google_cloud_compute_v1_RemoveResourcePoliciesInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveResourcePoliciesInstanceRequest_descriptor, @@ -33312,7 +33348,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RemoveResourcePoliciesRegionDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(954); + getDescriptor().getMessageTypes().get(955); internal_static_google_cloud_compute_v1_RemoveResourcePoliciesRegionDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveResourcePoliciesRegionDiskRequest_descriptor, @@ -33325,7 +33361,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RemoveRuleFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(955); + getDescriptor().getMessageTypes().get(956); internal_static_google_cloud_compute_v1_RemoveRuleFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveRuleFirewallPolicyRequest_descriptor, @@ -33333,7 +33369,7 @@ private static void _clinit_autosplit_dinit_2() { "FirewallPolicy", "Priority", "RequestId", "Priority", "RequestId", }); internal_static_google_cloud_compute_v1_RemoveRuleNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(956); + getDescriptor().getMessageTypes().get(957); internal_static_google_cloud_compute_v1_RemoveRuleNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveRuleNetworkFirewallPolicyRequest_descriptor, @@ -33341,7 +33377,7 @@ private static void _clinit_autosplit_dinit_2() { "FirewallPolicy", "Priority", "Project", "RequestId", "Priority", "RequestId", }); internal_static_google_cloud_compute_v1_RemoveRuleRegionNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(957); + getDescriptor().getMessageTypes().get(958); internal_static_google_cloud_compute_v1_RemoveRuleRegionNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveRuleRegionNetworkFirewallPolicyRequest_descriptor, @@ -33355,7 +33391,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_RemoveRuleSecurityPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(958); + getDescriptor().getMessageTypes().get(959); internal_static_google_cloud_compute_v1_RemoveRuleSecurityPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RemoveRuleSecurityPolicyRequest_descriptor, @@ -33363,7 +33399,7 @@ private static void _clinit_autosplit_dinit_2() { "Priority", "Project", "SecurityPolicy", "Priority", }); internal_static_google_cloud_compute_v1_RequestMirrorPolicy_descriptor = - getDescriptor().getMessageTypes().get(959); + getDescriptor().getMessageTypes().get(960); internal_static_google_cloud_compute_v1_RequestMirrorPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RequestMirrorPolicy_descriptor, @@ -33371,7 +33407,7 @@ private static void _clinit_autosplit_dinit_2() { "BackendService", "BackendService", }); internal_static_google_cloud_compute_v1_Reservation_descriptor = - getDescriptor().getMessageTypes().get(960); + getDescriptor().getMessageTypes().get(961); internal_static_google_cloud_compute_v1_Reservation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Reservation_descriptor, @@ -33415,7 +33451,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_ReservationAffinity_descriptor = - getDescriptor().getMessageTypes().get(961); + getDescriptor().getMessageTypes().get(962); internal_static_google_cloud_compute_v1_ReservationAffinity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ReservationAffinity_descriptor, @@ -33423,7 +33459,7 @@ private static void _clinit_autosplit_dinit_2() { "ConsumeReservationType", "Key", "Values", "ConsumeReservationType", "Key", }); internal_static_google_cloud_compute_v1_ReservationAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(962); + getDescriptor().getMessageTypes().get(963); internal_static_google_cloud_compute_v1_ReservationAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ReservationAggregatedList_descriptor, @@ -33452,7 +33488,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_ReservationList_descriptor = - getDescriptor().getMessageTypes().get(963); + getDescriptor().getMessageTypes().get(964); internal_static_google_cloud_compute_v1_ReservationList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ReservationList_descriptor, @@ -33470,7 +33506,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_ReservationsResizeRequest_descriptor = - getDescriptor().getMessageTypes().get(964); + getDescriptor().getMessageTypes().get(965); internal_static_google_cloud_compute_v1_ReservationsResizeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ReservationsResizeRequest_descriptor, @@ -33478,7 +33514,7 @@ private static void _clinit_autosplit_dinit_2() { "SpecificSkuCount", "SpecificSkuCount", }); internal_static_google_cloud_compute_v1_ReservationsScopedList_descriptor = - getDescriptor().getMessageTypes().get(965); + getDescriptor().getMessageTypes().get(966); internal_static_google_cloud_compute_v1_ReservationsScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ReservationsScopedList_descriptor, @@ -33486,7 +33522,7 @@ private static void _clinit_autosplit_dinit_2() { "Reservations", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_ResetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(966); + getDescriptor().getMessageTypes().get(967); internal_static_google_cloud_compute_v1_ResetInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResetInstanceRequest_descriptor, @@ -33494,7 +33530,7 @@ private static void _clinit_autosplit_dinit_2() { "Instance", "Project", "RequestId", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_ResizeDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(967); + getDescriptor().getMessageTypes().get(968); internal_static_google_cloud_compute_v1_ResizeDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResizeDiskRequest_descriptor, @@ -33502,7 +33538,7 @@ private static void _clinit_autosplit_dinit_2() { "Disk", "DisksResizeRequestResource", "Project", "RequestId", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_ResizeInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(968); + getDescriptor().getMessageTypes().get(969); internal_static_google_cloud_compute_v1_ResizeInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResizeInstanceGroupManagerRequest_descriptor, @@ -33510,7 +33546,7 @@ private static void _clinit_autosplit_dinit_2() { "InstanceGroupManager", "Project", "RequestId", "Size", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_ResizeRegionDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(969); + getDescriptor().getMessageTypes().get(970); internal_static_google_cloud_compute_v1_ResizeRegionDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResizeRegionDiskRequest_descriptor, @@ -33523,7 +33559,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_ResizeRegionInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(970); + getDescriptor().getMessageTypes().get(971); internal_static_google_cloud_compute_v1_ResizeRegionInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResizeRegionInstanceGroupManagerRequest_descriptor, @@ -33531,7 +33567,7 @@ private static void _clinit_autosplit_dinit_2() { "InstanceGroupManager", "Project", "Region", "RequestId", "Size", "RequestId", }); internal_static_google_cloud_compute_v1_ResizeReservationRequest_descriptor = - getDescriptor().getMessageTypes().get(971); + getDescriptor().getMessageTypes().get(972); internal_static_google_cloud_compute_v1_ResizeReservationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResizeReservationRequest_descriptor, @@ -33544,7 +33580,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_ResourceCommitment_descriptor = - getDescriptor().getMessageTypes().get(972); + getDescriptor().getMessageTypes().get(973); internal_static_google_cloud_compute_v1_ResourceCommitment_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourceCommitment_descriptor, @@ -33552,7 +33588,7 @@ private static void _clinit_autosplit_dinit_2() { "AcceleratorType", "Amount", "Type", "AcceleratorType", "Amount", "Type", }); internal_static_google_cloud_compute_v1_ResourceGroupReference_descriptor = - getDescriptor().getMessageTypes().get(973); + getDescriptor().getMessageTypes().get(974); internal_static_google_cloud_compute_v1_ResourceGroupReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourceGroupReference_descriptor, @@ -33560,7 +33596,7 @@ private static void _clinit_autosplit_dinit_2() { "Group", "Group", }); internal_static_google_cloud_compute_v1_ResourcePoliciesScopedList_descriptor = - getDescriptor().getMessageTypes().get(974); + getDescriptor().getMessageTypes().get(975); internal_static_google_cloud_compute_v1_ResourcePoliciesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePoliciesScopedList_descriptor, @@ -33568,7 +33604,7 @@ private static void _clinit_autosplit_dinit_2() { "ResourcePolicies", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_ResourcePolicy_descriptor = - getDescriptor().getMessageTypes().get(975); + getDescriptor().getMessageTypes().get(976); internal_static_google_cloud_compute_v1_ResourcePolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicy_descriptor, @@ -33599,7 +33635,7 @@ private static void _clinit_autosplit_dinit_2() { "Status", }); internal_static_google_cloud_compute_v1_ResourcePolicyAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(976); + getDescriptor().getMessageTypes().get(977); internal_static_google_cloud_compute_v1_ResourcePolicyAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyAggregatedList_descriptor, @@ -33630,7 +33666,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_ResourcePolicyDailyCycle_descriptor = - getDescriptor().getMessageTypes().get(977); + getDescriptor().getMessageTypes().get(978); internal_static_google_cloud_compute_v1_ResourcePolicyDailyCycle_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyDailyCycle_descriptor, @@ -33638,7 +33674,7 @@ private static void _clinit_autosplit_dinit_2() { "DaysInCycle", "Duration", "StartTime", "DaysInCycle", "Duration", "StartTime", }); internal_static_google_cloud_compute_v1_ResourcePolicyGroupPlacementPolicy_descriptor = - getDescriptor().getMessageTypes().get(978); + getDescriptor().getMessageTypes().get(979); internal_static_google_cloud_compute_v1_ResourcePolicyGroupPlacementPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyGroupPlacementPolicy_descriptor, @@ -33651,7 +33687,7 @@ private static void _clinit_autosplit_dinit_2() { "VmCount", }); internal_static_google_cloud_compute_v1_ResourcePolicyHourlyCycle_descriptor = - getDescriptor().getMessageTypes().get(979); + getDescriptor().getMessageTypes().get(980); internal_static_google_cloud_compute_v1_ResourcePolicyHourlyCycle_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyHourlyCycle_descriptor, @@ -33659,7 +33695,7 @@ private static void _clinit_autosplit_dinit_2() { "Duration", "HoursInCycle", "StartTime", "Duration", "HoursInCycle", "StartTime", }); internal_static_google_cloud_compute_v1_ResourcePolicyInstanceSchedulePolicy_descriptor = - getDescriptor().getMessageTypes().get(980); + getDescriptor().getMessageTypes().get(981); internal_static_google_cloud_compute_v1_ResourcePolicyInstanceSchedulePolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyInstanceSchedulePolicy_descriptor, @@ -33676,7 +33712,7 @@ private static void _clinit_autosplit_dinit_2() { "VmStopSchedule", }); internal_static_google_cloud_compute_v1_ResourcePolicyInstanceSchedulePolicySchedule_descriptor = - getDescriptor().getMessageTypes().get(981); + getDescriptor().getMessageTypes().get(982); internal_static_google_cloud_compute_v1_ResourcePolicyInstanceSchedulePolicySchedule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyInstanceSchedulePolicySchedule_descriptor, @@ -33684,7 +33720,7 @@ private static void _clinit_autosplit_dinit_2() { "Schedule", "Schedule", }); internal_static_google_cloud_compute_v1_ResourcePolicyList_descriptor = - getDescriptor().getMessageTypes().get(982); + getDescriptor().getMessageTypes().get(983); internal_static_google_cloud_compute_v1_ResourcePolicyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyList_descriptor, @@ -33704,7 +33740,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_ResourcePolicyResourceStatus_descriptor = - getDescriptor().getMessageTypes().get(983); + getDescriptor().getMessageTypes().get(984); internal_static_google_cloud_compute_v1_ResourcePolicyResourceStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyResourceStatus_descriptor, @@ -33712,7 +33748,7 @@ private static void _clinit_autosplit_dinit_2() { "InstanceSchedulePolicy", "InstanceSchedulePolicy", }); internal_static_google_cloud_compute_v1_ResourcePolicyResourceStatusInstanceSchedulePolicyStatus_descriptor = - getDescriptor().getMessageTypes().get(984); + getDescriptor().getMessageTypes().get(985); internal_static_google_cloud_compute_v1_ResourcePolicyResourceStatusInstanceSchedulePolicyStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyResourceStatusInstanceSchedulePolicyStatus_descriptor, @@ -33720,7 +33756,7 @@ private static void _clinit_autosplit_dinit_2() { "LastRunStartTime", "NextRunStartTime", "LastRunStartTime", "NextRunStartTime", }); internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicy_descriptor = - getDescriptor().getMessageTypes().get(985); + getDescriptor().getMessageTypes().get(986); internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicy_descriptor, @@ -33733,7 +33769,7 @@ private static void _clinit_autosplit_dinit_2() { "SnapshotProperties", }); internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicyRetentionPolicy_descriptor = - getDescriptor().getMessageTypes().get(986); + getDescriptor().getMessageTypes().get(987); internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicyRetentionPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicyRetentionPolicy_descriptor, @@ -33741,7 +33777,7 @@ private static void _clinit_autosplit_dinit_2() { "MaxRetentionDays", "OnSourceDiskDelete", "MaxRetentionDays", "OnSourceDiskDelete", }); internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicySchedule_descriptor = - getDescriptor().getMessageTypes().get(987); + getDescriptor().getMessageTypes().get(988); internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicySchedule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicySchedule_descriptor, @@ -33754,7 +33790,7 @@ private static void _clinit_autosplit_dinit_2() { "WeeklySchedule", }); internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicySnapshotProperties_descriptor = - getDescriptor().getMessageTypes().get(988); + getDescriptor().getMessageTypes().get(989); internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicySnapshotProperties_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicySnapshotProperties_descriptor, @@ -33772,7 +33808,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_ResourcePolicyWeeklyCycle_descriptor = - getDescriptor().getMessageTypes().get(989); + getDescriptor().getMessageTypes().get(990); internal_static_google_cloud_compute_v1_ResourcePolicyWeeklyCycle_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyWeeklyCycle_descriptor, @@ -33780,7 +33816,7 @@ private static void _clinit_autosplit_dinit_2() { "DayOfWeeks", }); internal_static_google_cloud_compute_v1_ResourcePolicyWeeklyCycleDayOfWeek_descriptor = - getDescriptor().getMessageTypes().get(990); + getDescriptor().getMessageTypes().get(991); internal_static_google_cloud_compute_v1_ResourcePolicyWeeklyCycleDayOfWeek_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourcePolicyWeeklyCycleDayOfWeek_descriptor, @@ -33788,7 +33824,7 @@ private static void _clinit_autosplit_dinit_2() { "Day", "Duration", "StartTime", "Day", "Duration", "StartTime", }); internal_static_google_cloud_compute_v1_ResourceStatus_descriptor = - getDescriptor().getMessageTypes().get(991); + getDescriptor().getMessageTypes().get(992); internal_static_google_cloud_compute_v1_ResourceStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResourceStatus_descriptor, @@ -33796,7 +33832,7 @@ private static void _clinit_autosplit_dinit_2() { "PhysicalHost", "PhysicalHost", }); internal_static_google_cloud_compute_v1_ResumeInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(992); + getDescriptor().getMessageTypes().get(993); internal_static_google_cloud_compute_v1_ResumeInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ResumeInstanceRequest_descriptor, @@ -33804,7 +33840,7 @@ private static void _clinit_autosplit_dinit_2() { "Instance", "Project", "RequestId", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_Route_descriptor = - getDescriptor().getMessageTypes().get(993); + getDescriptor().getMessageTypes().get(994); internal_static_google_cloud_compute_v1_Route_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Route_descriptor, @@ -33850,7 +33886,7 @@ private static void _clinit_autosplit_dinit_2() { "SelfLink", }); internal_static_google_cloud_compute_v1_RouteAsPath_descriptor = - getDescriptor().getMessageTypes().get(994); + getDescriptor().getMessageTypes().get(995); internal_static_google_cloud_compute_v1_RouteAsPath_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouteAsPath_descriptor, @@ -33858,7 +33894,7 @@ private static void _clinit_autosplit_dinit_2() { "AsLists", "PathSegmentType", "PathSegmentType", }); internal_static_google_cloud_compute_v1_RouteList_descriptor = - getDescriptor().getMessageTypes().get(995); + getDescriptor().getMessageTypes().get(996); internal_static_google_cloud_compute_v1_RouteList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouteList_descriptor, @@ -33876,7 +33912,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_Router_descriptor = - getDescriptor().getMessageTypes().get(996); + getDescriptor().getMessageTypes().get(997); internal_static_google_cloud_compute_v1_Router_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Router_descriptor, @@ -33907,7 +33943,7 @@ private static void _clinit_autosplit_dinit_2() { "SelfLink", }); internal_static_google_cloud_compute_v1_RouterAdvertisedIpRange_descriptor = - getDescriptor().getMessageTypes().get(997); + getDescriptor().getMessageTypes().get(998); internal_static_google_cloud_compute_v1_RouterAdvertisedIpRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterAdvertisedIpRange_descriptor, @@ -33915,7 +33951,7 @@ private static void _clinit_autosplit_dinit_2() { "Description", "Range", "Description", "Range", }); internal_static_google_cloud_compute_v1_RouterAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(998); + getDescriptor().getMessageTypes().get(999); internal_static_google_cloud_compute_v1_RouterAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterAggregatedList_descriptor, @@ -33944,7 +33980,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_RouterBgp_descriptor = - getDescriptor().getMessageTypes().get(999); + getDescriptor().getMessageTypes().get(1000); internal_static_google_cloud_compute_v1_RouterBgp_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterBgp_descriptor, @@ -33959,7 +33995,7 @@ private static void _clinit_autosplit_dinit_2() { "KeepaliveInterval", }); internal_static_google_cloud_compute_v1_RouterBgpPeer_descriptor = - getDescriptor().getMessageTypes().get(1000); + getDescriptor().getMessageTypes().get(1001); internal_static_google_cloud_compute_v1_RouterBgpPeer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterBgpPeer_descriptor, @@ -33998,7 +34034,7 @@ private static void _clinit_autosplit_dinit_2() { "RouterApplianceInstance", }); internal_static_google_cloud_compute_v1_RouterBgpPeerBfd_descriptor = - getDescriptor().getMessageTypes().get(1001); + getDescriptor().getMessageTypes().get(1002); internal_static_google_cloud_compute_v1_RouterBgpPeerBfd_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterBgpPeerBfd_descriptor, @@ -34013,7 +34049,7 @@ private static void _clinit_autosplit_dinit_2() { "SessionInitializationMode", }); internal_static_google_cloud_compute_v1_RouterInterface_descriptor = - getDescriptor().getMessageTypes().get(1002); + getDescriptor().getMessageTypes().get(1003); internal_static_google_cloud_compute_v1_RouterInterface_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterInterface_descriptor, @@ -34036,7 +34072,7 @@ private static void _clinit_autosplit_dinit_2() { "Subnetwork", }); internal_static_google_cloud_compute_v1_RouterList_descriptor = - getDescriptor().getMessageTypes().get(1003); + getDescriptor().getMessageTypes().get(1004); internal_static_google_cloud_compute_v1_RouterList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterList_descriptor, @@ -34054,7 +34090,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_RouterMd5AuthenticationKey_descriptor = - getDescriptor().getMessageTypes().get(1004); + getDescriptor().getMessageTypes().get(1005); internal_static_google_cloud_compute_v1_RouterMd5AuthenticationKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterMd5AuthenticationKey_descriptor, @@ -34062,7 +34098,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Name", "Key", "Name", }); internal_static_google_cloud_compute_v1_RouterNat_descriptor = - getDescriptor().getMessageTypes().get(1005); + getDescriptor().getMessageTypes().get(1006); internal_static_google_cloud_compute_v1_RouterNat_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterNat_descriptor, @@ -34100,7 +34136,7 @@ private static void _clinit_autosplit_dinit_2() { "UdpIdleTimeoutSec", }); internal_static_google_cloud_compute_v1_RouterNatLogConfig_descriptor = - getDescriptor().getMessageTypes().get(1006); + getDescriptor().getMessageTypes().get(1007); internal_static_google_cloud_compute_v1_RouterNatLogConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterNatLogConfig_descriptor, @@ -34108,7 +34144,7 @@ private static void _clinit_autosplit_dinit_2() { "Enable", "Filter", "Enable", "Filter", }); internal_static_google_cloud_compute_v1_RouterNatRule_descriptor = - getDescriptor().getMessageTypes().get(1007); + getDescriptor().getMessageTypes().get(1008); internal_static_google_cloud_compute_v1_RouterNatRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterNatRule_descriptor, @@ -34123,7 +34159,7 @@ private static void _clinit_autosplit_dinit_2() { "RuleNumber", }); internal_static_google_cloud_compute_v1_RouterNatRuleAction_descriptor = - getDescriptor().getMessageTypes().get(1008); + getDescriptor().getMessageTypes().get(1009); internal_static_google_cloud_compute_v1_RouterNatRuleAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterNatRuleAction_descriptor, @@ -34131,7 +34167,7 @@ private static void _clinit_autosplit_dinit_2() { "SourceNatActiveIps", "SourceNatDrainIps", }); internal_static_google_cloud_compute_v1_RouterNatSubnetworkToNat_descriptor = - getDescriptor().getMessageTypes().get(1009); + getDescriptor().getMessageTypes().get(1010); internal_static_google_cloud_compute_v1_RouterNatSubnetworkToNat_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterNatSubnetworkToNat_descriptor, @@ -34139,7 +34175,7 @@ private static void _clinit_autosplit_dinit_2() { "Name", "SecondaryIpRangeNames", "SourceIpRangesToNat", "Name", }); internal_static_google_cloud_compute_v1_RouterStatus_descriptor = - getDescriptor().getMessageTypes().get(1010); + getDescriptor().getMessageTypes().get(1011); internal_static_google_cloud_compute_v1_RouterStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterStatus_descriptor, @@ -34152,7 +34188,7 @@ private static void _clinit_autosplit_dinit_2() { "Network", }); internal_static_google_cloud_compute_v1_RouterStatusBgpPeerStatus_descriptor = - getDescriptor().getMessageTypes().get(1011); + getDescriptor().getMessageTypes().get(1012); internal_static_google_cloud_compute_v1_RouterStatusBgpPeerStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterStatusBgpPeerStatus_descriptor, @@ -34192,7 +34228,7 @@ private static void _clinit_autosplit_dinit_2() { "UptimeSeconds", }); internal_static_google_cloud_compute_v1_RouterStatusNatStatus_descriptor = - getDescriptor().getMessageTypes().get(1012); + getDescriptor().getMessageTypes().get(1013); internal_static_google_cloud_compute_v1_RouterStatusNatStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterStatusNatStatus_descriptor, @@ -34211,7 +34247,7 @@ private static void _clinit_autosplit_dinit_2() { "NumVmEndpointsWithNatMappings", }); internal_static_google_cloud_compute_v1_RouterStatusNatStatusNatRuleStatus_descriptor = - getDescriptor().getMessageTypes().get(1013); + getDescriptor().getMessageTypes().get(1014); internal_static_google_cloud_compute_v1_RouterStatusNatStatusNatRuleStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterStatusNatStatusNatRuleStatus_descriptor, @@ -34226,7 +34262,7 @@ private static void _clinit_autosplit_dinit_2() { "RuleNumber", }); internal_static_google_cloud_compute_v1_RouterStatusResponse_descriptor = - getDescriptor().getMessageTypes().get(1014); + getDescriptor().getMessageTypes().get(1015); internal_static_google_cloud_compute_v1_RouterStatusResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RouterStatusResponse_descriptor, @@ -34234,7 +34270,7 @@ private static void _clinit_autosplit_dinit_2() { "Kind", "Result", "Kind", "Result", }); internal_static_google_cloud_compute_v1_RoutersPreviewResponse_descriptor = - getDescriptor().getMessageTypes().get(1015); + getDescriptor().getMessageTypes().get(1016); internal_static_google_cloud_compute_v1_RoutersPreviewResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RoutersPreviewResponse_descriptor, @@ -34242,7 +34278,7 @@ private static void _clinit_autosplit_dinit_2() { "Resource", "Resource", }); internal_static_google_cloud_compute_v1_RoutersScopedList_descriptor = - getDescriptor().getMessageTypes().get(1016); + getDescriptor().getMessageTypes().get(1017); internal_static_google_cloud_compute_v1_RoutersScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_RoutersScopedList_descriptor, @@ -34250,7 +34286,7 @@ private static void _clinit_autosplit_dinit_2() { "Routers", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_Rule_descriptor = - getDescriptor().getMessageTypes().get(1017); + getDescriptor().getMessageTypes().get(1018); internal_static_google_cloud_compute_v1_Rule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Rule_descriptor, @@ -34266,7 +34302,7 @@ private static void _clinit_autosplit_dinit_2() { "Description", }); internal_static_google_cloud_compute_v1_SSLHealthCheck_descriptor = - getDescriptor().getMessageTypes().get(1018); + getDescriptor().getMessageTypes().get(1019); internal_static_google_cloud_compute_v1_SSLHealthCheck_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SSLHealthCheck_descriptor, @@ -34285,7 +34321,7 @@ private static void _clinit_autosplit_dinit_2() { "Response", }); internal_static_google_cloud_compute_v1_SavedAttachedDisk_descriptor = - getDescriptor().getMessageTypes().get(1019); + getDescriptor().getMessageTypes().get(1020); internal_static_google_cloud_compute_v1_SavedAttachedDisk_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SavedAttachedDisk_descriptor, @@ -34322,7 +34358,7 @@ private static void _clinit_autosplit_dinit_2() { "Type", }); internal_static_google_cloud_compute_v1_SavedDisk_descriptor = - getDescriptor().getMessageTypes().get(1020); + getDescriptor().getMessageTypes().get(1021); internal_static_google_cloud_compute_v1_SavedDisk_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SavedDisk_descriptor, @@ -34339,7 +34375,7 @@ private static void _clinit_autosplit_dinit_2() { "StorageBytesStatus", }); internal_static_google_cloud_compute_v1_ScalingScheduleStatus_descriptor = - getDescriptor().getMessageTypes().get(1021); + getDescriptor().getMessageTypes().get(1022); internal_static_google_cloud_compute_v1_ScalingScheduleStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ScalingScheduleStatus_descriptor, @@ -34347,7 +34383,7 @@ private static void _clinit_autosplit_dinit_2() { "LastStartTime", "NextStartTime", "State", "LastStartTime", "NextStartTime", "State", }); internal_static_google_cloud_compute_v1_Scheduling_descriptor = - getDescriptor().getMessageTypes().get(1022); + getDescriptor().getMessageTypes().get(1023); internal_static_google_cloud_compute_v1_Scheduling_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Scheduling_descriptor, @@ -34369,7 +34405,7 @@ private static void _clinit_autosplit_dinit_2() { "ProvisioningModel", }); internal_static_google_cloud_compute_v1_SchedulingNodeAffinity_descriptor = - getDescriptor().getMessageTypes().get(1023); + getDescriptor().getMessageTypes().get(1024); internal_static_google_cloud_compute_v1_SchedulingNodeAffinity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SchedulingNodeAffinity_descriptor, @@ -34377,7 +34413,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Operator", "Values", "Key", "Operator", }); internal_static_google_cloud_compute_v1_ScratchDisks_descriptor = - getDescriptor().getMessageTypes().get(1024); + getDescriptor().getMessageTypes().get(1025); internal_static_google_cloud_compute_v1_ScratchDisks_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ScratchDisks_descriptor, @@ -34385,7 +34421,7 @@ private static void _clinit_autosplit_dinit_2() { "DiskGb", "DiskGb", }); internal_static_google_cloud_compute_v1_Screenshot_descriptor = - getDescriptor().getMessageTypes().get(1025); + getDescriptor().getMessageTypes().get(1026); internal_static_google_cloud_compute_v1_Screenshot_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Screenshot_descriptor, @@ -34393,7 +34429,7 @@ private static void _clinit_autosplit_dinit_2() { "Contents", "Kind", "Contents", "Kind", }); internal_static_google_cloud_compute_v1_SecurityPoliciesAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1026); + getDescriptor().getMessageTypes().get(1027); internal_static_google_cloud_compute_v1_SecurityPoliciesAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPoliciesAggregatedList_descriptor, @@ -34424,7 +34460,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_SecurityPoliciesListPreconfiguredExpressionSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(1027); + getDescriptor().getMessageTypes().get(1028); internal_static_google_cloud_compute_v1_SecurityPoliciesListPreconfiguredExpressionSetsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPoliciesListPreconfiguredExpressionSetsResponse_descriptor, @@ -34432,7 +34468,7 @@ private static void _clinit_autosplit_dinit_2() { "PreconfiguredExpressionSets", "PreconfiguredExpressionSets", }); internal_static_google_cloud_compute_v1_SecurityPoliciesScopedList_descriptor = - getDescriptor().getMessageTypes().get(1028); + getDescriptor().getMessageTypes().get(1029); internal_static_google_cloud_compute_v1_SecurityPoliciesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPoliciesScopedList_descriptor, @@ -34440,7 +34476,7 @@ private static void _clinit_autosplit_dinit_2() { "SecurityPolicies", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_SecurityPoliciesWafConfig_descriptor = - getDescriptor().getMessageTypes().get(1029); + getDescriptor().getMessageTypes().get(1030); internal_static_google_cloud_compute_v1_SecurityPoliciesWafConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPoliciesWafConfig_descriptor, @@ -34448,7 +34484,7 @@ private static void _clinit_autosplit_dinit_2() { "WafRules", "WafRules", }); internal_static_google_cloud_compute_v1_SecurityPolicy_descriptor = - getDescriptor().getMessageTypes().get(1030); + getDescriptor().getMessageTypes().get(1031); internal_static_google_cloud_compute_v1_SecurityPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicy_descriptor, @@ -34482,7 +34518,7 @@ private static void _clinit_autosplit_dinit_2() { "Type", }); internal_static_google_cloud_compute_v1_SecurityPolicyAdaptiveProtectionConfig_descriptor = - getDescriptor().getMessageTypes().get(1031); + getDescriptor().getMessageTypes().get(1032); internal_static_google_cloud_compute_v1_SecurityPolicyAdaptiveProtectionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyAdaptiveProtectionConfig_descriptor, @@ -34490,7 +34526,7 @@ private static void _clinit_autosplit_dinit_2() { "Layer7DdosDefenseConfig", "Layer7DdosDefenseConfig", }); internal_static_google_cloud_compute_v1_SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig_descriptor = - getDescriptor().getMessageTypes().get(1032); + getDescriptor().getMessageTypes().get(1033); internal_static_google_cloud_compute_v1_SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig_descriptor, @@ -34498,7 +34534,7 @@ private static void _clinit_autosplit_dinit_2() { "Enable", "RuleVisibility", "Enable", "RuleVisibility", }); internal_static_google_cloud_compute_v1_SecurityPolicyAdvancedOptionsConfig_descriptor = - getDescriptor().getMessageTypes().get(1033); + getDescriptor().getMessageTypes().get(1034); internal_static_google_cloud_compute_v1_SecurityPolicyAdvancedOptionsConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyAdvancedOptionsConfig_descriptor, @@ -34511,7 +34547,7 @@ private static void _clinit_autosplit_dinit_2() { "LogLevel", }); internal_static_google_cloud_compute_v1_SecurityPolicyAdvancedOptionsConfigJsonCustomConfig_descriptor = - getDescriptor().getMessageTypes().get(1034); + getDescriptor().getMessageTypes().get(1035); internal_static_google_cloud_compute_v1_SecurityPolicyAdvancedOptionsConfigJsonCustomConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyAdvancedOptionsConfigJsonCustomConfig_descriptor, @@ -34519,7 +34555,7 @@ private static void _clinit_autosplit_dinit_2() { "ContentTypes", }); internal_static_google_cloud_compute_v1_SecurityPolicyDdosProtectionConfig_descriptor = - getDescriptor().getMessageTypes().get(1035); + getDescriptor().getMessageTypes().get(1036); internal_static_google_cloud_compute_v1_SecurityPolicyDdosProtectionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyDdosProtectionConfig_descriptor, @@ -34527,7 +34563,7 @@ private static void _clinit_autosplit_dinit_2() { "DdosProtection", "DdosProtection", }); internal_static_google_cloud_compute_v1_SecurityPolicyList_descriptor = - getDescriptor().getMessageTypes().get(1036); + getDescriptor().getMessageTypes().get(1037); internal_static_google_cloud_compute_v1_SecurityPolicyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyList_descriptor, @@ -34543,7 +34579,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_SecurityPolicyRecaptchaOptionsConfig_descriptor = - getDescriptor().getMessageTypes().get(1037); + getDescriptor().getMessageTypes().get(1038); internal_static_google_cloud_compute_v1_SecurityPolicyRecaptchaOptionsConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRecaptchaOptionsConfig_descriptor, @@ -34551,7 +34587,7 @@ private static void _clinit_autosplit_dinit_2() { "RedirectSiteKey", "RedirectSiteKey", }); internal_static_google_cloud_compute_v1_SecurityPolicyReference_descriptor = - getDescriptor().getMessageTypes().get(1038); + getDescriptor().getMessageTypes().get(1039); internal_static_google_cloud_compute_v1_SecurityPolicyReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyReference_descriptor, @@ -34559,7 +34595,7 @@ private static void _clinit_autosplit_dinit_2() { "SecurityPolicy", "SecurityPolicy", }); internal_static_google_cloud_compute_v1_SecurityPolicyRule_descriptor = - getDescriptor().getMessageTypes().get(1039); + getDescriptor().getMessageTypes().get(1040); internal_static_google_cloud_compute_v1_SecurityPolicyRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRule_descriptor, @@ -34586,7 +34622,7 @@ private static void _clinit_autosplit_dinit_2() { "RedirectOptions", }); internal_static_google_cloud_compute_v1_SecurityPolicyRuleHttpHeaderAction_descriptor = - getDescriptor().getMessageTypes().get(1040); + getDescriptor().getMessageTypes().get(1041); internal_static_google_cloud_compute_v1_SecurityPolicyRuleHttpHeaderAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRuleHttpHeaderAction_descriptor, @@ -34594,7 +34630,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestHeadersToAdds", }); internal_static_google_cloud_compute_v1_SecurityPolicyRuleHttpHeaderActionHttpHeaderOption_descriptor = - getDescriptor().getMessageTypes().get(1041); + getDescriptor().getMessageTypes().get(1042); internal_static_google_cloud_compute_v1_SecurityPolicyRuleHttpHeaderActionHttpHeaderOption_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRuleHttpHeaderActionHttpHeaderOption_descriptor, @@ -34602,7 +34638,7 @@ private static void _clinit_autosplit_dinit_2() { "HeaderName", "HeaderValue", "HeaderName", "HeaderValue", }); internal_static_google_cloud_compute_v1_SecurityPolicyRuleMatcher_descriptor = - getDescriptor().getMessageTypes().get(1042); + getDescriptor().getMessageTypes().get(1043); internal_static_google_cloud_compute_v1_SecurityPolicyRuleMatcher_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRuleMatcher_descriptor, @@ -34610,7 +34646,7 @@ private static void _clinit_autosplit_dinit_2() { "Config", "Expr", "VersionedExpr", "Config", "Expr", "VersionedExpr", }); internal_static_google_cloud_compute_v1_SecurityPolicyRuleMatcherConfig_descriptor = - getDescriptor().getMessageTypes().get(1043); + getDescriptor().getMessageTypes().get(1044); internal_static_google_cloud_compute_v1_SecurityPolicyRuleMatcherConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRuleMatcherConfig_descriptor, @@ -34618,7 +34654,7 @@ private static void _clinit_autosplit_dinit_2() { "SrcIpRanges", }); internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfig_descriptor = - getDescriptor().getMessageTypes().get(1044); + getDescriptor().getMessageTypes().get(1045); internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfig_descriptor, @@ -34626,7 +34662,7 @@ private static void _clinit_autosplit_dinit_2() { "Exclusions", }); internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfigExclusion_descriptor = - getDescriptor().getMessageTypes().get(1045); + getDescriptor().getMessageTypes().get(1046); internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfigExclusion_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfigExclusion_descriptor, @@ -34640,7 +34676,7 @@ private static void _clinit_autosplit_dinit_2() { "TargetRuleSet", }); internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams_descriptor = - getDescriptor().getMessageTypes().get(1046); + getDescriptor().getMessageTypes().get(1047); internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams_descriptor, @@ -34648,7 +34684,7 @@ private static void _clinit_autosplit_dinit_2() { "Op", "Val", "Op", "Val", }); internal_static_google_cloud_compute_v1_SecurityPolicyRuleRateLimitOptions_descriptor = - getDescriptor().getMessageTypes().get(1047); + getDescriptor().getMessageTypes().get(1048); internal_static_google_cloud_compute_v1_SecurityPolicyRuleRateLimitOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRuleRateLimitOptions_descriptor, @@ -34671,7 +34707,7 @@ private static void _clinit_autosplit_dinit_2() { "RateLimitThreshold", }); internal_static_google_cloud_compute_v1_SecurityPolicyRuleRateLimitOptionsThreshold_descriptor = - getDescriptor().getMessageTypes().get(1048); + getDescriptor().getMessageTypes().get(1049); internal_static_google_cloud_compute_v1_SecurityPolicyRuleRateLimitOptionsThreshold_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRuleRateLimitOptionsThreshold_descriptor, @@ -34679,7 +34715,7 @@ private static void _clinit_autosplit_dinit_2() { "Count", "IntervalSec", "Count", "IntervalSec", }); internal_static_google_cloud_compute_v1_SecurityPolicyRuleRedirectOptions_descriptor = - getDescriptor().getMessageTypes().get(1049); + getDescriptor().getMessageTypes().get(1050); internal_static_google_cloud_compute_v1_SecurityPolicyRuleRedirectOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecurityPolicyRuleRedirectOptions_descriptor, @@ -34687,7 +34723,7 @@ private static void _clinit_autosplit_dinit_2() { "Target", "Type", "Target", "Type", }); internal_static_google_cloud_compute_v1_SecuritySettings_descriptor = - getDescriptor().getMessageTypes().get(1050); + getDescriptor().getMessageTypes().get(1051); internal_static_google_cloud_compute_v1_SecuritySettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SecuritySettings_descriptor, @@ -34695,7 +34731,7 @@ private static void _clinit_autosplit_dinit_2() { "ClientTlsPolicy", "SubjectAltNames", "ClientTlsPolicy", }); internal_static_google_cloud_compute_v1_SendDiagnosticInterruptInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1051); + getDescriptor().getMessageTypes().get(1052); internal_static_google_cloud_compute_v1_SendDiagnosticInterruptInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SendDiagnosticInterruptInstanceRequest_descriptor, @@ -34703,13 +34739,13 @@ private static void _clinit_autosplit_dinit_2() { "Instance", "Project", "Zone", }); internal_static_google_cloud_compute_v1_SendDiagnosticInterruptInstanceResponse_descriptor = - getDescriptor().getMessageTypes().get(1052); + getDescriptor().getMessageTypes().get(1053); internal_static_google_cloud_compute_v1_SendDiagnosticInterruptInstanceResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SendDiagnosticInterruptInstanceResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_compute_v1_SerialPortOutput_descriptor = - getDescriptor().getMessageTypes().get(1053); + getDescriptor().getMessageTypes().get(1054); internal_static_google_cloud_compute_v1_SerialPortOutput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SerialPortOutput_descriptor, @@ -34726,7 +34762,7 @@ private static void _clinit_autosplit_dinit_2() { "Start", }); internal_static_google_cloud_compute_v1_ServerBinding_descriptor = - getDescriptor().getMessageTypes().get(1054); + getDescriptor().getMessageTypes().get(1055); internal_static_google_cloud_compute_v1_ServerBinding_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ServerBinding_descriptor, @@ -34734,7 +34770,7 @@ private static void _clinit_autosplit_dinit_2() { "Type", "Type", }); internal_static_google_cloud_compute_v1_ServiceAccount_descriptor = - getDescriptor().getMessageTypes().get(1055); + getDescriptor().getMessageTypes().get(1056); internal_static_google_cloud_compute_v1_ServiceAccount_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ServiceAccount_descriptor, @@ -34742,7 +34778,7 @@ private static void _clinit_autosplit_dinit_2() { "Email", "Scopes", "Email", }); internal_static_google_cloud_compute_v1_ServiceAttachment_descriptor = - getDescriptor().getMessageTypes().get(1056); + getDescriptor().getMessageTypes().get(1057); internal_static_google_cloud_compute_v1_ServiceAttachment_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ServiceAttachment_descriptor, @@ -34780,7 +34816,7 @@ private static void _clinit_autosplit_dinit_2() { "TargetService", }); internal_static_google_cloud_compute_v1_ServiceAttachmentAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1057); + getDescriptor().getMessageTypes().get(1058); internal_static_google_cloud_compute_v1_ServiceAttachmentAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ServiceAttachmentAggregatedList_descriptor, @@ -34809,7 +34845,7 @@ private static void _clinit_autosplit_dinit_2() { "Key", "Value", }); internal_static_google_cloud_compute_v1_ServiceAttachmentConnectedEndpoint_descriptor = - getDescriptor().getMessageTypes().get(1058); + getDescriptor().getMessageTypes().get(1059); internal_static_google_cloud_compute_v1_ServiceAttachmentConnectedEndpoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ServiceAttachmentConnectedEndpoint_descriptor, @@ -34817,7 +34853,7 @@ private static void _clinit_autosplit_dinit_2() { "Endpoint", "PscConnectionId", "Status", "Endpoint", "PscConnectionId", "Status", }); internal_static_google_cloud_compute_v1_ServiceAttachmentConsumerProjectLimit_descriptor = - getDescriptor().getMessageTypes().get(1059); + getDescriptor().getMessageTypes().get(1060); internal_static_google_cloud_compute_v1_ServiceAttachmentConsumerProjectLimit_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ServiceAttachmentConsumerProjectLimit_descriptor, @@ -34830,7 +34866,7 @@ private static void _clinit_autosplit_dinit_2() { "ProjectIdOrNum", }); internal_static_google_cloud_compute_v1_ServiceAttachmentList_descriptor = - getDescriptor().getMessageTypes().get(1060); + getDescriptor().getMessageTypes().get(1061); internal_static_google_cloud_compute_v1_ServiceAttachmentList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ServiceAttachmentList_descriptor, @@ -34848,7 +34884,7 @@ private static void _clinit_autosplit_dinit_2() { "Warning", }); internal_static_google_cloud_compute_v1_ServiceAttachmentsScopedList_descriptor = - getDescriptor().getMessageTypes().get(1061); + getDescriptor().getMessageTypes().get(1062); internal_static_google_cloud_compute_v1_ServiceAttachmentsScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ServiceAttachmentsScopedList_descriptor, @@ -34856,7 +34892,7 @@ private static void _clinit_autosplit_dinit_2() { "ServiceAttachments", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_SetBackendServiceTargetSslProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1062); + getDescriptor().getMessageTypes().get(1063); internal_static_google_cloud_compute_v1_SetBackendServiceTargetSslProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetBackendServiceTargetSslProxyRequest_descriptor, @@ -34868,7 +34904,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetBackendServiceTargetTcpProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1063); + getDescriptor().getMessageTypes().get(1064); internal_static_google_cloud_compute_v1_SetBackendServiceTargetTcpProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetBackendServiceTargetTcpProxyRequest_descriptor, @@ -34880,7 +34916,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetBackupTargetPoolRequest_descriptor = - getDescriptor().getMessageTypes().get(1064); + getDescriptor().getMessageTypes().get(1065); internal_static_google_cloud_compute_v1_SetBackupTargetPoolRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetBackupTargetPoolRequest_descriptor, @@ -34895,7 +34931,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetCertificateMapTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1065); + getDescriptor().getMessageTypes().get(1066); internal_static_google_cloud_compute_v1_SetCertificateMapTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetCertificateMapTargetHttpsProxyRequest_descriptor, @@ -34907,7 +34943,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetCertificateMapTargetSslProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1066); + getDescriptor().getMessageTypes().get(1067); internal_static_google_cloud_compute_v1_SetCertificateMapTargetSslProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetCertificateMapTargetSslProxyRequest_descriptor, @@ -34919,7 +34955,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetCommonInstanceMetadataProjectRequest_descriptor = - getDescriptor().getMessageTypes().get(1067); + getDescriptor().getMessageTypes().get(1068); internal_static_google_cloud_compute_v1_SetCommonInstanceMetadataProjectRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetCommonInstanceMetadataProjectRequest_descriptor, @@ -34927,7 +34963,7 @@ private static void _clinit_autosplit_dinit_2() { "MetadataResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_SetDefaultNetworkTierProjectRequest_descriptor = - getDescriptor().getMessageTypes().get(1068); + getDescriptor().getMessageTypes().get(1069); internal_static_google_cloud_compute_v1_SetDefaultNetworkTierProjectRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetDefaultNetworkTierProjectRequest_descriptor, @@ -34935,7 +34971,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "ProjectsSetDefaultNetworkTierRequestResource", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_SetDeletionProtectionInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1069); + getDescriptor().getMessageTypes().get(1070); internal_static_google_cloud_compute_v1_SetDeletionProtectionInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetDeletionProtectionInstanceRequest_descriptor, @@ -34949,7 +34985,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetDiskAutoDeleteInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1070); + getDescriptor().getMessageTypes().get(1071); internal_static_google_cloud_compute_v1_SetDiskAutoDeleteInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetDiskAutoDeleteInstanceRequest_descriptor, @@ -34957,7 +34993,7 @@ private static void _clinit_autosplit_dinit_2() { "AutoDelete", "DeviceName", "Instance", "Project", "RequestId", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_SetEdgeSecurityPolicyBackendBucketRequest_descriptor = - getDescriptor().getMessageTypes().get(1071); + getDescriptor().getMessageTypes().get(1072); internal_static_google_cloud_compute_v1_SetEdgeSecurityPolicyBackendBucketRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetEdgeSecurityPolicyBackendBucketRequest_descriptor, @@ -34969,7 +35005,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetEdgeSecurityPolicyBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(1072); + getDescriptor().getMessageTypes().get(1073); internal_static_google_cloud_compute_v1_SetEdgeSecurityPolicyBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetEdgeSecurityPolicyBackendServiceRequest_descriptor, @@ -34981,7 +35017,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetIamPolicyBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(1073); + getDescriptor().getMessageTypes().get(1074); internal_static_google_cloud_compute_v1_SetIamPolicyBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyBackendServiceRequest_descriptor, @@ -34989,7 +35025,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetPolicyRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(1074); + getDescriptor().getMessageTypes().get(1075); internal_static_google_cloud_compute_v1_SetIamPolicyDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyDiskRequest_descriptor, @@ -34997,7 +35033,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Resource", "Zone", "ZoneSetPolicyRequestResource", }); internal_static_google_cloud_compute_v1_SetIamPolicyFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1075); + getDescriptor().getMessageTypes().get(1076); internal_static_google_cloud_compute_v1_SetIamPolicyFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyFirewallPolicyRequest_descriptor, @@ -35005,7 +35041,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalOrganizationSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyImageRequest_descriptor = - getDescriptor().getMessageTypes().get(1076); + getDescriptor().getMessageTypes().get(1077); internal_static_google_cloud_compute_v1_SetIamPolicyImageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyImageRequest_descriptor, @@ -35013,7 +35049,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetPolicyRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1077); + getDescriptor().getMessageTypes().get(1078); internal_static_google_cloud_compute_v1_SetIamPolicyInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyInstanceRequest_descriptor, @@ -35021,7 +35057,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Resource", "Zone", "ZoneSetPolicyRequestResource", }); internal_static_google_cloud_compute_v1_SetIamPolicyInstanceTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(1078); + getDescriptor().getMessageTypes().get(1079); internal_static_google_cloud_compute_v1_SetIamPolicyInstanceTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyInstanceTemplateRequest_descriptor, @@ -35029,7 +35065,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetPolicyRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyLicenseRequest_descriptor = - getDescriptor().getMessageTypes().get(1079); + getDescriptor().getMessageTypes().get(1080); internal_static_google_cloud_compute_v1_SetIamPolicyLicenseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyLicenseRequest_descriptor, @@ -35037,7 +35073,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetPolicyRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyMachineImageRequest_descriptor = - getDescriptor().getMessageTypes().get(1080); + getDescriptor().getMessageTypes().get(1081); internal_static_google_cloud_compute_v1_SetIamPolicyMachineImageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyMachineImageRequest_descriptor, @@ -35045,7 +35081,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetPolicyRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyNetworkAttachmentRequest_descriptor = - getDescriptor().getMessageTypes().get(1081); + getDescriptor().getMessageTypes().get(1082); internal_static_google_cloud_compute_v1_SetIamPolicyNetworkAttachmentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyNetworkAttachmentRequest_descriptor, @@ -35053,7 +35089,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RegionSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1082); + getDescriptor().getMessageTypes().get(1083); internal_static_google_cloud_compute_v1_SetIamPolicyNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyNetworkFirewallPolicyRequest_descriptor, @@ -35061,7 +35097,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetPolicyRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyNodeGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(1083); + getDescriptor().getMessageTypes().get(1084); internal_static_google_cloud_compute_v1_SetIamPolicyNodeGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyNodeGroupRequest_descriptor, @@ -35069,7 +35105,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Resource", "Zone", "ZoneSetPolicyRequestResource", }); internal_static_google_cloud_compute_v1_SetIamPolicyNodeTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(1084); + getDescriptor().getMessageTypes().get(1085); internal_static_google_cloud_compute_v1_SetIamPolicyNodeTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyNodeTemplateRequest_descriptor, @@ -35077,7 +35113,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RegionSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyRegionBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(1085); + getDescriptor().getMessageTypes().get(1086); internal_static_google_cloud_compute_v1_SetIamPolicyRegionBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyRegionBackendServiceRequest_descriptor, @@ -35085,7 +35121,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RegionSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyRegionDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(1086); + getDescriptor().getMessageTypes().get(1087); internal_static_google_cloud_compute_v1_SetIamPolicyRegionDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyRegionDiskRequest_descriptor, @@ -35093,7 +35129,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RegionSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyRegionNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1087); + getDescriptor().getMessageTypes().get(1088); internal_static_google_cloud_compute_v1_SetIamPolicyRegionNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyRegionNetworkFirewallPolicyRequest_descriptor, @@ -35101,7 +35137,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RegionSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyReservationRequest_descriptor = - getDescriptor().getMessageTypes().get(1088); + getDescriptor().getMessageTypes().get(1089); internal_static_google_cloud_compute_v1_SetIamPolicyReservationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyReservationRequest_descriptor, @@ -35109,7 +35145,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Resource", "Zone", "ZoneSetPolicyRequestResource", }); internal_static_google_cloud_compute_v1_SetIamPolicyResourcePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1089); + getDescriptor().getMessageTypes().get(1090); internal_static_google_cloud_compute_v1_SetIamPolicyResourcePolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyResourcePolicyRequest_descriptor, @@ -35117,7 +35153,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RegionSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicyServiceAttachmentRequest_descriptor = - getDescriptor().getMessageTypes().get(1090); + getDescriptor().getMessageTypes().get(1091); internal_static_google_cloud_compute_v1_SetIamPolicyServiceAttachmentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicyServiceAttachmentRequest_descriptor, @@ -35125,7 +35161,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RegionSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicySnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(1091); + getDescriptor().getMessageTypes().get(1092); internal_static_google_cloud_compute_v1_SetIamPolicySnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicySnapshotRequest_descriptor, @@ -35133,7 +35169,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetPolicyRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetIamPolicySubnetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(1092); + getDescriptor().getMessageTypes().get(1093); internal_static_google_cloud_compute_v1_SetIamPolicySubnetworkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetIamPolicySubnetworkRequest_descriptor, @@ -35141,7 +35177,7 @@ private static void _clinit_autosplit_dinit_2() { "Project", "Region", "RegionSetPolicyRequestResource", "Resource", }); internal_static_google_cloud_compute_v1_SetInstanceTemplateInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(1093); + getDescriptor().getMessageTypes().get(1094); internal_static_google_cloud_compute_v1_SetInstanceTemplateInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetInstanceTemplateInstanceGroupManagerRequest_descriptor, @@ -35154,7 +35190,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetInstanceTemplateRegionInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(1094); + getDescriptor().getMessageTypes().get(1095); internal_static_google_cloud_compute_v1_SetInstanceTemplateRegionInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetInstanceTemplateRegionInstanceGroupManagerRequest_descriptor, @@ -35167,7 +35203,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsAddressRequest_descriptor = - getDescriptor().getMessageTypes().get(1095); + getDescriptor().getMessageTypes().get(1096); internal_static_google_cloud_compute_v1_SetLabelsAddressRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsAddressRequest_descriptor, @@ -35180,7 +35216,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(1096); + getDescriptor().getMessageTypes().get(1097); internal_static_google_cloud_compute_v1_SetLabelsDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsDiskRequest_descriptor, @@ -35193,7 +35229,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsExternalVpnGatewayRequest_descriptor = - getDescriptor().getMessageTypes().get(1097); + getDescriptor().getMessageTypes().get(1098); internal_static_google_cloud_compute_v1_SetLabelsExternalVpnGatewayRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsExternalVpnGatewayRequest_descriptor, @@ -35201,7 +35237,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetLabelsRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetLabelsForwardingRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(1098); + getDescriptor().getMessageTypes().get(1099); internal_static_google_cloud_compute_v1_SetLabelsForwardingRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsForwardingRuleRequest_descriptor, @@ -35214,7 +35250,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsGlobalAddressRequest_descriptor = - getDescriptor().getMessageTypes().get(1099); + getDescriptor().getMessageTypes().get(1100); internal_static_google_cloud_compute_v1_SetLabelsGlobalAddressRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsGlobalAddressRequest_descriptor, @@ -35222,7 +35258,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetLabelsRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetLabelsGlobalForwardingRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(1100); + getDescriptor().getMessageTypes().get(1101); internal_static_google_cloud_compute_v1_SetLabelsGlobalForwardingRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsGlobalForwardingRuleRequest_descriptor, @@ -35230,7 +35266,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetLabelsRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetLabelsImageRequest_descriptor = - getDescriptor().getMessageTypes().get(1101); + getDescriptor().getMessageTypes().get(1102); internal_static_google_cloud_compute_v1_SetLabelsImageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsImageRequest_descriptor, @@ -35238,7 +35274,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetLabelsRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetLabelsInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1102); + getDescriptor().getMessageTypes().get(1103); internal_static_google_cloud_compute_v1_SetLabelsInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsInstanceRequest_descriptor, @@ -35251,7 +35287,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsInterconnectAttachmentRequest_descriptor = - getDescriptor().getMessageTypes().get(1103); + getDescriptor().getMessageTypes().get(1104); internal_static_google_cloud_compute_v1_SetLabelsInterconnectAttachmentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsInterconnectAttachmentRequest_descriptor, @@ -35264,7 +35300,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsInterconnectRequest_descriptor = - getDescriptor().getMessageTypes().get(1104); + getDescriptor().getMessageTypes().get(1105); internal_static_google_cloud_compute_v1_SetLabelsInterconnectRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsInterconnectRequest_descriptor, @@ -35272,7 +35308,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetLabelsRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetLabelsRegionDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(1105); + getDescriptor().getMessageTypes().get(1106); internal_static_google_cloud_compute_v1_SetLabelsRegionDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsRegionDiskRequest_descriptor, @@ -35285,7 +35321,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsSecurityPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1106); + getDescriptor().getMessageTypes().get(1107); internal_static_google_cloud_compute_v1_SetLabelsSecurityPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsSecurityPolicyRequest_descriptor, @@ -35293,7 +35329,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetLabelsRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetLabelsSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(1107); + getDescriptor().getMessageTypes().get(1108); internal_static_google_cloud_compute_v1_SetLabelsSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsSnapshotRequest_descriptor, @@ -35301,7 +35337,7 @@ private static void _clinit_autosplit_dinit_2() { "GlobalSetLabelsRequestResource", "Project", "Resource", }); internal_static_google_cloud_compute_v1_SetLabelsTargetVpnGatewayRequest_descriptor = - getDescriptor().getMessageTypes().get(1108); + getDescriptor().getMessageTypes().get(1109); internal_static_google_cloud_compute_v1_SetLabelsTargetVpnGatewayRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsTargetVpnGatewayRequest_descriptor, @@ -35314,7 +35350,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsVpnGatewayRequest_descriptor = - getDescriptor().getMessageTypes().get(1109); + getDescriptor().getMessageTypes().get(1110); internal_static_google_cloud_compute_v1_SetLabelsVpnGatewayRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsVpnGatewayRequest_descriptor, @@ -35327,7 +35363,7 @@ private static void _clinit_autosplit_dinit_2() { "RequestId", }); internal_static_google_cloud_compute_v1_SetLabelsVpnTunnelRequest_descriptor = - getDescriptor().getMessageTypes().get(1110); + getDescriptor().getMessageTypes().get(1111); internal_static_google_cloud_compute_v1_SetLabelsVpnTunnelRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetLabelsVpnTunnelRequest_descriptor, @@ -35339,8 +35375,12 @@ private static void _clinit_autosplit_dinit_2() { "Resource", "RequestId", }); + _clinit_autosplit_dinit_3(); + } + + private static void _clinit_autosplit_dinit_3() { internal_static_google_cloud_compute_v1_SetMachineResourcesInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1111); + getDescriptor().getMessageTypes().get(1112); internal_static_google_cloud_compute_v1_SetMachineResourcesInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetMachineResourcesInstanceRequest_descriptor, @@ -35352,12 +35392,8 @@ private static void _clinit_autosplit_dinit_2() { "Zone", "RequestId", }); - _clinit_autosplit_dinit_3(); - } - - private static void _clinit_autosplit_dinit_3() { internal_static_google_cloud_compute_v1_SetMachineTypeInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1112); + getDescriptor().getMessageTypes().get(1113); internal_static_google_cloud_compute_v1_SetMachineTypeInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetMachineTypeInstanceRequest_descriptor, @@ -35370,7 +35406,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetMetadataInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1113); + getDescriptor().getMessageTypes().get(1114); internal_static_google_cloud_compute_v1_SetMetadataInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetMetadataInstanceRequest_descriptor, @@ -35378,7 +35414,7 @@ private static void _clinit_autosplit_dinit_3() { "Instance", "MetadataResource", "Project", "RequestId", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_SetMinCpuPlatformInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1114); + getDescriptor().getMessageTypes().get(1115); internal_static_google_cloud_compute_v1_SetMinCpuPlatformInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetMinCpuPlatformInstanceRequest_descriptor, @@ -35391,7 +35427,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetNameInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1115); + getDescriptor().getMessageTypes().get(1116); internal_static_google_cloud_compute_v1_SetNameInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetNameInstanceRequest_descriptor, @@ -35404,7 +35440,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetNamedPortsInstanceGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(1116); + getDescriptor().getMessageTypes().get(1117); internal_static_google_cloud_compute_v1_SetNamedPortsInstanceGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetNamedPortsInstanceGroupRequest_descriptor, @@ -35417,7 +35453,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetNamedPortsRegionInstanceGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(1117); + getDescriptor().getMessageTypes().get(1118); internal_static_google_cloud_compute_v1_SetNamedPortsRegionInstanceGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetNamedPortsRegionInstanceGroupRequest_descriptor, @@ -35430,7 +35466,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetNodeTemplateNodeGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(1118); + getDescriptor().getMessageTypes().get(1119); internal_static_google_cloud_compute_v1_SetNodeTemplateNodeGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetNodeTemplateNodeGroupRequest_descriptor, @@ -35443,7 +35479,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetPrivateIpGoogleAccessSubnetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(1119); + getDescriptor().getMessageTypes().get(1120); internal_static_google_cloud_compute_v1_SetPrivateIpGoogleAccessSubnetworkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetPrivateIpGoogleAccessSubnetworkRequest_descriptor, @@ -35456,7 +35492,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetProxyHeaderTargetSslProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1120); + getDescriptor().getMessageTypes().get(1121); internal_static_google_cloud_compute_v1_SetProxyHeaderTargetSslProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetProxyHeaderTargetSslProxyRequest_descriptor, @@ -35468,7 +35504,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetProxyHeaderTargetTcpProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1121); + getDescriptor().getMessageTypes().get(1122); internal_static_google_cloud_compute_v1_SetProxyHeaderTargetTcpProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetProxyHeaderTargetTcpProxyRequest_descriptor, @@ -35480,7 +35516,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetQuicOverrideTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1122); + getDescriptor().getMessageTypes().get(1123); internal_static_google_cloud_compute_v1_SetQuicOverrideTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetQuicOverrideTargetHttpsProxyRequest_descriptor, @@ -35492,7 +35528,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetSchedulingInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1123); + getDescriptor().getMessageTypes().get(1124); internal_static_google_cloud_compute_v1_SetSchedulingInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetSchedulingInstanceRequest_descriptor, @@ -35500,7 +35536,7 @@ private static void _clinit_autosplit_dinit_3() { "Instance", "Project", "RequestId", "SchedulingResource", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_SetSecurityPolicyBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(1124); + getDescriptor().getMessageTypes().get(1125); internal_static_google_cloud_compute_v1_SetSecurityPolicyBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetSecurityPolicyBackendServiceRequest_descriptor, @@ -35512,7 +35548,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetServiceAccountInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1125); + getDescriptor().getMessageTypes().get(1126); internal_static_google_cloud_compute_v1_SetServiceAccountInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetServiceAccountInstanceRequest_descriptor, @@ -35525,7 +35561,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetShieldedInstanceIntegrityPolicyInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1126); + getDescriptor().getMessageTypes().get(1127); internal_static_google_cloud_compute_v1_SetShieldedInstanceIntegrityPolicyInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetShieldedInstanceIntegrityPolicyInstanceRequest_descriptor, @@ -35538,7 +35574,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetSslCertificatesRegionTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1127); + getDescriptor().getMessageTypes().get(1128); internal_static_google_cloud_compute_v1_SetSslCertificatesRegionTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetSslCertificatesRegionTargetHttpsProxyRequest_descriptor, @@ -35551,7 +35587,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetSslCertificatesTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1128); + getDescriptor().getMessageTypes().get(1129); internal_static_google_cloud_compute_v1_SetSslCertificatesTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetSslCertificatesTargetHttpsProxyRequest_descriptor, @@ -35563,7 +35599,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetSslCertificatesTargetSslProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1129); + getDescriptor().getMessageTypes().get(1130); internal_static_google_cloud_compute_v1_SetSslCertificatesTargetSslProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetSslCertificatesTargetSslProxyRequest_descriptor, @@ -35575,7 +35611,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetSslPolicyTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1130); + getDescriptor().getMessageTypes().get(1131); internal_static_google_cloud_compute_v1_SetSslPolicyTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetSslPolicyTargetHttpsProxyRequest_descriptor, @@ -35583,7 +35619,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "RequestId", "SslPolicyReferenceResource", "TargetHttpsProxy", "RequestId", }); internal_static_google_cloud_compute_v1_SetSslPolicyTargetSslProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1131); + getDescriptor().getMessageTypes().get(1132); internal_static_google_cloud_compute_v1_SetSslPolicyTargetSslProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetSslPolicyTargetSslProxyRequest_descriptor, @@ -35591,7 +35627,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "RequestId", "SslPolicyReferenceResource", "TargetSslProxy", "RequestId", }); internal_static_google_cloud_compute_v1_SetTagsInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1132); + getDescriptor().getMessageTypes().get(1133); internal_static_google_cloud_compute_v1_SetTagsInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetTagsInstanceRequest_descriptor, @@ -35599,7 +35635,7 @@ private static void _clinit_autosplit_dinit_3() { "Instance", "Project", "RequestId", "TagsResource", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_SetTargetForwardingRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(1133); + getDescriptor().getMessageTypes().get(1134); internal_static_google_cloud_compute_v1_SetTargetForwardingRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetTargetForwardingRuleRequest_descriptor, @@ -35612,7 +35648,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetTargetGlobalForwardingRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(1134); + getDescriptor().getMessageTypes().get(1135); internal_static_google_cloud_compute_v1_SetTargetGlobalForwardingRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetTargetGlobalForwardingRuleRequest_descriptor, @@ -35620,7 +35656,7 @@ private static void _clinit_autosplit_dinit_3() { "ForwardingRule", "Project", "RequestId", "TargetReferenceResource", "RequestId", }); internal_static_google_cloud_compute_v1_SetTargetPoolsInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(1135); + getDescriptor().getMessageTypes().get(1136); internal_static_google_cloud_compute_v1_SetTargetPoolsInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetTargetPoolsInstanceGroupManagerRequest_descriptor, @@ -35633,7 +35669,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetTargetPoolsRegionInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(1136); + getDescriptor().getMessageTypes().get(1137); internal_static_google_cloud_compute_v1_SetTargetPoolsRegionInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetTargetPoolsRegionInstanceGroupManagerRequest_descriptor, @@ -35646,7 +35682,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetUrlMapRegionTargetHttpProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1137); + getDescriptor().getMessageTypes().get(1138); internal_static_google_cloud_compute_v1_SetUrlMapRegionTargetHttpProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetUrlMapRegionTargetHttpProxyRequest_descriptor, @@ -35659,7 +35695,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetUrlMapRegionTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1138); + getDescriptor().getMessageTypes().get(1139); internal_static_google_cloud_compute_v1_SetUrlMapRegionTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetUrlMapRegionTargetHttpsProxyRequest_descriptor, @@ -35672,7 +35708,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SetUrlMapTargetHttpProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1139); + getDescriptor().getMessageTypes().get(1140); internal_static_google_cloud_compute_v1_SetUrlMapTargetHttpProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetUrlMapTargetHttpProxyRequest_descriptor, @@ -35680,7 +35716,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "RequestId", "TargetHttpProxy", "UrlMapReferenceResource", "RequestId", }); internal_static_google_cloud_compute_v1_SetUrlMapTargetHttpsProxyRequest_descriptor = - getDescriptor().getMessageTypes().get(1140); + getDescriptor().getMessageTypes().get(1141); internal_static_google_cloud_compute_v1_SetUrlMapTargetHttpsProxyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetUrlMapTargetHttpsProxyRequest_descriptor, @@ -35688,7 +35724,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "RequestId", "TargetHttpsProxy", "UrlMapReferenceResource", "RequestId", }); internal_static_google_cloud_compute_v1_SetUsageExportBucketProjectRequest_descriptor = - getDescriptor().getMessageTypes().get(1141); + getDescriptor().getMessageTypes().get(1142); internal_static_google_cloud_compute_v1_SetUsageExportBucketProjectRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SetUsageExportBucketProjectRequest_descriptor, @@ -35696,7 +35732,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "RequestId", "UsageExportLocationResource", "RequestId", }); internal_static_google_cloud_compute_v1_ShareSettings_descriptor = - getDescriptor().getMessageTypes().get(1142); + getDescriptor().getMessageTypes().get(1143); internal_static_google_cloud_compute_v1_ShareSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ShareSettings_descriptor, @@ -35712,7 +35748,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_ShareSettingsProjectConfig_descriptor = - getDescriptor().getMessageTypes().get(1143); + getDescriptor().getMessageTypes().get(1144); internal_static_google_cloud_compute_v1_ShareSettingsProjectConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ShareSettingsProjectConfig_descriptor, @@ -35720,7 +35756,7 @@ private static void _clinit_autosplit_dinit_3() { "ProjectId", "ProjectId", }); internal_static_google_cloud_compute_v1_ShieldedInstanceConfig_descriptor = - getDescriptor().getMessageTypes().get(1144); + getDescriptor().getMessageTypes().get(1145); internal_static_google_cloud_compute_v1_ShieldedInstanceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ShieldedInstanceConfig_descriptor, @@ -35733,7 +35769,7 @@ private static void _clinit_autosplit_dinit_3() { "EnableVtpm", }); internal_static_google_cloud_compute_v1_ShieldedInstanceIdentity_descriptor = - getDescriptor().getMessageTypes().get(1145); + getDescriptor().getMessageTypes().get(1146); internal_static_google_cloud_compute_v1_ShieldedInstanceIdentity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ShieldedInstanceIdentity_descriptor, @@ -35741,7 +35777,7 @@ private static void _clinit_autosplit_dinit_3() { "EncryptionKey", "Kind", "SigningKey", "EncryptionKey", "Kind", "SigningKey", }); internal_static_google_cloud_compute_v1_ShieldedInstanceIdentityEntry_descriptor = - getDescriptor().getMessageTypes().get(1146); + getDescriptor().getMessageTypes().get(1147); internal_static_google_cloud_compute_v1_ShieldedInstanceIdentityEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ShieldedInstanceIdentityEntry_descriptor, @@ -35749,7 +35785,7 @@ private static void _clinit_autosplit_dinit_3() { "EkCert", "EkPub", "EkCert", "EkPub", }); internal_static_google_cloud_compute_v1_ShieldedInstanceIntegrityPolicy_descriptor = - getDescriptor().getMessageTypes().get(1147); + getDescriptor().getMessageTypes().get(1148); internal_static_google_cloud_compute_v1_ShieldedInstanceIntegrityPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ShieldedInstanceIntegrityPolicy_descriptor, @@ -35757,7 +35793,7 @@ private static void _clinit_autosplit_dinit_3() { "UpdateAutoLearnPolicy", "UpdateAutoLearnPolicy", }); internal_static_google_cloud_compute_v1_SignedUrlKey_descriptor = - getDescriptor().getMessageTypes().get(1148); + getDescriptor().getMessageTypes().get(1149); internal_static_google_cloud_compute_v1_SignedUrlKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SignedUrlKey_descriptor, @@ -35765,15 +35801,28 @@ private static void _clinit_autosplit_dinit_3() { "KeyName", "KeyValue", "KeyName", "KeyValue", }); internal_static_google_cloud_compute_v1_SimulateMaintenanceEventInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1149); + getDescriptor().getMessageTypes().get(1150); internal_static_google_cloud_compute_v1_SimulateMaintenanceEventInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SimulateMaintenanceEventInstanceRequest_descriptor, new java.lang.String[] { "Instance", "Project", "Zone", }); + internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(1151); + internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_descriptor, + new java.lang.String[] { + "NodeGroup", + "NodeGroupsSimulateMaintenanceEventRequestResource", + "Project", + "RequestId", + "Zone", + "RequestId", + }); internal_static_google_cloud_compute_v1_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(1150); + getDescriptor().getMessageTypes().get(1152); internal_static_google_cloud_compute_v1_Snapshot_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Snapshot_descriptor, @@ -35842,7 +35891,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_SnapshotList_descriptor = - getDescriptor().getMessageTypes().get(1151); + getDescriptor().getMessageTypes().get(1153); internal_static_google_cloud_compute_v1_SnapshotList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SnapshotList_descriptor, @@ -35860,7 +35909,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_SourceDiskEncryptionKey_descriptor = - getDescriptor().getMessageTypes().get(1152); + getDescriptor().getMessageTypes().get(1154); internal_static_google_cloud_compute_v1_SourceDiskEncryptionKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SourceDiskEncryptionKey_descriptor, @@ -35868,7 +35917,7 @@ private static void _clinit_autosplit_dinit_3() { "DiskEncryptionKey", "SourceDisk", "DiskEncryptionKey", "SourceDisk", }); internal_static_google_cloud_compute_v1_SourceInstanceParams_descriptor = - getDescriptor().getMessageTypes().get(1153); + getDescriptor().getMessageTypes().get(1155); internal_static_google_cloud_compute_v1_SourceInstanceParams_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SourceInstanceParams_descriptor, @@ -35876,7 +35925,7 @@ private static void _clinit_autosplit_dinit_3() { "DiskConfigs", }); internal_static_google_cloud_compute_v1_SourceInstanceProperties_descriptor = - getDescriptor().getMessageTypes().get(1154); + getDescriptor().getMessageTypes().get(1156); internal_static_google_cloud_compute_v1_SourceInstanceProperties_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SourceInstanceProperties_descriptor, @@ -35916,7 +35965,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_SslCertificate_descriptor = - getDescriptor().getMessageTypes().get(1155); + getDescriptor().getMessageTypes().get(1157); internal_static_google_cloud_compute_v1_SslCertificate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslCertificate_descriptor, @@ -35950,7 +35999,7 @@ private static void _clinit_autosplit_dinit_3() { "Type", }); internal_static_google_cloud_compute_v1_SslCertificateAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1156); + getDescriptor().getMessageTypes().get(1158); internal_static_google_cloud_compute_v1_SslCertificateAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslCertificateAggregatedList_descriptor, @@ -35979,7 +36028,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_SslCertificateList_descriptor = - getDescriptor().getMessageTypes().get(1157); + getDescriptor().getMessageTypes().get(1159); internal_static_google_cloud_compute_v1_SslCertificateList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslCertificateList_descriptor, @@ -35997,7 +36046,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_SslCertificateManagedSslCertificate_descriptor = - getDescriptor().getMessageTypes().get(1158); + getDescriptor().getMessageTypes().get(1160); internal_static_google_cloud_compute_v1_SslCertificateManagedSslCertificate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslCertificateManagedSslCertificate_descriptor, @@ -36015,7 +36064,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_SslCertificateSelfManagedSslCertificate_descriptor = - getDescriptor().getMessageTypes().get(1159); + getDescriptor().getMessageTypes().get(1161); internal_static_google_cloud_compute_v1_SslCertificateSelfManagedSslCertificate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslCertificateSelfManagedSslCertificate_descriptor, @@ -36023,7 +36072,7 @@ private static void _clinit_autosplit_dinit_3() { "Certificate", "PrivateKey", "Certificate", "PrivateKey", }); internal_static_google_cloud_compute_v1_SslCertificatesScopedList_descriptor = - getDescriptor().getMessageTypes().get(1160); + getDescriptor().getMessageTypes().get(1162); internal_static_google_cloud_compute_v1_SslCertificatesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslCertificatesScopedList_descriptor, @@ -36031,7 +36080,7 @@ private static void _clinit_autosplit_dinit_3() { "SslCertificates", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_SslPoliciesAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1161); + getDescriptor().getMessageTypes().get(1163); internal_static_google_cloud_compute_v1_SslPoliciesAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslPoliciesAggregatedList_descriptor, @@ -36062,7 +36111,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_SslPoliciesList_descriptor = - getDescriptor().getMessageTypes().get(1162); + getDescriptor().getMessageTypes().get(1164); internal_static_google_cloud_compute_v1_SslPoliciesList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslPoliciesList_descriptor, @@ -36080,7 +36129,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_SslPoliciesListAvailableFeaturesResponse_descriptor = - getDescriptor().getMessageTypes().get(1163); + getDescriptor().getMessageTypes().get(1165); internal_static_google_cloud_compute_v1_SslPoliciesListAvailableFeaturesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslPoliciesListAvailableFeaturesResponse_descriptor, @@ -36088,7 +36137,7 @@ private static void _clinit_autosplit_dinit_3() { "Features", }); internal_static_google_cloud_compute_v1_SslPoliciesScopedList_descriptor = - getDescriptor().getMessageTypes().get(1164); + getDescriptor().getMessageTypes().get(1166); internal_static_google_cloud_compute_v1_SslPoliciesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslPoliciesScopedList_descriptor, @@ -36096,7 +36145,7 @@ private static void _clinit_autosplit_dinit_3() { "SslPolicies", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_SslPolicy_descriptor = - getDescriptor().getMessageTypes().get(1165); + getDescriptor().getMessageTypes().get(1167); internal_static_google_cloud_compute_v1_SslPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslPolicy_descriptor, @@ -36126,7 +36175,7 @@ private static void _clinit_autosplit_dinit_3() { "SelfLink", }); internal_static_google_cloud_compute_v1_SslPolicyReference_descriptor = - getDescriptor().getMessageTypes().get(1166); + getDescriptor().getMessageTypes().get(1168); internal_static_google_cloud_compute_v1_SslPolicyReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SslPolicyReference_descriptor, @@ -36134,7 +36183,7 @@ private static void _clinit_autosplit_dinit_3() { "SslPolicy", "SslPolicy", }); internal_static_google_cloud_compute_v1_StartInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1167); + getDescriptor().getMessageTypes().get(1169); internal_static_google_cloud_compute_v1_StartInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_StartInstanceRequest_descriptor, @@ -36142,7 +36191,7 @@ private static void _clinit_autosplit_dinit_3() { "Instance", "Project", "RequestId", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_StartWithEncryptionKeyInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1168); + getDescriptor().getMessageTypes().get(1170); internal_static_google_cloud_compute_v1_StartWithEncryptionKeyInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_StartWithEncryptionKeyInstanceRequest_descriptor, @@ -36155,7 +36204,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_StatefulPolicy_descriptor = - getDescriptor().getMessageTypes().get(1169); + getDescriptor().getMessageTypes().get(1171); internal_static_google_cloud_compute_v1_StatefulPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_StatefulPolicy_descriptor, @@ -36163,7 +36212,7 @@ private static void _clinit_autosplit_dinit_3() { "PreservedState", "PreservedState", }); internal_static_google_cloud_compute_v1_StatefulPolicyPreservedState_descriptor = - getDescriptor().getMessageTypes().get(1170); + getDescriptor().getMessageTypes().get(1172); internal_static_google_cloud_compute_v1_StatefulPolicyPreservedState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_StatefulPolicyPreservedState_descriptor, @@ -36181,7 +36230,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_StatefulPolicyPreservedStateDiskDevice_descriptor = - getDescriptor().getMessageTypes().get(1171); + getDescriptor().getMessageTypes().get(1173); internal_static_google_cloud_compute_v1_StatefulPolicyPreservedStateDiskDevice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_StatefulPolicyPreservedStateDiskDevice_descriptor, @@ -36189,7 +36238,7 @@ private static void _clinit_autosplit_dinit_3() { "AutoDelete", "AutoDelete", }); internal_static_google_cloud_compute_v1_StopInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1172); + getDescriptor().getMessageTypes().get(1174); internal_static_google_cloud_compute_v1_StopInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_StopInstanceRequest_descriptor, @@ -36203,7 +36252,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_Subnetwork_descriptor = - getDescriptor().getMessageTypes().get(1173); + getDescriptor().getMessageTypes().get(1175); internal_static_google_cloud_compute_v1_Subnetwork_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Subnetwork_descriptor, @@ -36257,7 +36306,7 @@ private static void _clinit_autosplit_dinit_3() { "State", }); internal_static_google_cloud_compute_v1_SubnetworkAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1174); + getDescriptor().getMessageTypes().get(1176); internal_static_google_cloud_compute_v1_SubnetworkAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SubnetworkAggregatedList_descriptor, @@ -36286,7 +36335,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_SubnetworkList_descriptor = - getDescriptor().getMessageTypes().get(1175); + getDescriptor().getMessageTypes().get(1177); internal_static_google_cloud_compute_v1_SubnetworkList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SubnetworkList_descriptor, @@ -36304,7 +36353,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_SubnetworkLogConfig_descriptor = - getDescriptor().getMessageTypes().get(1176); + getDescriptor().getMessageTypes().get(1178); internal_static_google_cloud_compute_v1_SubnetworkLogConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SubnetworkLogConfig_descriptor, @@ -36322,7 +36371,7 @@ private static void _clinit_autosplit_dinit_3() { "Metadata", }); internal_static_google_cloud_compute_v1_SubnetworkSecondaryRange_descriptor = - getDescriptor().getMessageTypes().get(1177); + getDescriptor().getMessageTypes().get(1179); internal_static_google_cloud_compute_v1_SubnetworkSecondaryRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SubnetworkSecondaryRange_descriptor, @@ -36330,7 +36379,7 @@ private static void _clinit_autosplit_dinit_3() { "IpCidrRange", "RangeName", "IpCidrRange", "RangeName", }); internal_static_google_cloud_compute_v1_SubnetworksExpandIpCidrRangeRequest_descriptor = - getDescriptor().getMessageTypes().get(1178); + getDescriptor().getMessageTypes().get(1180); internal_static_google_cloud_compute_v1_SubnetworksExpandIpCidrRangeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SubnetworksExpandIpCidrRangeRequest_descriptor, @@ -36338,7 +36387,7 @@ private static void _clinit_autosplit_dinit_3() { "IpCidrRange", "IpCidrRange", }); internal_static_google_cloud_compute_v1_SubnetworksScopedList_descriptor = - getDescriptor().getMessageTypes().get(1179); + getDescriptor().getMessageTypes().get(1181); internal_static_google_cloud_compute_v1_SubnetworksScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SubnetworksScopedList_descriptor, @@ -36346,7 +36395,7 @@ private static void _clinit_autosplit_dinit_3() { "Subnetworks", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_SubnetworksSetPrivateIpGoogleAccessRequest_descriptor = - getDescriptor().getMessageTypes().get(1180); + getDescriptor().getMessageTypes().get(1182); internal_static_google_cloud_compute_v1_SubnetworksSetPrivateIpGoogleAccessRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SubnetworksSetPrivateIpGoogleAccessRequest_descriptor, @@ -36354,7 +36403,7 @@ private static void _clinit_autosplit_dinit_3() { "PrivateIpGoogleAccess", "PrivateIpGoogleAccess", }); internal_static_google_cloud_compute_v1_Subsetting_descriptor = - getDescriptor().getMessageTypes().get(1181); + getDescriptor().getMessageTypes().get(1183); internal_static_google_cloud_compute_v1_Subsetting_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Subsetting_descriptor, @@ -36362,7 +36411,7 @@ private static void _clinit_autosplit_dinit_3() { "Policy", "Policy", }); internal_static_google_cloud_compute_v1_SuspendInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1182); + getDescriptor().getMessageTypes().get(1184); internal_static_google_cloud_compute_v1_SuspendInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SuspendInstanceRequest_descriptor, @@ -36376,7 +36425,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_SwitchToCustomModeNetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(1183); + getDescriptor().getMessageTypes().get(1185); internal_static_google_cloud_compute_v1_SwitchToCustomModeNetworkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_SwitchToCustomModeNetworkRequest_descriptor, @@ -36384,7 +36433,7 @@ private static void _clinit_autosplit_dinit_3() { "Network", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_TCPHealthCheck_descriptor = - getDescriptor().getMessageTypes().get(1184); + getDescriptor().getMessageTypes().get(1186); internal_static_google_cloud_compute_v1_TCPHealthCheck_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TCPHealthCheck_descriptor, @@ -36403,7 +36452,7 @@ private static void _clinit_autosplit_dinit_3() { "Response", }); internal_static_google_cloud_compute_v1_Tags_descriptor = - getDescriptor().getMessageTypes().get(1185); + getDescriptor().getMessageTypes().get(1187); internal_static_google_cloud_compute_v1_Tags_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Tags_descriptor, @@ -36411,7 +36460,7 @@ private static void _clinit_autosplit_dinit_3() { "Fingerprint", "Items", "Fingerprint", }); internal_static_google_cloud_compute_v1_TargetGrpcProxy_descriptor = - getDescriptor().getMessageTypes().get(1186); + getDescriptor().getMessageTypes().get(1188); internal_static_google_cloud_compute_v1_TargetGrpcProxy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetGrpcProxy_descriptor, @@ -36438,7 +36487,7 @@ private static void _clinit_autosplit_dinit_3() { "ValidateForProxyless", }); internal_static_google_cloud_compute_v1_TargetGrpcProxyList_descriptor = - getDescriptor().getMessageTypes().get(1187); + getDescriptor().getMessageTypes().get(1189); internal_static_google_cloud_compute_v1_TargetGrpcProxyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetGrpcProxyList_descriptor, @@ -36456,7 +36505,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_TargetHttpProxiesScopedList_descriptor = - getDescriptor().getMessageTypes().get(1188); + getDescriptor().getMessageTypes().get(1190); internal_static_google_cloud_compute_v1_TargetHttpProxiesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpProxiesScopedList_descriptor, @@ -36464,7 +36513,7 @@ private static void _clinit_autosplit_dinit_3() { "TargetHttpProxies", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_TargetHttpProxy_descriptor = - getDescriptor().getMessageTypes().get(1189); + getDescriptor().getMessageTypes().get(1191); internal_static_google_cloud_compute_v1_TargetHttpProxy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpProxy_descriptor, @@ -36491,7 +36540,7 @@ private static void _clinit_autosplit_dinit_3() { "UrlMap", }); internal_static_google_cloud_compute_v1_TargetHttpProxyAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1190); + getDescriptor().getMessageTypes().get(1192); internal_static_google_cloud_compute_v1_TargetHttpProxyAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpProxyAggregatedList_descriptor, @@ -36518,7 +36567,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_TargetHttpProxyList_descriptor = - getDescriptor().getMessageTypes().get(1191); + getDescriptor().getMessageTypes().get(1193); internal_static_google_cloud_compute_v1_TargetHttpProxyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpProxyList_descriptor, @@ -36536,7 +36585,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_TargetHttpsProxiesScopedList_descriptor = - getDescriptor().getMessageTypes().get(1192); + getDescriptor().getMessageTypes().get(1194); internal_static_google_cloud_compute_v1_TargetHttpsProxiesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpsProxiesScopedList_descriptor, @@ -36544,7 +36593,7 @@ private static void _clinit_autosplit_dinit_3() { "TargetHttpsProxies", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetCertificateMapRequest_descriptor = - getDescriptor().getMessageTypes().get(1193); + getDescriptor().getMessageTypes().get(1195); internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetCertificateMapRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetCertificateMapRequest_descriptor, @@ -36552,7 +36601,7 @@ private static void _clinit_autosplit_dinit_3() { "CertificateMap", "CertificateMap", }); internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetQuicOverrideRequest_descriptor = - getDescriptor().getMessageTypes().get(1194); + getDescriptor().getMessageTypes().get(1196); internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetQuicOverrideRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetQuicOverrideRequest_descriptor, @@ -36560,7 +36609,7 @@ private static void _clinit_autosplit_dinit_3() { "QuicOverride", "QuicOverride", }); internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetSslCertificatesRequest_descriptor = - getDescriptor().getMessageTypes().get(1195); + getDescriptor().getMessageTypes().get(1197); internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetSslCertificatesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetSslCertificatesRequest_descriptor, @@ -36568,7 +36617,7 @@ private static void _clinit_autosplit_dinit_3() { "SslCertificates", }); internal_static_google_cloud_compute_v1_TargetHttpsProxy_descriptor = - getDescriptor().getMessageTypes().get(1196); + getDescriptor().getMessageTypes().get(1198); internal_static_google_cloud_compute_v1_TargetHttpsProxy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpsProxy_descriptor, @@ -36606,7 +36655,7 @@ private static void _clinit_autosplit_dinit_3() { "UrlMap", }); internal_static_google_cloud_compute_v1_TargetHttpsProxyAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1197); + getDescriptor().getMessageTypes().get(1199); internal_static_google_cloud_compute_v1_TargetHttpsProxyAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpsProxyAggregatedList_descriptor, @@ -36635,7 +36684,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_TargetHttpsProxyList_descriptor = - getDescriptor().getMessageTypes().get(1198); + getDescriptor().getMessageTypes().get(1200); internal_static_google_cloud_compute_v1_TargetHttpsProxyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetHttpsProxyList_descriptor, @@ -36653,7 +36702,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_TargetInstance_descriptor = - getDescriptor().getMessageTypes().get(1199); + getDescriptor().getMessageTypes().get(1201); internal_static_google_cloud_compute_v1_TargetInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetInstance_descriptor, @@ -36680,7 +36729,7 @@ private static void _clinit_autosplit_dinit_3() { "Zone", }); internal_static_google_cloud_compute_v1_TargetInstanceAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1200); + getDescriptor().getMessageTypes().get(1202); internal_static_google_cloud_compute_v1_TargetInstanceAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetInstanceAggregatedList_descriptor, @@ -36709,7 +36758,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_TargetInstanceList_descriptor = - getDescriptor().getMessageTypes().get(1201); + getDescriptor().getMessageTypes().get(1203); internal_static_google_cloud_compute_v1_TargetInstanceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetInstanceList_descriptor, @@ -36727,7 +36776,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_TargetInstancesScopedList_descriptor = - getDescriptor().getMessageTypes().get(1202); + getDescriptor().getMessageTypes().get(1204); internal_static_google_cloud_compute_v1_TargetInstancesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetInstancesScopedList_descriptor, @@ -36735,7 +36784,7 @@ private static void _clinit_autosplit_dinit_3() { "TargetInstances", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_TargetPool_descriptor = - getDescriptor().getMessageTypes().get(1203); + getDescriptor().getMessageTypes().get(1205); internal_static_google_cloud_compute_v1_TargetPool_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPool_descriptor, @@ -36764,7 +36813,7 @@ private static void _clinit_autosplit_dinit_3() { "SessionAffinity", }); internal_static_google_cloud_compute_v1_TargetPoolAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1204); + getDescriptor().getMessageTypes().get(1206); internal_static_google_cloud_compute_v1_TargetPoolAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPoolAggregatedList_descriptor, @@ -36793,7 +36842,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_TargetPoolInstanceHealth_descriptor = - getDescriptor().getMessageTypes().get(1205); + getDescriptor().getMessageTypes().get(1207); internal_static_google_cloud_compute_v1_TargetPoolInstanceHealth_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPoolInstanceHealth_descriptor, @@ -36801,7 +36850,7 @@ private static void _clinit_autosplit_dinit_3() { "HealthStatus", "Kind", "Kind", }); internal_static_google_cloud_compute_v1_TargetPoolList_descriptor = - getDescriptor().getMessageTypes().get(1206); + getDescriptor().getMessageTypes().get(1208); internal_static_google_cloud_compute_v1_TargetPoolList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPoolList_descriptor, @@ -36819,7 +36868,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_TargetPoolsAddHealthCheckRequest_descriptor = - getDescriptor().getMessageTypes().get(1207); + getDescriptor().getMessageTypes().get(1209); internal_static_google_cloud_compute_v1_TargetPoolsAddHealthCheckRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPoolsAddHealthCheckRequest_descriptor, @@ -36827,7 +36876,7 @@ private static void _clinit_autosplit_dinit_3() { "HealthChecks", }); internal_static_google_cloud_compute_v1_TargetPoolsAddInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1208); + getDescriptor().getMessageTypes().get(1210); internal_static_google_cloud_compute_v1_TargetPoolsAddInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPoolsAddInstanceRequest_descriptor, @@ -36835,7 +36884,7 @@ private static void _clinit_autosplit_dinit_3() { "Instances", }); internal_static_google_cloud_compute_v1_TargetPoolsRemoveHealthCheckRequest_descriptor = - getDescriptor().getMessageTypes().get(1209); + getDescriptor().getMessageTypes().get(1211); internal_static_google_cloud_compute_v1_TargetPoolsRemoveHealthCheckRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPoolsRemoveHealthCheckRequest_descriptor, @@ -36843,7 +36892,7 @@ private static void _clinit_autosplit_dinit_3() { "HealthChecks", }); internal_static_google_cloud_compute_v1_TargetPoolsRemoveInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1210); + getDescriptor().getMessageTypes().get(1212); internal_static_google_cloud_compute_v1_TargetPoolsRemoveInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPoolsRemoveInstanceRequest_descriptor, @@ -36851,7 +36900,7 @@ private static void _clinit_autosplit_dinit_3() { "Instances", }); internal_static_google_cloud_compute_v1_TargetPoolsScopedList_descriptor = - getDescriptor().getMessageTypes().get(1211); + getDescriptor().getMessageTypes().get(1213); internal_static_google_cloud_compute_v1_TargetPoolsScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetPoolsScopedList_descriptor, @@ -36859,7 +36908,7 @@ private static void _clinit_autosplit_dinit_3() { "TargetPools", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_TargetReference_descriptor = - getDescriptor().getMessageTypes().get(1212); + getDescriptor().getMessageTypes().get(1214); internal_static_google_cloud_compute_v1_TargetReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetReference_descriptor, @@ -36867,7 +36916,7 @@ private static void _clinit_autosplit_dinit_3() { "Target", "Target", }); internal_static_google_cloud_compute_v1_TargetSslProxiesSetBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(1213); + getDescriptor().getMessageTypes().get(1215); internal_static_google_cloud_compute_v1_TargetSslProxiesSetBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetSslProxiesSetBackendServiceRequest_descriptor, @@ -36875,7 +36924,7 @@ private static void _clinit_autosplit_dinit_3() { "Service", "Service", }); internal_static_google_cloud_compute_v1_TargetSslProxiesSetCertificateMapRequest_descriptor = - getDescriptor().getMessageTypes().get(1214); + getDescriptor().getMessageTypes().get(1216); internal_static_google_cloud_compute_v1_TargetSslProxiesSetCertificateMapRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetSslProxiesSetCertificateMapRequest_descriptor, @@ -36883,7 +36932,7 @@ private static void _clinit_autosplit_dinit_3() { "CertificateMap", "CertificateMap", }); internal_static_google_cloud_compute_v1_TargetSslProxiesSetProxyHeaderRequest_descriptor = - getDescriptor().getMessageTypes().get(1215); + getDescriptor().getMessageTypes().get(1217); internal_static_google_cloud_compute_v1_TargetSslProxiesSetProxyHeaderRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetSslProxiesSetProxyHeaderRequest_descriptor, @@ -36891,7 +36940,7 @@ private static void _clinit_autosplit_dinit_3() { "ProxyHeader", "ProxyHeader", }); internal_static_google_cloud_compute_v1_TargetSslProxiesSetSslCertificatesRequest_descriptor = - getDescriptor().getMessageTypes().get(1216); + getDescriptor().getMessageTypes().get(1218); internal_static_google_cloud_compute_v1_TargetSslProxiesSetSslCertificatesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetSslProxiesSetSslCertificatesRequest_descriptor, @@ -36899,7 +36948,7 @@ private static void _clinit_autosplit_dinit_3() { "SslCertificates", }); internal_static_google_cloud_compute_v1_TargetSslProxy_descriptor = - getDescriptor().getMessageTypes().get(1217); + getDescriptor().getMessageTypes().get(1219); internal_static_google_cloud_compute_v1_TargetSslProxy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetSslProxy_descriptor, @@ -36927,7 +36976,7 @@ private static void _clinit_autosplit_dinit_3() { "SslPolicy", }); internal_static_google_cloud_compute_v1_TargetSslProxyList_descriptor = - getDescriptor().getMessageTypes().get(1218); + getDescriptor().getMessageTypes().get(1220); internal_static_google_cloud_compute_v1_TargetSslProxyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetSslProxyList_descriptor, @@ -36945,7 +36994,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_TargetTcpProxiesScopedList_descriptor = - getDescriptor().getMessageTypes().get(1219); + getDescriptor().getMessageTypes().get(1221); internal_static_google_cloud_compute_v1_TargetTcpProxiesScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetTcpProxiesScopedList_descriptor, @@ -36953,7 +37002,7 @@ private static void _clinit_autosplit_dinit_3() { "TargetTcpProxies", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_TargetTcpProxiesSetBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(1220); + getDescriptor().getMessageTypes().get(1222); internal_static_google_cloud_compute_v1_TargetTcpProxiesSetBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetTcpProxiesSetBackendServiceRequest_descriptor, @@ -36961,7 +37010,7 @@ private static void _clinit_autosplit_dinit_3() { "Service", "Service", }); internal_static_google_cloud_compute_v1_TargetTcpProxiesSetProxyHeaderRequest_descriptor = - getDescriptor().getMessageTypes().get(1221); + getDescriptor().getMessageTypes().get(1223); internal_static_google_cloud_compute_v1_TargetTcpProxiesSetProxyHeaderRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetTcpProxiesSetProxyHeaderRequest_descriptor, @@ -36969,7 +37018,7 @@ private static void _clinit_autosplit_dinit_3() { "ProxyHeader", "ProxyHeader", }); internal_static_google_cloud_compute_v1_TargetTcpProxy_descriptor = - getDescriptor().getMessageTypes().get(1222); + getDescriptor().getMessageTypes().get(1224); internal_static_google_cloud_compute_v1_TargetTcpProxy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetTcpProxy_descriptor, @@ -36996,7 +37045,7 @@ private static void _clinit_autosplit_dinit_3() { "Service", }); internal_static_google_cloud_compute_v1_TargetTcpProxyAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1223); + getDescriptor().getMessageTypes().get(1225); internal_static_google_cloud_compute_v1_TargetTcpProxyAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetTcpProxyAggregatedList_descriptor, @@ -37025,7 +37074,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_TargetTcpProxyList_descriptor = - getDescriptor().getMessageTypes().get(1224); + getDescriptor().getMessageTypes().get(1226); internal_static_google_cloud_compute_v1_TargetTcpProxyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetTcpProxyList_descriptor, @@ -37043,7 +37092,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_TargetVpnGateway_descriptor = - getDescriptor().getMessageTypes().get(1225); + getDescriptor().getMessageTypes().get(1227); internal_static_google_cloud_compute_v1_TargetVpnGateway_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetVpnGateway_descriptor, @@ -37070,7 +37119,7 @@ private static void _clinit_autosplit_dinit_3() { "Status", }); internal_static_google_cloud_compute_v1_TargetVpnGatewayAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1226); + getDescriptor().getMessageTypes().get(1228); internal_static_google_cloud_compute_v1_TargetVpnGatewayAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetVpnGatewayAggregatedList_descriptor, @@ -37099,7 +37148,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_TargetVpnGatewayList_descriptor = - getDescriptor().getMessageTypes().get(1227); + getDescriptor().getMessageTypes().get(1229); internal_static_google_cloud_compute_v1_TargetVpnGatewayList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetVpnGatewayList_descriptor, @@ -37117,7 +37166,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_TargetVpnGatewaysScopedList_descriptor = - getDescriptor().getMessageTypes().get(1228); + getDescriptor().getMessageTypes().get(1230); internal_static_google_cloud_compute_v1_TargetVpnGatewaysScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TargetVpnGatewaysScopedList_descriptor, @@ -37125,7 +37174,7 @@ private static void _clinit_autosplit_dinit_3() { "TargetVpnGateways", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_TestFailure_descriptor = - getDescriptor().getMessageTypes().get(1229); + getDescriptor().getMessageTypes().get(1231); internal_static_google_cloud_compute_v1_TestFailure_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestFailure_descriptor, @@ -37149,7 +37198,7 @@ private static void _clinit_autosplit_dinit_3() { "Path", }); internal_static_google_cloud_compute_v1_TestIamPermissionsDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(1230); + getDescriptor().getMessageTypes().get(1232); internal_static_google_cloud_compute_v1_TestIamPermissionsDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsDiskRequest_descriptor, @@ -37157,7 +37206,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", "Zone", }); internal_static_google_cloud_compute_v1_TestIamPermissionsExternalVpnGatewayRequest_descriptor = - getDescriptor().getMessageTypes().get(1231); + getDescriptor().getMessageTypes().get(1233); internal_static_google_cloud_compute_v1_TestIamPermissionsExternalVpnGatewayRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsExternalVpnGatewayRequest_descriptor, @@ -37165,7 +37214,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1232); + getDescriptor().getMessageTypes().get(1234); internal_static_google_cloud_compute_v1_TestIamPermissionsFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsFirewallPolicyRequest_descriptor, @@ -37173,7 +37222,7 @@ private static void _clinit_autosplit_dinit_3() { "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsImageRequest_descriptor = - getDescriptor().getMessageTypes().get(1233); + getDescriptor().getMessageTypes().get(1235); internal_static_google_cloud_compute_v1_TestIamPermissionsImageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsImageRequest_descriptor, @@ -37181,7 +37230,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1234); + getDescriptor().getMessageTypes().get(1236); internal_static_google_cloud_compute_v1_TestIamPermissionsInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsInstanceRequest_descriptor, @@ -37189,7 +37238,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", "Zone", }); internal_static_google_cloud_compute_v1_TestIamPermissionsInstanceTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(1235); + getDescriptor().getMessageTypes().get(1237); internal_static_google_cloud_compute_v1_TestIamPermissionsInstanceTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsInstanceTemplateRequest_descriptor, @@ -37197,7 +37246,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsLicenseCodeRequest_descriptor = - getDescriptor().getMessageTypes().get(1236); + getDescriptor().getMessageTypes().get(1238); internal_static_google_cloud_compute_v1_TestIamPermissionsLicenseCodeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsLicenseCodeRequest_descriptor, @@ -37205,7 +37254,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsLicenseRequest_descriptor = - getDescriptor().getMessageTypes().get(1237); + getDescriptor().getMessageTypes().get(1239); internal_static_google_cloud_compute_v1_TestIamPermissionsLicenseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsLicenseRequest_descriptor, @@ -37213,7 +37262,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsMachineImageRequest_descriptor = - getDescriptor().getMessageTypes().get(1238); + getDescriptor().getMessageTypes().get(1240); internal_static_google_cloud_compute_v1_TestIamPermissionsMachineImageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsMachineImageRequest_descriptor, @@ -37221,7 +37270,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkAttachmentRequest_descriptor = - getDescriptor().getMessageTypes().get(1239); + getDescriptor().getMessageTypes().get(1241); internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkAttachmentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkAttachmentRequest_descriptor, @@ -37229,7 +37278,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkEndpointGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(1240); + getDescriptor().getMessageTypes().get(1242); internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkEndpointGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkEndpointGroupRequest_descriptor, @@ -37237,7 +37286,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", "Zone", }); internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1241); + getDescriptor().getMessageTypes().get(1243); internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkFirewallPolicyRequest_descriptor, @@ -37245,7 +37294,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsNodeGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(1242); + getDescriptor().getMessageTypes().get(1244); internal_static_google_cloud_compute_v1_TestIamPermissionsNodeGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsNodeGroupRequest_descriptor, @@ -37253,7 +37302,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", "Zone", }); internal_static_google_cloud_compute_v1_TestIamPermissionsNodeTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(1243); + getDescriptor().getMessageTypes().get(1245); internal_static_google_cloud_compute_v1_TestIamPermissionsNodeTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsNodeTemplateRequest_descriptor, @@ -37261,7 +37310,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsPacketMirroringRequest_descriptor = - getDescriptor().getMessageTypes().get(1244); + getDescriptor().getMessageTypes().get(1246); internal_static_google_cloud_compute_v1_TestIamPermissionsPacketMirroringRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsPacketMirroringRequest_descriptor, @@ -37269,7 +37318,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsRegionDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(1245); + getDescriptor().getMessageTypes().get(1247); internal_static_google_cloud_compute_v1_TestIamPermissionsRegionDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsRegionDiskRequest_descriptor, @@ -37277,7 +37326,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsRegionNetworkFirewallPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1246); + getDescriptor().getMessageTypes().get(1248); internal_static_google_cloud_compute_v1_TestIamPermissionsRegionNetworkFirewallPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsRegionNetworkFirewallPolicyRequest_descriptor, @@ -37285,7 +37334,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsReservationRequest_descriptor = - getDescriptor().getMessageTypes().get(1247); + getDescriptor().getMessageTypes().get(1249); internal_static_google_cloud_compute_v1_TestIamPermissionsReservationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsReservationRequest_descriptor, @@ -37293,7 +37342,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", "Zone", }); internal_static_google_cloud_compute_v1_TestIamPermissionsResourcePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1248); + getDescriptor().getMessageTypes().get(1250); internal_static_google_cloud_compute_v1_TestIamPermissionsResourcePolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsResourcePolicyRequest_descriptor, @@ -37301,7 +37350,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsServiceAttachmentRequest_descriptor = - getDescriptor().getMessageTypes().get(1249); + getDescriptor().getMessageTypes().get(1251); internal_static_google_cloud_compute_v1_TestIamPermissionsServiceAttachmentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsServiceAttachmentRequest_descriptor, @@ -37309,7 +37358,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(1250); + getDescriptor().getMessageTypes().get(1252); internal_static_google_cloud_compute_v1_TestIamPermissionsSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsSnapshotRequest_descriptor, @@ -37317,7 +37366,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsSubnetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(1251); + getDescriptor().getMessageTypes().get(1253); internal_static_google_cloud_compute_v1_TestIamPermissionsSubnetworkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsSubnetworkRequest_descriptor, @@ -37325,7 +37374,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestIamPermissionsVpnGatewayRequest_descriptor = - getDescriptor().getMessageTypes().get(1252); + getDescriptor().getMessageTypes().get(1254); internal_static_google_cloud_compute_v1_TestIamPermissionsVpnGatewayRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestIamPermissionsVpnGatewayRequest_descriptor, @@ -37333,7 +37382,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "Resource", "TestPermissionsRequestResource", }); internal_static_google_cloud_compute_v1_TestPermissionsRequest_descriptor = - getDescriptor().getMessageTypes().get(1253); + getDescriptor().getMessageTypes().get(1255); internal_static_google_cloud_compute_v1_TestPermissionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestPermissionsRequest_descriptor, @@ -37341,7 +37390,7 @@ private static void _clinit_autosplit_dinit_3() { "Permissions", }); internal_static_google_cloud_compute_v1_TestPermissionsResponse_descriptor = - getDescriptor().getMessageTypes().get(1254); + getDescriptor().getMessageTypes().get(1256); internal_static_google_cloud_compute_v1_TestPermissionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_TestPermissionsResponse_descriptor, @@ -37349,7 +37398,7 @@ private static void _clinit_autosplit_dinit_3() { "Permissions", }); internal_static_google_cloud_compute_v1_Uint128_descriptor = - getDescriptor().getMessageTypes().get(1255); + getDescriptor().getMessageTypes().get(1257); internal_static_google_cloud_compute_v1_Uint128_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Uint128_descriptor, @@ -37357,7 +37406,7 @@ private static void _clinit_autosplit_dinit_3() { "High", "Low", "High", "Low", }); internal_static_google_cloud_compute_v1_UpdateAccessConfigInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1256); + getDescriptor().getMessageTypes().get(1258); internal_static_google_cloud_compute_v1_UpdateAccessConfigInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateAccessConfigInstanceRequest_descriptor, @@ -37371,7 +37420,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdateAutoscalerRequest_descriptor = - getDescriptor().getMessageTypes().get(1257); + getDescriptor().getMessageTypes().get(1259); internal_static_google_cloud_compute_v1_UpdateAutoscalerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateAutoscalerRequest_descriptor, @@ -37385,7 +37434,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdateBackendBucketRequest_descriptor = - getDescriptor().getMessageTypes().get(1258); + getDescriptor().getMessageTypes().get(1260); internal_static_google_cloud_compute_v1_UpdateBackendBucketRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateBackendBucketRequest_descriptor, @@ -37393,7 +37442,7 @@ private static void _clinit_autosplit_dinit_3() { "BackendBucket", "BackendBucketResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_UpdateBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(1259); + getDescriptor().getMessageTypes().get(1261); internal_static_google_cloud_compute_v1_UpdateBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateBackendServiceRequest_descriptor, @@ -37401,7 +37450,7 @@ private static void _clinit_autosplit_dinit_3() { "BackendService", "BackendServiceResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_UpdateDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(1260); + getDescriptor().getMessageTypes().get(1262); internal_static_google_cloud_compute_v1_UpdateDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateDiskRequest_descriptor, @@ -37418,7 +37467,7 @@ private static void _clinit_autosplit_dinit_3() { "UpdateMask", }); internal_static_google_cloud_compute_v1_UpdateDisplayDeviceInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1261); + getDescriptor().getMessageTypes().get(1263); internal_static_google_cloud_compute_v1_UpdateDisplayDeviceInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateDisplayDeviceInstanceRequest_descriptor, @@ -37426,7 +37475,7 @@ private static void _clinit_autosplit_dinit_3() { "DisplayDeviceResource", "Instance", "Project", "RequestId", "Zone", "RequestId", }); internal_static_google_cloud_compute_v1_UpdateFirewallRequest_descriptor = - getDescriptor().getMessageTypes().get(1262); + getDescriptor().getMessageTypes().get(1264); internal_static_google_cloud_compute_v1_UpdateFirewallRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateFirewallRequest_descriptor, @@ -37434,7 +37483,7 @@ private static void _clinit_autosplit_dinit_3() { "Firewall", "FirewallResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_UpdateHealthCheckRequest_descriptor = - getDescriptor().getMessageTypes().get(1263); + getDescriptor().getMessageTypes().get(1265); internal_static_google_cloud_compute_v1_UpdateHealthCheckRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateHealthCheckRequest_descriptor, @@ -37442,7 +37491,7 @@ private static void _clinit_autosplit_dinit_3() { "HealthCheck", "HealthCheckResource", "Project", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_UpdateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1264); + getDescriptor().getMessageTypes().get(1266); internal_static_google_cloud_compute_v1_UpdateInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateInstanceRequest_descriptor, @@ -37459,7 +37508,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdateNetworkInterfaceInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1265); + getDescriptor().getMessageTypes().get(1267); internal_static_google_cloud_compute_v1_UpdateNetworkInterfaceInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateNetworkInterfaceInstanceRequest_descriptor, @@ -37473,7 +37522,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdatePeeringNetworkRequest_descriptor = - getDescriptor().getMessageTypes().get(1266); + getDescriptor().getMessageTypes().get(1268); internal_static_google_cloud_compute_v1_UpdatePeeringNetworkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdatePeeringNetworkRequest_descriptor, @@ -37485,7 +37534,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdatePerInstanceConfigsInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(1267); + getDescriptor().getMessageTypes().get(1269); internal_static_google_cloud_compute_v1_UpdatePerInstanceConfigsInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdatePerInstanceConfigsInstanceGroupManagerRequest_descriptor, @@ -37498,7 +37547,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest_descriptor = - getDescriptor().getMessageTypes().get(1268); + getDescriptor().getMessageTypes().get(1270); internal_static_google_cloud_compute_v1_UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest_descriptor, @@ -37511,7 +37560,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdateRegionAutoscalerRequest_descriptor = - getDescriptor().getMessageTypes().get(1269); + getDescriptor().getMessageTypes().get(1271); internal_static_google_cloud_compute_v1_UpdateRegionAutoscalerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateRegionAutoscalerRequest_descriptor, @@ -37525,7 +37574,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdateRegionBackendServiceRequest_descriptor = - getDescriptor().getMessageTypes().get(1270); + getDescriptor().getMessageTypes().get(1272); internal_static_google_cloud_compute_v1_UpdateRegionBackendServiceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateRegionBackendServiceRequest_descriptor, @@ -37538,7 +37587,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdateRegionCommitmentRequest_descriptor = - getDescriptor().getMessageTypes().get(1271); + getDescriptor().getMessageTypes().get(1273); internal_static_google_cloud_compute_v1_UpdateRegionCommitmentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateRegionCommitmentRequest_descriptor, @@ -37555,7 +37604,7 @@ private static void _clinit_autosplit_dinit_3() { "UpdateMask", }); internal_static_google_cloud_compute_v1_UpdateRegionDiskRequest_descriptor = - getDescriptor().getMessageTypes().get(1272); + getDescriptor().getMessageTypes().get(1274); internal_static_google_cloud_compute_v1_UpdateRegionDiskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateRegionDiskRequest_descriptor, @@ -37572,7 +37621,7 @@ private static void _clinit_autosplit_dinit_3() { "UpdateMask", }); internal_static_google_cloud_compute_v1_UpdateRegionHealthCheckRequest_descriptor = - getDescriptor().getMessageTypes().get(1273); + getDescriptor().getMessageTypes().get(1275); internal_static_google_cloud_compute_v1_UpdateRegionHealthCheckRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateRegionHealthCheckRequest_descriptor, @@ -37580,7 +37629,7 @@ private static void _clinit_autosplit_dinit_3() { "HealthCheck", "HealthCheckResource", "Project", "Region", "RequestId", "RequestId", }); internal_static_google_cloud_compute_v1_UpdateRegionUrlMapRequest_descriptor = - getDescriptor().getMessageTypes().get(1274); + getDescriptor().getMessageTypes().get(1276); internal_static_google_cloud_compute_v1_UpdateRegionUrlMapRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateRegionUrlMapRequest_descriptor, @@ -37588,7 +37637,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "RequestId", "UrlMap", "UrlMapResource", "RequestId", }); internal_static_google_cloud_compute_v1_UpdateReservationRequest_descriptor = - getDescriptor().getMessageTypes().get(1275); + getDescriptor().getMessageTypes().get(1277); internal_static_google_cloud_compute_v1_UpdateReservationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateReservationRequest_descriptor, @@ -37605,7 +37654,7 @@ private static void _clinit_autosplit_dinit_3() { "UpdateMask", }); internal_static_google_cloud_compute_v1_UpdateRouterRequest_descriptor = - getDescriptor().getMessageTypes().get(1276); + getDescriptor().getMessageTypes().get(1278); internal_static_google_cloud_compute_v1_UpdateRouterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateRouterRequest_descriptor, @@ -37613,7 +37662,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "RequestId", "Router", "RouterResource", "RequestId", }); internal_static_google_cloud_compute_v1_UpdateShieldedInstanceConfigInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1277); + getDescriptor().getMessageTypes().get(1279); internal_static_google_cloud_compute_v1_UpdateShieldedInstanceConfigInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateShieldedInstanceConfigInstanceRequest_descriptor, @@ -37626,7 +37675,7 @@ private static void _clinit_autosplit_dinit_3() { "RequestId", }); internal_static_google_cloud_compute_v1_UpdateUrlMapRequest_descriptor = - getDescriptor().getMessageTypes().get(1278); + getDescriptor().getMessageTypes().get(1280); internal_static_google_cloud_compute_v1_UpdateUrlMapRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UpdateUrlMapRequest_descriptor, @@ -37634,7 +37683,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "RequestId", "UrlMap", "UrlMapResource", "RequestId", }); internal_static_google_cloud_compute_v1_UrlMap_descriptor = - getDescriptor().getMessageTypes().get(1279); + getDescriptor().getMessageTypes().get(1281); internal_static_google_cloud_compute_v1_UrlMap_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMap_descriptor, @@ -37668,7 +37717,7 @@ private static void _clinit_autosplit_dinit_3() { "SelfLink", }); internal_static_google_cloud_compute_v1_UrlMapList_descriptor = - getDescriptor().getMessageTypes().get(1280); + getDescriptor().getMessageTypes().get(1282); internal_static_google_cloud_compute_v1_UrlMapList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapList_descriptor, @@ -37686,7 +37735,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_UrlMapReference_descriptor = - getDescriptor().getMessageTypes().get(1281); + getDescriptor().getMessageTypes().get(1283); internal_static_google_cloud_compute_v1_UrlMapReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapReference_descriptor, @@ -37694,7 +37743,7 @@ private static void _clinit_autosplit_dinit_3() { "UrlMap", "UrlMap", }); internal_static_google_cloud_compute_v1_UrlMapTest_descriptor = - getDescriptor().getMessageTypes().get(1282); + getDescriptor().getMessageTypes().get(1284); internal_static_google_cloud_compute_v1_UrlMapTest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapTest_descriptor, @@ -37714,7 +37763,7 @@ private static void _clinit_autosplit_dinit_3() { "Service", }); internal_static_google_cloud_compute_v1_UrlMapTestHeader_descriptor = - getDescriptor().getMessageTypes().get(1283); + getDescriptor().getMessageTypes().get(1285); internal_static_google_cloud_compute_v1_UrlMapTestHeader_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapTestHeader_descriptor, @@ -37722,7 +37771,7 @@ private static void _clinit_autosplit_dinit_3() { "Name", "Value", "Name", "Value", }); internal_static_google_cloud_compute_v1_UrlMapValidationResult_descriptor = - getDescriptor().getMessageTypes().get(1284); + getDescriptor().getMessageTypes().get(1286); internal_static_google_cloud_compute_v1_UrlMapValidationResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapValidationResult_descriptor, @@ -37735,7 +37784,7 @@ private static void _clinit_autosplit_dinit_3() { "TestPassed", }); internal_static_google_cloud_compute_v1_UrlMapsAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1285); + getDescriptor().getMessageTypes().get(1287); internal_static_google_cloud_compute_v1_UrlMapsAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapsAggregatedList_descriptor, @@ -37764,7 +37813,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_UrlMapsScopedList_descriptor = - getDescriptor().getMessageTypes().get(1286); + getDescriptor().getMessageTypes().get(1288); internal_static_google_cloud_compute_v1_UrlMapsScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapsScopedList_descriptor, @@ -37772,7 +37821,7 @@ private static void _clinit_autosplit_dinit_3() { "UrlMaps", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_UrlMapsValidateRequest_descriptor = - getDescriptor().getMessageTypes().get(1287); + getDescriptor().getMessageTypes().get(1289); internal_static_google_cloud_compute_v1_UrlMapsValidateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapsValidateRequest_descriptor, @@ -37780,7 +37829,7 @@ private static void _clinit_autosplit_dinit_3() { "LoadBalancingSchemes", "Resource", "Resource", }); internal_static_google_cloud_compute_v1_UrlMapsValidateResponse_descriptor = - getDescriptor().getMessageTypes().get(1288); + getDescriptor().getMessageTypes().get(1290); internal_static_google_cloud_compute_v1_UrlMapsValidateResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlMapsValidateResponse_descriptor, @@ -37788,7 +37837,7 @@ private static void _clinit_autosplit_dinit_3() { "Result", "Result", }); internal_static_google_cloud_compute_v1_UrlRewrite_descriptor = - getDescriptor().getMessageTypes().get(1289); + getDescriptor().getMessageTypes().get(1291); internal_static_google_cloud_compute_v1_UrlRewrite_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UrlRewrite_descriptor, @@ -37796,7 +37845,7 @@ private static void _clinit_autosplit_dinit_3() { "HostRewrite", "PathPrefixRewrite", "HostRewrite", "PathPrefixRewrite", }); internal_static_google_cloud_compute_v1_UsableSubnetwork_descriptor = - getDescriptor().getMessageTypes().get(1290); + getDescriptor().getMessageTypes().get(1292); internal_static_google_cloud_compute_v1_UsableSubnetwork_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UsableSubnetwork_descriptor, @@ -37822,7 +37871,7 @@ private static void _clinit_autosplit_dinit_3() { "Subnetwork", }); internal_static_google_cloud_compute_v1_UsableSubnetworkSecondaryRange_descriptor = - getDescriptor().getMessageTypes().get(1291); + getDescriptor().getMessageTypes().get(1293); internal_static_google_cloud_compute_v1_UsableSubnetworkSecondaryRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UsableSubnetworkSecondaryRange_descriptor, @@ -37830,7 +37879,7 @@ private static void _clinit_autosplit_dinit_3() { "IpCidrRange", "RangeName", "IpCidrRange", "RangeName", }); internal_static_google_cloud_compute_v1_UsableSubnetworksAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1292); + getDescriptor().getMessageTypes().get(1294); internal_static_google_cloud_compute_v1_UsableSubnetworksAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UsableSubnetworksAggregatedList_descriptor, @@ -37848,7 +37897,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_UsageExportLocation_descriptor = - getDescriptor().getMessageTypes().get(1293); + getDescriptor().getMessageTypes().get(1295); internal_static_google_cloud_compute_v1_UsageExportLocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_UsageExportLocation_descriptor, @@ -37856,7 +37905,7 @@ private static void _clinit_autosplit_dinit_3() { "BucketName", "ReportNamePrefix", "BucketName", "ReportNamePrefix", }); internal_static_google_cloud_compute_v1_ValidateRegionUrlMapRequest_descriptor = - getDescriptor().getMessageTypes().get(1294); + getDescriptor().getMessageTypes().get(1296); internal_static_google_cloud_compute_v1_ValidateRegionUrlMapRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ValidateRegionUrlMapRequest_descriptor, @@ -37864,7 +37913,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "Region", "RegionUrlMapsValidateRequestResource", "UrlMap", }); internal_static_google_cloud_compute_v1_ValidateUrlMapRequest_descriptor = - getDescriptor().getMessageTypes().get(1295); + getDescriptor().getMessageTypes().get(1297); internal_static_google_cloud_compute_v1_ValidateUrlMapRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ValidateUrlMapRequest_descriptor, @@ -37872,7 +37921,7 @@ private static void _clinit_autosplit_dinit_3() { "Project", "UrlMap", "UrlMapsValidateRequestResource", }); internal_static_google_cloud_compute_v1_VmEndpointNatMappings_descriptor = - getDescriptor().getMessageTypes().get(1296); + getDescriptor().getMessageTypes().get(1298); internal_static_google_cloud_compute_v1_VmEndpointNatMappings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VmEndpointNatMappings_descriptor, @@ -37880,7 +37929,7 @@ private static void _clinit_autosplit_dinit_3() { "InstanceName", "InterfaceNatMappings", "InstanceName", }); internal_static_google_cloud_compute_v1_VmEndpointNatMappingsInterfaceNatMappings_descriptor = - getDescriptor().getMessageTypes().get(1297); + getDescriptor().getMessageTypes().get(1299); internal_static_google_cloud_compute_v1_VmEndpointNatMappingsInterfaceNatMappings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VmEndpointNatMappingsInterfaceNatMappings_descriptor, @@ -37898,7 +37947,7 @@ private static void _clinit_autosplit_dinit_3() { "SourceVirtualIp", }); internal_static_google_cloud_compute_v1_VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings_descriptor = - getDescriptor().getMessageTypes().get(1298); + getDescriptor().getMessageTypes().get(1300); internal_static_google_cloud_compute_v1_VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings_descriptor, @@ -37913,7 +37962,7 @@ private static void _clinit_autosplit_dinit_3() { "RuleNumber", }); internal_static_google_cloud_compute_v1_VmEndpointNatMappingsList_descriptor = - getDescriptor().getMessageTypes().get(1299); + getDescriptor().getMessageTypes().get(1301); internal_static_google_cloud_compute_v1_VmEndpointNatMappingsList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VmEndpointNatMappingsList_descriptor, @@ -37931,7 +37980,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_VpnGateway_descriptor = - getDescriptor().getMessageTypes().get(1300); + getDescriptor().getMessageTypes().get(1302); internal_static_google_cloud_compute_v1_VpnGateway_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGateway_descriptor, @@ -37968,7 +38017,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_VpnGatewayAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1301); + getDescriptor().getMessageTypes().get(1303); internal_static_google_cloud_compute_v1_VpnGatewayAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewayAggregatedList_descriptor, @@ -37997,7 +38046,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_VpnGatewayList_descriptor = - getDescriptor().getMessageTypes().get(1302); + getDescriptor().getMessageTypes().get(1304); internal_static_google_cloud_compute_v1_VpnGatewayList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewayList_descriptor, @@ -38015,7 +38064,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_VpnGatewayStatus_descriptor = - getDescriptor().getMessageTypes().get(1303); + getDescriptor().getMessageTypes().get(1305); internal_static_google_cloud_compute_v1_VpnGatewayStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewayStatus_descriptor, @@ -38023,7 +38072,7 @@ private static void _clinit_autosplit_dinit_3() { "VpnConnections", }); internal_static_google_cloud_compute_v1_VpnGatewayStatusHighAvailabilityRequirementState_descriptor = - getDescriptor().getMessageTypes().get(1304); + getDescriptor().getMessageTypes().get(1306); internal_static_google_cloud_compute_v1_VpnGatewayStatusHighAvailabilityRequirementState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewayStatusHighAvailabilityRequirementState_descriptor, @@ -38031,7 +38080,7 @@ private static void _clinit_autosplit_dinit_3() { "State", "UnsatisfiedReason", "State", "UnsatisfiedReason", }); internal_static_google_cloud_compute_v1_VpnGatewayStatusTunnel_descriptor = - getDescriptor().getMessageTypes().get(1305); + getDescriptor().getMessageTypes().get(1307); internal_static_google_cloud_compute_v1_VpnGatewayStatusTunnel_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewayStatusTunnel_descriptor, @@ -38044,7 +38093,7 @@ private static void _clinit_autosplit_dinit_3() { "TunnelUrl", }); internal_static_google_cloud_compute_v1_VpnGatewayStatusVpnConnection_descriptor = - getDescriptor().getMessageTypes().get(1306); + getDescriptor().getMessageTypes().get(1308); internal_static_google_cloud_compute_v1_VpnGatewayStatusVpnConnection_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewayStatusVpnConnection_descriptor, @@ -38058,7 +38107,7 @@ private static void _clinit_autosplit_dinit_3() { "State", }); internal_static_google_cloud_compute_v1_VpnGatewayVpnGatewayInterface_descriptor = - getDescriptor().getMessageTypes().get(1307); + getDescriptor().getMessageTypes().get(1309); internal_static_google_cloud_compute_v1_VpnGatewayVpnGatewayInterface_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewayVpnGatewayInterface_descriptor, @@ -38071,7 +38120,7 @@ private static void _clinit_autosplit_dinit_3() { "IpAddress", }); internal_static_google_cloud_compute_v1_VpnGatewaysGetStatusResponse_descriptor = - getDescriptor().getMessageTypes().get(1308); + getDescriptor().getMessageTypes().get(1310); internal_static_google_cloud_compute_v1_VpnGatewaysGetStatusResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewaysGetStatusResponse_descriptor, @@ -38079,7 +38128,7 @@ private static void _clinit_autosplit_dinit_3() { "Result", "Result", }); internal_static_google_cloud_compute_v1_VpnGatewaysScopedList_descriptor = - getDescriptor().getMessageTypes().get(1309); + getDescriptor().getMessageTypes().get(1311); internal_static_google_cloud_compute_v1_VpnGatewaysScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnGatewaysScopedList_descriptor, @@ -38087,7 +38136,7 @@ private static void _clinit_autosplit_dinit_3() { "VpnGateways", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_VpnTunnel_descriptor = - getDescriptor().getMessageTypes().get(1310); + getDescriptor().getMessageTypes().get(1312); internal_static_google_cloud_compute_v1_VpnTunnel_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnTunnel_descriptor, @@ -38136,7 +38185,7 @@ private static void _clinit_autosplit_dinit_3() { "VpnGatewayInterface", }); internal_static_google_cloud_compute_v1_VpnTunnelAggregatedList_descriptor = - getDescriptor().getMessageTypes().get(1311); + getDescriptor().getMessageTypes().get(1313); internal_static_google_cloud_compute_v1_VpnTunnelAggregatedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnTunnelAggregatedList_descriptor, @@ -38165,7 +38214,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_VpnTunnelList_descriptor = - getDescriptor().getMessageTypes().get(1312); + getDescriptor().getMessageTypes().get(1314); internal_static_google_cloud_compute_v1_VpnTunnelList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnTunnelList_descriptor, @@ -38183,7 +38232,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_VpnTunnelsScopedList_descriptor = - getDescriptor().getMessageTypes().get(1313); + getDescriptor().getMessageTypes().get(1315); internal_static_google_cloud_compute_v1_VpnTunnelsScopedList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_VpnTunnelsScopedList_descriptor, @@ -38191,7 +38240,7 @@ private static void _clinit_autosplit_dinit_3() { "VpnTunnels", "Warning", "Warning", }); internal_static_google_cloud_compute_v1_WafExpressionSet_descriptor = - getDescriptor().getMessageTypes().get(1314); + getDescriptor().getMessageTypes().get(1316); internal_static_google_cloud_compute_v1_WafExpressionSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_WafExpressionSet_descriptor, @@ -38199,7 +38248,7 @@ private static void _clinit_autosplit_dinit_3() { "Aliases", "Expressions", "Id", "Id", }); internal_static_google_cloud_compute_v1_WafExpressionSetExpression_descriptor = - getDescriptor().getMessageTypes().get(1315); + getDescriptor().getMessageTypes().get(1317); internal_static_google_cloud_compute_v1_WafExpressionSetExpression_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_WafExpressionSetExpression_descriptor, @@ -38207,7 +38256,7 @@ private static void _clinit_autosplit_dinit_3() { "Id", "Sensitivity", "Id", "Sensitivity", }); internal_static_google_cloud_compute_v1_WaitGlobalOperationRequest_descriptor = - getDescriptor().getMessageTypes().get(1316); + getDescriptor().getMessageTypes().get(1318); internal_static_google_cloud_compute_v1_WaitGlobalOperationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_WaitGlobalOperationRequest_descriptor, @@ -38215,7 +38264,7 @@ private static void _clinit_autosplit_dinit_3() { "Operation", "Project", }); internal_static_google_cloud_compute_v1_WaitRegionOperationRequest_descriptor = - getDescriptor().getMessageTypes().get(1317); + getDescriptor().getMessageTypes().get(1319); internal_static_google_cloud_compute_v1_WaitRegionOperationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_WaitRegionOperationRequest_descriptor, @@ -38223,7 +38272,7 @@ private static void _clinit_autosplit_dinit_3() { "Operation", "Project", "Region", }); internal_static_google_cloud_compute_v1_WaitZoneOperationRequest_descriptor = - getDescriptor().getMessageTypes().get(1318); + getDescriptor().getMessageTypes().get(1320); internal_static_google_cloud_compute_v1_WaitZoneOperationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_WaitZoneOperationRequest_descriptor, @@ -38231,7 +38280,7 @@ private static void _clinit_autosplit_dinit_3() { "Operation", "Project", "Zone", }); internal_static_google_cloud_compute_v1_Warning_descriptor = - getDescriptor().getMessageTypes().get(1319); + getDescriptor().getMessageTypes().get(1321); internal_static_google_cloud_compute_v1_Warning_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Warning_descriptor, @@ -38239,7 +38288,7 @@ private static void _clinit_autosplit_dinit_3() { "Code", "Data", "Message", "Code", "Message", }); internal_static_google_cloud_compute_v1_Warnings_descriptor = - getDescriptor().getMessageTypes().get(1320); + getDescriptor().getMessageTypes().get(1322); internal_static_google_cloud_compute_v1_Warnings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Warnings_descriptor, @@ -38247,7 +38296,7 @@ private static void _clinit_autosplit_dinit_3() { "Code", "Data", "Message", "Code", "Message", }); internal_static_google_cloud_compute_v1_WeightedBackendService_descriptor = - getDescriptor().getMessageTypes().get(1321); + getDescriptor().getMessageTypes().get(1323); internal_static_google_cloud_compute_v1_WeightedBackendService_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_WeightedBackendService_descriptor, @@ -38260,7 +38309,7 @@ private static void _clinit_autosplit_dinit_3() { "Weight", }); internal_static_google_cloud_compute_v1_XpnHostList_descriptor = - getDescriptor().getMessageTypes().get(1322); + getDescriptor().getMessageTypes().get(1324); internal_static_google_cloud_compute_v1_XpnHostList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_XpnHostList_descriptor, @@ -38278,7 +38327,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_XpnResourceId_descriptor = - getDescriptor().getMessageTypes().get(1323); + getDescriptor().getMessageTypes().get(1325); internal_static_google_cloud_compute_v1_XpnResourceId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_XpnResourceId_descriptor, @@ -38286,7 +38335,7 @@ private static void _clinit_autosplit_dinit_3() { "Id", "Type", "Id", "Type", }); internal_static_google_cloud_compute_v1_Zone_descriptor = - getDescriptor().getMessageTypes().get(1324); + getDescriptor().getMessageTypes().get(1326); internal_static_google_cloud_compute_v1_Zone_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_Zone_descriptor, @@ -38314,7 +38363,7 @@ private static void _clinit_autosplit_dinit_3() { "SupportsPzs", }); internal_static_google_cloud_compute_v1_ZoneList_descriptor = - getDescriptor().getMessageTypes().get(1325); + getDescriptor().getMessageTypes().get(1327); internal_static_google_cloud_compute_v1_ZoneList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ZoneList_descriptor, @@ -38332,7 +38381,7 @@ private static void _clinit_autosplit_dinit_3() { "Warning", }); internal_static_google_cloud_compute_v1_ZoneSetLabelsRequest_descriptor = - getDescriptor().getMessageTypes().get(1326); + getDescriptor().getMessageTypes().get(1328); internal_static_google_cloud_compute_v1_ZoneSetLabelsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ZoneSetLabelsRequest_descriptor, @@ -38350,7 +38399,7 @@ private static void _clinit_autosplit_dinit_3() { "Key", "Value", }); internal_static_google_cloud_compute_v1_ZoneSetPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1327); + getDescriptor().getMessageTypes().get(1329); internal_static_google_cloud_compute_v1_ZoneSetPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_compute_v1_ZoneSetPolicyRequest_descriptor, diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestOsFeature.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestOsFeature.java index bc99213c33d6..ae28d4a8cfcc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestOsFeature.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestOsFeature.java @@ -97,6 +97,8 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { SECURE_BOOT(376811194), /** SEV_CAPABLE = 87083793; */ SEV_CAPABLE(87083793), + /** SEV_LIVE_MIGRATABLE = 392039820; */ + SEV_LIVE_MIGRATABLE(392039820), /** SEV_SNP_CAPABLE = 426919; */ SEV_SNP_CAPABLE(426919), /** UEFI_COMPATIBLE = 195865408; */ @@ -128,6 +130,8 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { public static final int SECURE_BOOT_VALUE = 376811194; /** SEV_CAPABLE = 87083793; */ public static final int SEV_CAPABLE_VALUE = 87083793; + /** SEV_LIVE_MIGRATABLE = 392039820; */ + public static final int SEV_LIVE_MIGRATABLE_VALUE = 392039820; /** SEV_SNP_CAPABLE = 426919; */ public static final int SEV_SNP_CAPABLE_VALUE = 426919; /** UEFI_COMPATIBLE = 195865408; */ @@ -173,6 +177,8 @@ public static Type forNumber(int value) { return SECURE_BOOT; case 87083793: return SEV_CAPABLE; + case 392039820: + return SEV_LIVE_MIGRATABLE; case 426919: return SEV_SNP_CAPABLE; case 195865408: diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java index ef20e94ed3f8..e45bfe86b8f1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java @@ -87,13 +87,45 @@ public enum HealthState implements com.google.protobuf.ProtocolMessageEnum { * UNDEFINED_HEALTH_STATE = 0; */ UNDEFINED_HEALTH_STATE(0), - /** DRAINING = 480455402; */ + /** + * + * + *
+     * Endpoint is being drained.
+     * 
+ * + * DRAINING = 480455402; + */ DRAINING(480455402), - /** HEALTHY = 439801213; */ + /** + * + * + *
+     * Endpoint is healthy.
+     * 
+ * + * HEALTHY = 439801213; + */ HEALTHY(439801213), - /** UNHEALTHY = 462118084; */ + /** + * + * + *
+     * Endpoint is unhealthy.
+     * 
+ * + * UNHEALTHY = 462118084; + */ UNHEALTHY(462118084), - /** UNKNOWN = 433141802; */ + /** + * + * + *
+     * Health status of the endpoint is unknown.
+     * 
+ * + * UNKNOWN = 433141802; + */ UNKNOWN(433141802), UNRECOGNIZED(-1), ; @@ -108,13 +140,45 @@ public enum HealthState implements com.google.protobuf.ProtocolMessageEnum { * UNDEFINED_HEALTH_STATE = 0; */ public static final int UNDEFINED_HEALTH_STATE_VALUE = 0; - /** DRAINING = 480455402; */ + /** + * + * + *
+     * Endpoint is being drained.
+     * 
+ * + * DRAINING = 480455402; + */ public static final int DRAINING_VALUE = 480455402; - /** HEALTHY = 439801213; */ + /** + * + * + *
+     * Endpoint is healthy.
+     * 
+ * + * HEALTHY = 439801213; + */ public static final int HEALTHY_VALUE = 439801213; - /** UNHEALTHY = 462118084; */ + /** + * + * + *
+     * Endpoint is unhealthy.
+     * 
+ * + * UNHEALTHY = 462118084; + */ public static final int UNHEALTHY_VALUE = 462118084; - /** UNKNOWN = 433141802; */ + /** + * + * + *
+     * Health status of the endpoint is unknown.
+     * 
+ * + * UNKNOWN = 433141802; + */ public static final int UNKNOWN_VALUE = 433141802; public final int getNumber() { diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSimulateMaintenanceEventRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSimulateMaintenanceEventRequest.java new file mode 100644 index 000000000000..c6f37cf5ea99 --- /dev/null +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSimulateMaintenanceEventRequest.java @@ -0,0 +1,738 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/compute/v1/compute.proto + +package com.google.cloud.compute.v1; + +/** + * + * + *
+ * 
+ * + * Protobuf type {@code google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest} + */ +public final class NodeGroupsSimulateMaintenanceEventRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest) + NodeGroupsSimulateMaintenanceEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeGroupsSimulateMaintenanceEventRequest.newBuilder() to construct. + private NodeGroupsSimulateMaintenanceEventRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NodeGroupsSimulateMaintenanceEventRequest() { + nodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NodeGroupsSimulateMaintenanceEventRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.class, + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.Builder.class); + } + + public static final int NODES_FIELD_NUMBER = 104993457; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList nodes_; + /** + * + * + *
+   * Names of the nodes to go under maintenance simulation.
+   * 
+ * + * repeated string nodes = 104993457; + * + * @return A list containing the nodes. + */ + public com.google.protobuf.ProtocolStringList getNodesList() { + return nodes_; + } + /** + * + * + *
+   * Names of the nodes to go under maintenance simulation.
+   * 
+ * + * repeated string nodes = 104993457; + * + * @return The count of nodes. + */ + public int getNodesCount() { + return nodes_.size(); + } + /** + * + * + *
+   * Names of the nodes to go under maintenance simulation.
+   * 
+ * + * repeated string nodes = 104993457; + * + * @param index The index of the element to return. + * @return The nodes at the given index. + */ + public java.lang.String getNodes(int index) { + return nodes_.get(index); + } + /** + * + * + *
+   * Names of the nodes to go under maintenance simulation.
+   * 
+ * + * repeated string nodes = 104993457; + * + * @param index The index of the value to return. + * @return The bytes of the nodes at the given index. + */ + public com.google.protobuf.ByteString getNodesBytes(int index) { + return nodes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < nodes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 104993457, nodes_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < nodes_.size(); i++) { + dataSize += computeStringSizeNoTag(nodes_.getRaw(i)); + } + size += dataSize; + size += 5 * getNodesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest)) { + return super.equals(obj); + } + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest other = + (com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest) obj; + + if (!getNodesList().equals(other.getNodesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNodesCount() > 0) { + hash = (37 * hash) + NODES_FIELD_NUMBER; + hash = (53 * hash) + getNodesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * 
+ * + * Protobuf type {@code google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest) + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.class, + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.Builder.class); + } + + // Construct using + // com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + nodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_NodeGroupsSimulateMaintenanceEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + getDefaultInstanceForType() { + return com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest build() { + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest buildPartial() { + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest result = + new com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest result) { + if (((bitField0_ & 0x00000001) != 0)) { + nodes_ = nodes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodes_ = nodes_; + } + + private void buildPartial0( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest) { + return mergeFrom( + (com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest other) { + if (other + == com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + .getDefaultInstance()) return this; + if (!other.nodes_.isEmpty()) { + if (nodes_.isEmpty()) { + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodesIsMutable(); + nodes_.addAll(other.nodes_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 839947658: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNodesIsMutable(); + nodes_.add(s); + break; + } // case 839947658 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList nodes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nodes_ = new com.google.protobuf.LazyStringArrayList(nodes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @return A list containing the nodes. + */ + public com.google.protobuf.ProtocolStringList getNodesList() { + return nodes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @return The count of nodes. + */ + public int getNodesCount() { + return nodes_.size(); + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @param index The index of the element to return. + * @return The nodes at the given index. + */ + public java.lang.String getNodes(int index) { + return nodes_.get(index); + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @param index The index of the value to return. + * @return The bytes of the nodes at the given index. + */ + public com.google.protobuf.ByteString getNodesBytes(int index) { + return nodes_.getByteString(index); + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @param index The index to set the value at. + * @param value The nodes to set. + * @return This builder for chaining. + */ + public Builder setNodes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @param value The nodes to add. + * @return This builder for chaining. + */ + public Builder addNodes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @param values The nodes to add. + * @return This builder for chaining. + */ + public Builder addAllNodes(java.lang.Iterable values) { + ensureNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @return This builder for chaining. + */ + public Builder clearNodes() { + nodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Names of the nodes to go under maintenance simulation.
+     * 
+ * + * repeated string nodes = 104993457; + * + * @param value The bytes of the nodes to add. + * @return This builder for chaining. + */ + public Builder addNodesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest) + private static final com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest(); + } + + public static com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeGroupsSimulateMaintenanceEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSimulateMaintenanceEventRequestOrBuilder.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSimulateMaintenanceEventRequestOrBuilder.java new file mode 100644 index 000000000000..af18002e648e --- /dev/null +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSimulateMaintenanceEventRequestOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/compute/v1/compute.proto + +package com.google.cloud.compute.v1; + +public interface NodeGroupsSimulateMaintenanceEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Names of the nodes to go under maintenance simulation.
+   * 
+ * + * repeated string nodes = 104993457; + * + * @return A list containing the nodes. + */ + java.util.List getNodesList(); + /** + * + * + *
+   * Names of the nodes to go under maintenance simulation.
+   * 
+ * + * repeated string nodes = 104993457; + * + * @return The count of nodes. + */ + int getNodesCount(); + /** + * + * + *
+   * Names of the nodes to go under maintenance simulation.
+   * 
+ * + * repeated string nodes = 104993457; + * + * @param index The index of the element to return. + * @return The nodes at the given index. + */ + java.lang.String getNodes(int index); + /** + * + * + *
+   * Names of the nodes to go under maintenance simulation.
+   * 
+ * + * repeated string nodes = 104993457; + * + * @param index The index of the value to return. + * @return The bytes of the nodes at the given index. + */ + com.google.protobuf.ByteString getNodesBytes(int index); +} diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventNodeGroupRequest.java new file mode 100644 index 000000000000..a2bc93b0bea2 --- /dev/null +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventNodeGroupRequest.java @@ -0,0 +1,1572 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/compute/v1/compute.proto + +package com.google.cloud.compute.v1; + +/** + * + * + *
+ * A request message for NodeGroups.SimulateMaintenanceEvent. See the method description for details.
+ * 
+ * + * Protobuf type {@code google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest} + */ +public final class SimulateMaintenanceEventNodeGroupRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest) + SimulateMaintenanceEventNodeGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimulateMaintenanceEventNodeGroupRequest.newBuilder() to construct. + private SimulateMaintenanceEventNodeGroupRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SimulateMaintenanceEventNodeGroupRequest() { + nodeGroup_ = ""; + project_ = ""; + requestId_ = ""; + zone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SimulateMaintenanceEventNodeGroupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest.class, + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest.Builder.class); + } + + private int bitField0_; + public static final int NODE_GROUP_FIELD_NUMBER = 469958146; + + @SuppressWarnings("serial") + private volatile java.lang.Object nodeGroup_ = ""; + /** + * + * + *
+   * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+   * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The nodeGroup. + */ + @java.lang.Override + public java.lang.String getNodeGroup() { + java.lang.Object ref = nodeGroup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeGroup_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+   * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for nodeGroup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNodeGroupBytes() { + java.lang.Object ref = nodeGroup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_GROUPS_SIMULATE_MAINTENANCE_EVENT_REQUEST_RESOURCE_FIELD_NUMBER = + 351468764; + private com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + nodeGroupsSimulateMaintenanceEventRequestResource_; + /** + * + * + *
+   * The body resource for this request
+   * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroupsSimulateMaintenanceEventRequestResource field is set. + */ + @java.lang.Override + public boolean hasNodeGroupsSimulateMaintenanceEventRequestResource() { + return nodeGroupsSimulateMaintenanceEventRequestResource_ != null; + } + /** + * + * + *
+   * The body resource for this request
+   * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroupsSimulateMaintenanceEventRequestResource. + */ + @java.lang.Override + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + getNodeGroupsSimulateMaintenanceEventRequestResource() { + return nodeGroupsSimulateMaintenanceEventRequestResource_ == null + ? com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.getDefaultInstance() + : nodeGroupsSimulateMaintenanceEventRequestResource_; + } + /** + * + * + *
+   * The body resource for this request
+   * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestOrBuilder + getNodeGroupsSimulateMaintenanceEventRequestResourceOrBuilder() { + return nodeGroupsSimulateMaintenanceEventRequestResource_ == null + ? com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.getDefaultInstance() + : nodeGroupsSimulateMaintenanceEventRequestResource_; + } + + public static final int PROJECT_FIELD_NUMBER = 227560217; + + @SuppressWarnings("serial") + private volatile java.lang.Object project_ = ""; + /** + * + * + *
+   * Project ID for this request.
+   * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + * + * + *
+   * Project ID for this request.
+   * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 37109963; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+   * 
+ * + * optional string request_id = 37109963; + * + * @return Whether the requestId field is set. + */ + @java.lang.Override + public boolean hasRequestId() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+   * 
+ * + * optional string request_id = 37109963; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+   * 
+ * + * optional string request_id = 37109963; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 3744684; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + /** + * + * + *
+   * The name of the zone for this request.
+   * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the zone for this request.
+   * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3744684, zone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 37109963, requestId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); + } + if (nodeGroupsSimulateMaintenanceEventRequestResource_ != null) { + output.writeMessage(351468764, getNodeGroupsSimulateMaintenanceEventRequestResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 469958146, nodeGroup_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3744684, zone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(37109963, requestId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); + } + if (nodeGroupsSimulateMaintenanceEventRequestResource_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 351468764, getNodeGroupsSimulateMaintenanceEventRequestResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(469958146, nodeGroup_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest other = + (com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest) obj; + + if (!getNodeGroup().equals(other.getNodeGroup())) return false; + if (hasNodeGroupsSimulateMaintenanceEventRequestResource() + != other.hasNodeGroupsSimulateMaintenanceEventRequestResource()) return false; + if (hasNodeGroupsSimulateMaintenanceEventRequestResource()) { + if (!getNodeGroupsSimulateMaintenanceEventRequestResource() + .equals(other.getNodeGroupsSimulateMaintenanceEventRequestResource())) return false; + } + if (!getProject().equals(other.getProject())) return false; + if (hasRequestId() != other.hasRequestId()) return false; + if (hasRequestId()) { + if (!getRequestId().equals(other.getRequestId())) return false; + } + if (!getZone().equals(other.getZone())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getNodeGroup().hashCode(); + if (hasNodeGroupsSimulateMaintenanceEventRequestResource()) { + hash = (37 * hash) + NODE_GROUPS_SIMULATE_MAINTENANCE_EVENT_REQUEST_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getNodeGroupsSimulateMaintenanceEventRequestResource().hashCode(); + } + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + if (hasRequestId()) { + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + } + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request message for NodeGroups.SimulateMaintenanceEvent. See the method description for details.
+   * 
+ * + * Protobuf type {@code google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest) + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest.class, + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest.Builder.class); + } + + // Construct using + // com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + nodeGroup_ = ""; + nodeGroupsSimulateMaintenanceEventRequestResource_ = null; + if (nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ != null) { + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_.dispose(); + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ = null; + } + project_ = ""; + requestId_ = ""; + zone_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.compute.v1.Compute + .internal_static_google_cloud_compute_v1_SimulateMaintenanceEventNodeGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest + getDefaultInstanceForType() { + return com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest build() { + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest buildPartial() { + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest result = + new com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.nodeGroup_ = nodeGroup_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nodeGroupsSimulateMaintenanceEventRequestResource_ = + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ == null + ? nodeGroupsSimulateMaintenanceEventRequestResource_ + : nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.project_ = project_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.zone_ = zone_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest) { + return mergeFrom( + (com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest other) { + if (other + == com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest + .getDefaultInstance()) return this; + if (!other.getNodeGroup().isEmpty()) { + nodeGroup_ = other.nodeGroup_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasNodeGroupsSimulateMaintenanceEventRequestResource()) { + mergeNodeGroupsSimulateMaintenanceEventRequestResource( + other.getNodeGroupsSimulateMaintenanceEventRequestResource()); + } + if (!other.getProject().isEmpty()) { + project_ = other.project_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasRequestId()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1820481738 + case -1483217182: + { + input.readMessage( + getNodeGroupsSimulateMaintenanceEventRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1483217182 + case -535302126: + { + nodeGroup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -535302126 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object nodeGroup_ = ""; + /** + * + * + *
+     * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+     * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The nodeGroup. + */ + public java.lang.String getNodeGroup() { + java.lang.Object ref = nodeGroup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeGroup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+     * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for nodeGroup. + */ + public com.google.protobuf.ByteString getNodeGroupBytes() { + java.lang.Object ref = nodeGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+     * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The nodeGroup to set. + * @return This builder for chaining. + */ + public Builder setNodeGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nodeGroup_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+     * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNodeGroup() { + nodeGroup_ = getDefaultInstance().getNodeGroup(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+     * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for nodeGroup to set. + * @return This builder for chaining. + */ + public Builder setNodeGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nodeGroup_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + nodeGroupsSimulateMaintenanceEventRequestResource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest, + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.Builder, + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestOrBuilder> + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_; + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroupsSimulateMaintenanceEventRequestResource field is set. + */ + public boolean hasNodeGroupsSimulateMaintenanceEventRequestResource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroupsSimulateMaintenanceEventRequestResource. + */ + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + getNodeGroupsSimulateMaintenanceEventRequestResource() { + if (nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ == null) { + return nodeGroupsSimulateMaintenanceEventRequestResource_ == null + ? com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + .getDefaultInstance() + : nodeGroupsSimulateMaintenanceEventRequestResource_; + } else { + return nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNodeGroupsSimulateMaintenanceEventRequestResource( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest value) { + if (nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeGroupsSimulateMaintenanceEventRequestResource_ = value; + } else { + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNodeGroupsSimulateMaintenanceEventRequestResource( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.Builder + builderForValue) { + if (nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ == null) { + nodeGroupsSimulateMaintenanceEventRequestResource_ = builderForValue.build(); + } else { + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_.setMessage( + builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNodeGroupsSimulateMaintenanceEventRequestResource( + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest value) { + if (nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && nodeGroupsSimulateMaintenanceEventRequestResource_ != null + && nodeGroupsSimulateMaintenanceEventRequestResource_ + != com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + .getDefaultInstance()) { + getNodeGroupsSimulateMaintenanceEventRequestResourceBuilder().mergeFrom(value); + } else { + nodeGroupsSimulateMaintenanceEventRequestResource_ = value; + } + } else { + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNodeGroupsSimulateMaintenanceEventRequestResource() { + bitField0_ = (bitField0_ & ~0x00000002); + nodeGroupsSimulateMaintenanceEventRequestResource_ = null; + if (nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ != null) { + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_.dispose(); + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.Builder + getNodeGroupsSimulateMaintenanceEventRequestResourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNodeGroupsSimulateMaintenanceEventRequestResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestOrBuilder + getNodeGroupsSimulateMaintenanceEventRequestResourceOrBuilder() { + if (nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ != null) { + return nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_.getMessageOrBuilder(); + } else { + return nodeGroupsSimulateMaintenanceEventRequestResource_ == null + ? com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + .getDefaultInstance() + : nodeGroupsSimulateMaintenanceEventRequestResource_; + } + } + /** + * + * + *
+     * The body resource for this request
+     * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest, + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.Builder, + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestOrBuilder> + getNodeGroupsSimulateMaintenanceEventRequestResourceFieldBuilder() { + if (nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ == null) { + nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest, + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest.Builder, + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestOrBuilder>( + getNodeGroupsSimulateMaintenanceEventRequestResource(), + getParentForChildren(), + isClean()); + nodeGroupsSimulateMaintenanceEventRequestResource_ = null; + } + return nodeGroupsSimulateMaintenanceEventRequestResourceBuilder_; + } + + private java.lang.Object project_ = ""; + /** + * + * + *
+     * Project ID for this request.
+     * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project ID for this request.
+     * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project ID for this request.
+     * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + project_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID for this request.
+     * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @return This builder for chaining. + */ + public Builder clearProject() { + project_ = getDefaultInstance().getProject(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Project ID for this request.
+     * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + project_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+     * 
+ * + * optional string request_id = 37109963; + * + * @return Whether the requestId field is set. + */ + public boolean hasRequestId() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+     * 
+ * + * optional string request_id = 37109963; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+     * 
+ * + * optional string request_id = 37109963; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+     * 
+ * + * optional string request_id = 37109963; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+     * 
+ * + * optional string request_id = 37109963; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+     * 
+ * + * optional string request_id = 37109963; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * The name of the zone for this request.
+     * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the zone for this request.
+     * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the zone for this request.
+     * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the zone for this request.
+     * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the zone for this request.
+     * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest) + private static final com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest(); + } + + public static com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SimulateMaintenanceEventNodeGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventNodeGroupRequestOrBuilder.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventNodeGroupRequestOrBuilder.java new file mode 100644 index 000000000000..273cfbfbda0c --- /dev/null +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventNodeGroupRequestOrBuilder.java @@ -0,0 +1,188 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/compute/v1/compute.proto + +package com.google.cloud.compute.v1; + +public interface SimulateMaintenanceEventNodeGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+   * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The nodeGroup. + */ + java.lang.String getNodeGroup(); + /** + * + * + *
+   * Name of the NodeGroup resource whose nodes will go under maintenance simulation.
+   * 
+ * + * string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for nodeGroup. + */ + com.google.protobuf.ByteString getNodeGroupBytes(); + + /** + * + * + *
+   * The body resource for this request
+   * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nodeGroupsSimulateMaintenanceEventRequestResource field is set. + */ + boolean hasNodeGroupsSimulateMaintenanceEventRequestResource(); + /** + * + * + *
+   * The body resource for this request
+   * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nodeGroupsSimulateMaintenanceEventRequestResource. + */ + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest + getNodeGroupsSimulateMaintenanceEventRequestResource(); + /** + * + * + *
+   * The body resource for this request
+   * 
+ * + * + * .google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequestOrBuilder + getNodeGroupsSimulateMaintenanceEventRequestResourceOrBuilder(); + + /** + * + * + *
+   * Project ID for this request.
+   * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @return The project. + */ + java.lang.String getProject(); + /** + * + * + *
+   * Project ID for this request.
+   * 
+ * + * + * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+   * 
+ * + * optional string request_id = 37109963; + * + * @return Whether the requestId field is set. + */ + boolean hasRequestId(); + /** + * + * + *
+   * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+   * 
+ * + * optional string request_id = 37109963; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
+   * 
+ * + * optional string request_id = 37109963; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * The name of the zone for this request.
+   * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * The name of the zone for this request.
+   * 
+ * + * + * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); +} diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/proto/google/cloud/compute/v1/compute.proto b/java-compute/proto-google-cloud-compute-v1/src/main/proto/google/cloud/compute/v1/compute.proto index 7f2d79b4d577..dc2e066fc37d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/proto/google/cloud/compute/v1/compute.proto +++ b/java-compute/proto-google-cloud-compute-v1/src/main/proto/google/cloud/compute/v1/compute.proto @@ -9421,6 +9421,8 @@ message GuestOsFeature { SEV_CAPABLE = 87083793; + SEV_LIVE_MIGRATABLE = 392039820; + SEV_SNP_CAPABLE = 426919; UEFI_COMPATIBLE = 195865408; @@ -9897,12 +9899,16 @@ message HealthStatusForNetworkEndpoint { // A value indicating that the enum field is not set. UNDEFINED_HEALTH_STATE = 0; + // Endpoint is being drained. DRAINING = 480455402; + // Endpoint is healthy. HEALTHY = 439801213; + // Endpoint is unhealthy. UNHEALTHY = 462118084; + // Health status of the endpoint is unknown. UNKNOWN = 433141802; } @@ -18682,6 +18688,13 @@ message NodeGroupsSetNodeTemplateRequest { } +// +message NodeGroupsSimulateMaintenanceEventRequest { + // Names of the nodes to go under maintenance simulation. + repeated string nodes = 104993457; + +} + // Represent a sole-tenant Node Template resource. You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. message NodeTemplate { // CPU overcommit. @@ -26603,6 +26616,31 @@ message SimulateMaintenanceEventInstanceRequest { } +// A request message for NodeGroups.SimulateMaintenanceEvent. See the method description for details. +message SimulateMaintenanceEventNodeGroupRequest { + // Name of the NodeGroup resource whose nodes will go under maintenance simulation. + string node_group = 469958146 [(google.api.field_behavior) = REQUIRED]; + + // The body resource for this request + NodeGroupsSimulateMaintenanceEventRequest node_groups_simulate_maintenance_event_request_resource = 351468764 [(google.api.field_behavior) = REQUIRED]; + + // Project ID for this request. + string project = 227560217 [ + (google.api.field_behavior) = REQUIRED, + (google.cloud.operation_request_field) = "project" + ]; + + // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + optional string request_id = 37109963; + + // The name of the zone for this request. + string zone = 3744684 [ + (google.api.field_behavior) = REQUIRED, + (google.cloud.operation_request_field) = "zone" + ]; + +} + // Represents a Persistent Disk Snapshot resource. You can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. message Snapshot { // [Output Only] The architecture of the snapshot. Valid values are ARM64 or X86_64. @@ -34205,6 +34243,16 @@ service NodeGroups { option (google.cloud.operation_service) = "ZoneOperations"; } + // Simulates maintenance event on specified nodes from the node group. + rpc SimulateMaintenanceEvent(SimulateMaintenanceEventNodeGroupRequest) returns (Operation) { + option (google.api.http) = { + body: "node_groups_simulate_maintenance_event_request_resource" + post: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/simulateMaintenanceEvent" + }; + option (google.api.method_signature) = "project,zone,node_group,node_groups_simulate_maintenance_event_request_resource"; + option (google.cloud.operation_service) = "ZoneOperations"; + } + // Returns permissions that a caller has on the specified resource. rpc TestIamPermissions(TestIamPermissionsNodeGroupRequest) returns (TestPermissionsResponse) { option (google.api.http) = { diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..6f9f9b437c86 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.AcceleratorTypesScopedList; +import com.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + AggregatedListAcceleratorTypesRequest request = + AggregatedListAcceleratorTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + acceleratorTypesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_AcceleratorTypes_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..af8eb0e3b82f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AcceleratorTypeAggregatedList; +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.AcceleratorTypesScopedList; +import com.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + AggregatedListAcceleratorTypesRequest request = + AggregatedListAcceleratorTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + AcceleratorTypeAggregatedList response = + acceleratorTypesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_AcceleratorTypes_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..85286b613909 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_AggregatedList_sync] +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.AcceleratorTypesScopedList; +import com.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + AggregatedListAcceleratorTypesRequest request = + AggregatedListAcceleratorTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + acceleratorTypesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_AcceleratorTypes_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..f7354c926676 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_AggregatedList_String_sync] +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.AcceleratorTypesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + acceleratorTypesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_AcceleratorTypes_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..2543333f622f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.AcceleratorTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AcceleratorTypesSettings acceleratorTypesSettings = + AcceleratorTypesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AcceleratorTypesClient acceleratorTypesClient = + AcceleratorTypesClient.create(acceleratorTypesSettings); + } +} +// [END compute_v1_generated_AcceleratorTypes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..04f7bc666d17 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.AcceleratorTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AcceleratorTypesSettings acceleratorTypesSettings = + AcceleratorTypesSettings.newBuilder().setEndpoint(myEndpoint).build(); + AcceleratorTypesClient acceleratorTypesClient = + AcceleratorTypesClient.create(acceleratorTypesSettings); + } +} +// [END compute_v1_generated_AcceleratorTypes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/AsyncGet.java new file mode 100644 index 000000000000..2a73f0d8f889 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AcceleratorType; +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.GetAcceleratorTypeRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + GetAcceleratorTypeRequest request = + GetAcceleratorTypeRequest.newBuilder() + .setAcceleratorType("acceleratorType-82462651") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = acceleratorTypesClient.getCallable().futureCall(request); + // Do something. + AcceleratorType response = future.get(); + } + } +} +// [END compute_v1_generated_AcceleratorTypes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/SyncGet.java new file mode 100644 index 000000000000..04856b5386ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_Get_sync] +import com.google.cloud.compute.v1.AcceleratorType; +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.GetAcceleratorTypeRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + GetAcceleratorTypeRequest request = + GetAcceleratorTypeRequest.newBuilder() + .setAcceleratorType("acceleratorType-82462651") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + AcceleratorType response = acceleratorTypesClient.get(request); + } + } +} +// [END compute_v1_generated_AcceleratorTypes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..0e17a982d493 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_Get_StringStringString_sync] +import com.google.cloud.compute.v1.AcceleratorType; +import com.google.cloud.compute.v1.AcceleratorTypesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String acceleratorType = "acceleratorType-82462651"; + AcceleratorType response = acceleratorTypesClient.get(project, zone, acceleratorType); + } + } +} +// [END compute_v1_generated_AcceleratorTypes_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/AsyncList.java new file mode 100644 index 000000000000..b5e835477e37 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AcceleratorType; +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.ListAcceleratorTypesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + ListAcceleratorTypesRequest request = + ListAcceleratorTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + acceleratorTypesClient.listPagedCallable().futureCall(request); + // Do something. + for (AcceleratorType element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_AcceleratorTypes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/AsyncListPaged.java new file mode 100644 index 000000000000..03873b6d5a5d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_List_Paged_async] +import com.google.cloud.compute.v1.AcceleratorType; +import com.google.cloud.compute.v1.AcceleratorTypeList; +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.ListAcceleratorTypesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + ListAcceleratorTypesRequest request = + ListAcceleratorTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + AcceleratorTypeList response = acceleratorTypesClient.listCallable().call(request); + for (AcceleratorType element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_AcceleratorTypes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/SyncList.java new file mode 100644 index 000000000000..aec05bd83cd9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_List_sync] +import com.google.cloud.compute.v1.AcceleratorType; +import com.google.cloud.compute.v1.AcceleratorTypesClient; +import com.google.cloud.compute.v1.ListAcceleratorTypesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + ListAcceleratorTypesRequest request = + ListAcceleratorTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (AcceleratorType element : acceleratorTypesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_AcceleratorTypes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/SyncListStringString.java new file mode 100644 index 000000000000..068a8fde614a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypes/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypes_List_StringString_sync] +import com.google.cloud.compute.v1.AcceleratorType; +import com.google.cloud.compute.v1.AcceleratorTypesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (AcceleratorType element : acceleratorTypesClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_AcceleratorTypes_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypessettings/get/SyncGet.java new file mode 100644 index 000000000000..c6e2ff0e4835 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/acceleratortypessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_AcceleratorTypesSettings_Get_sync] +import com.google.cloud.compute.v1.AcceleratorTypesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AcceleratorTypesSettings.Builder acceleratorTypesSettingsBuilder = + AcceleratorTypesSettings.newBuilder(); + acceleratorTypesSettingsBuilder + .getSettings() + .setRetrySettings( + acceleratorTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AcceleratorTypesSettings acceleratorTypesSettings = acceleratorTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_AcceleratorTypesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..42a7291d2634 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.AddressesScopedList; +import com.google.cloud.compute.v1.AggregatedListAddressesRequest; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + AggregatedListAddressesRequest request = + AggregatedListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + addressesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Addresses_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..741f724138ab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AddressAggregatedList; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.AddressesScopedList; +import com.google.cloud.compute.v1.AggregatedListAddressesRequest; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + AggregatedListAddressesRequest request = + AggregatedListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + AddressAggregatedList response = addressesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Addresses_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..9e2708d2ccaf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_AggregatedList_sync] +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.AddressesScopedList; +import com.google.cloud.compute.v1.AggregatedListAddressesRequest; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + AggregatedListAddressesRequest request = + AggregatedListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + addressesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Addresses_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..f4a3a5d11c22 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_AggregatedList_String_sync] +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.AddressesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + addressesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Addresses_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..9241b67dd815 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.AddressesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AddressesSettings addressesSettings = + AddressesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AddressesClient addressesClient = AddressesClient.create(addressesSettings); + } +} +// [END compute_v1_generated_Addresses_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7899512b8519 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.AddressesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AddressesSettings addressesSettings = + AddressesSettings.newBuilder().setEndpoint(myEndpoint).build(); + AddressesClient addressesClient = AddressesClient.create(addressesSettings); + } +} +// [END compute_v1_generated_Addresses_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/AsyncDelete.java new file mode 100644 index 000000000000..0fc22b9ccc58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.DeleteAddressRequest; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + DeleteAddressRequest request = + DeleteAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = addressesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Addresses_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..e0798a2b33f0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.DeleteAddressRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + DeleteAddressRequest request = + DeleteAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + addressesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Addresses_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/SyncDelete.java new file mode 100644 index 000000000000..e1e2e94eb519 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Delete_sync] +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.DeleteAddressRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + DeleteAddressRequest request = + DeleteAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = addressesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Addresses_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..0d4d341ff948 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String address = "address-1147692044"; + Operation response = addressesClient.deleteAsync(project, region, address).get(); + } + } +} +// [END compute_v1_generated_Addresses_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/AsyncGet.java new file mode 100644 index 000000000000..150d635b47f9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.GetAddressRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + GetAddressRequest request = + GetAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture
future = addressesClient.getCallable().futureCall(request); + // Do something. + Address response = future.get(); + } + } +} +// [END compute_v1_generated_Addresses_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/SyncGet.java new file mode 100644 index 000000000000..ff3306968e84 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Get_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.GetAddressRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + GetAddressRequest request = + GetAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Address response = addressesClient.get(request); + } + } +} +// [END compute_v1_generated_Addresses_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..121afb9614c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String address = "address-1147692044"; + Address response = addressesClient.get(project, region, address); + } + } +} +// [END compute_v1_generated_Addresses_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/AsyncInsert.java new file mode 100644 index 000000000000..b518911fe6ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.InsertAddressRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + InsertAddressRequest request = + InsertAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = addressesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Addresses_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..da378c2fe46b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.InsertAddressRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + InsertAddressRequest request = + InsertAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + addressesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Addresses_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/SyncInsert.java new file mode 100644 index 000000000000..bc17ef2327d1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Insert_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.InsertAddressRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + InsertAddressRequest request = + InsertAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = addressesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Addresses_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/SyncInsertStringStringAddress.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/SyncInsertStringStringAddress.java new file mode 100644 index 000000000000..80028f4b417e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/insert/SyncInsertStringStringAddress.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_Insert_StringStringAddress_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringAddress { + + public static void main(String[] args) throws Exception { + syncInsertStringStringAddress(); + } + + public static void syncInsertStringStringAddress() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Address addressResource = Address.newBuilder().build(); + Operation response = addressesClient.insertAsync(project, region, addressResource).get(); + } + } +} +// [END compute_v1_generated_Addresses_Insert_StringStringAddress_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/AsyncList.java new file mode 100644 index 000000000000..42c7671d461f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.ListAddressesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + ListAddressesRequest request = + ListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture
future = addressesClient.listPagedCallable().futureCall(request); + // Do something. + for (Address element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Addresses_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/AsyncListPaged.java new file mode 100644 index 000000000000..7bcc2d7b62bb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_List_Paged_async] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressList; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.ListAddressesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + ListAddressesRequest request = + ListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + AddressList response = addressesClient.listCallable().call(request); + for (Address element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Addresses_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/SyncList.java new file mode 100644 index 000000000000..27e67b62d4ed --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_List_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.ListAddressesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + ListAddressesRequest request = + ListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (Address element : addressesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Addresses_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/SyncListStringString.java new file mode 100644 index 000000000000..015d7cf8c672 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_List_StringString_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (Address element : addressesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Addresses_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..3c7c9d9e2881 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsAddressRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + SetLabelsAddressRequest request = + SetLabelsAddressRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + ApiFuture future = addressesClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Addresses_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..e3c8ec6b43ed --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsAddressRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + SetLabelsAddressRequest request = + SetLabelsAddressRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + OperationFuture future = + addressesClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Addresses_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..06d53bbaa7f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_SetLabels_sync] +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsAddressRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + SetLabelsAddressRequest request = + SetLabelsAddressRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + Operation response = addressesClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_Addresses_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java new file mode 100644 index 000000000000..dfcdc14d76ed --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Addresses_SetLabels_StringStringStringRegionsetlabelsrequest_sync] +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; + +public class SyncSetLabelsStringStringStringRegionsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringRegionsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringRegionsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetLabelsRequest regionSetLabelsRequestResource = + RegionSetLabelsRequest.newBuilder().build(); + Operation response = + addressesClient + .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Addresses_SetLabels_StringStringStringRegionsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addressessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addressessettings/get/SyncGet.java new file mode 100644 index 000000000000..f7ef757afe19 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addressessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_AddressesSettings_Get_sync] +import com.google.cloud.compute.v1.AddressesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AddressesSettings.Builder addressesSettingsBuilder = AddressesSettings.newBuilder(); + addressesSettingsBuilder + .getSettings() + .setRetrySettings( + addressesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AddressesSettings addressesSettings = addressesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_AddressesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..6e192762d498 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListAutoscalersRequest; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.AutoscalersScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + AggregatedListAutoscalersRequest request = + AggregatedListAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + autoscalersClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Autoscalers_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..f1fe721603dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListAutoscalersRequest; +import com.google.cloud.compute.v1.AutoscalerAggregatedList; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.AutoscalersScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + AggregatedListAutoscalersRequest request = + AggregatedListAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + AutoscalerAggregatedList response = + autoscalersClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Autoscalers_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..0213940d14cc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListAutoscalersRequest; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.AutoscalersScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + AggregatedListAutoscalersRequest request = + AggregatedListAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + autoscalersClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Autoscalers_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..8c900ed26b77 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_AggregatedList_String_sync] +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.AutoscalersScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + autoscalersClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Autoscalers_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..3dc3f6e47115 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.AutoscalersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AutoscalersSettings autoscalersSettings = + AutoscalersSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AutoscalersClient autoscalersClient = AutoscalersClient.create(autoscalersSettings); + } +} +// [END compute_v1_generated_Autoscalers_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7d27a0c37561 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.AutoscalersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AutoscalersSettings autoscalersSettings = + AutoscalersSettings.newBuilder().setEndpoint(myEndpoint).build(); + AutoscalersClient autoscalersClient = AutoscalersClient.create(autoscalersSettings); + } +} +// [END compute_v1_generated_Autoscalers_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/AsyncDelete.java new file mode 100644 index 000000000000..c30538342711 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.DeleteAutoscalerRequest; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + DeleteAutoscalerRequest request = + DeleteAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = autoscalersClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..1b416d823fac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.DeleteAutoscalerRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + DeleteAutoscalerRequest request = + DeleteAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + autoscalersClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/SyncDelete.java new file mode 100644 index 000000000000..afe8dc17433a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Delete_sync] +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.DeleteAutoscalerRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + DeleteAutoscalerRequest request = + DeleteAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = autoscalersClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..e64c317255bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String autoscaler = "autoscaler517258967"; + Operation response = autoscalersClient.deleteAsync(project, zone, autoscaler).get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/AsyncGet.java new file mode 100644 index 000000000000..7507f5cf9688 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.GetAutoscalerRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + GetAutoscalerRequest request = + GetAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = autoscalersClient.getCallable().futureCall(request); + // Do something. + Autoscaler response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/SyncGet.java new file mode 100644 index 000000000000..955263404b84 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Get_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.GetAutoscalerRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + GetAutoscalerRequest request = + GetAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Autoscaler response = autoscalersClient.get(request); + } + } +} +// [END compute_v1_generated_Autoscalers_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..4d21952c5dde --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String autoscaler = "autoscaler517258967"; + Autoscaler response = autoscalersClient.get(project, zone, autoscaler); + } + } +} +// [END compute_v1_generated_Autoscalers_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/AsyncInsert.java new file mode 100644 index 000000000000..95c1fac9a8dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.InsertAutoscalerRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + InsertAutoscalerRequest request = + InsertAutoscalerRequest.newBuilder() + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = autoscalersClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..dfc81b63cade --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.InsertAutoscalerRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + InsertAutoscalerRequest request = + InsertAutoscalerRequest.newBuilder() + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + autoscalersClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/SyncInsert.java new file mode 100644 index 000000000000..d52597b06c38 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Insert_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.InsertAutoscalerRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + InsertAutoscalerRequest request = + InsertAutoscalerRequest.newBuilder() + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = autoscalersClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/SyncInsertStringStringAutoscaler.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/SyncInsertStringStringAutoscaler.java new file mode 100644 index 000000000000..64d9344c01e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/insert/SyncInsertStringStringAutoscaler.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Insert_StringStringAutoscaler_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringAutoscaler { + + public static void main(String[] args) throws Exception { + syncInsertStringStringAutoscaler(); + } + + public static void syncInsertStringStringAutoscaler() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + Autoscaler autoscalerResource = Autoscaler.newBuilder().build(); + Operation response = autoscalersClient.insertAsync(project, zone, autoscalerResource).get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Insert_StringStringAutoscaler_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/AsyncList.java new file mode 100644 index 000000000000..1872f89d93aa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.ListAutoscalersRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + ListAutoscalersRequest request = + ListAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = autoscalersClient.listPagedCallable().futureCall(request); + // Do something. + for (Autoscaler element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Autoscalers_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/AsyncListPaged.java new file mode 100644 index 000000000000..68f0b9fc6e9e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_List_Paged_async] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalerList; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.ListAutoscalersRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + ListAutoscalersRequest request = + ListAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + AutoscalerList response = autoscalersClient.listCallable().call(request); + for (Autoscaler element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Autoscalers_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/SyncList.java new file mode 100644 index 000000000000..fc93bd6bad65 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_List_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.ListAutoscalersRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + ListAutoscalersRequest request = + ListAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (Autoscaler element : autoscalersClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Autoscalers_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/SyncListStringString.java new file mode 100644 index 000000000000..1bd761b6186b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_List_StringString_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (Autoscaler element : autoscalersClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Autoscalers_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/AsyncPatch.java new file mode 100644 index 000000000000..681e93d47662 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.PatchAutoscalerRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + PatchAutoscalerRequest request = + PatchAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = autoscalersClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..f52367a5eb49 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchAutoscalerRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + PatchAutoscalerRequest request = + PatchAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + autoscalersClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/SyncPatch.java new file mode 100644 index 000000000000..b09f84dd7163 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Patch_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchAutoscalerRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + PatchAutoscalerRequest request = + PatchAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = autoscalersClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/SyncPatchStringStringAutoscaler.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/SyncPatchStringStringAutoscaler.java new file mode 100644 index 000000000000..4e4b8da7d335 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/patch/SyncPatchStringStringAutoscaler.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Patch_StringStringAutoscaler_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringAutoscaler { + + public static void main(String[] args) throws Exception { + syncPatchStringStringAutoscaler(); + } + + public static void syncPatchStringStringAutoscaler() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + Autoscaler autoscalerResource = Autoscaler.newBuilder().build(); + Operation response = autoscalersClient.patchAsync(project, zone, autoscalerResource).get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Patch_StringStringAutoscaler_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/AsyncUpdate.java new file mode 100644 index 000000000000..e77564b8981c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/AsyncUpdate.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.UpdateAutoscalerRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + UpdateAutoscalerRequest request = + UpdateAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = autoscalersClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..8d5088c1b0d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/AsyncUpdateLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateAutoscalerRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + UpdateAutoscalerRequest request = + UpdateAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + autoscalersClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/SyncUpdate.java new file mode 100644 index 000000000000..a4141d282945 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Update_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateAutoscalerRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + UpdateAutoscalerRequest request = + UpdateAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = autoscalersClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/SyncUpdateStringStringAutoscaler.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/SyncUpdateStringStringAutoscaler.java new file mode 100644 index 000000000000..c364f7376c47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalers/update/SyncUpdateStringStringAutoscaler.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.compute.v1.samples; + +// [START compute_v1_generated_Autoscalers_Update_StringStringAutoscaler_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.AutoscalersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateStringStringAutoscaler { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringAutoscaler(); + } + + public static void syncUpdateStringStringAutoscaler() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AutoscalersClient autoscalersClient = AutoscalersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + Autoscaler autoscalerResource = Autoscaler.newBuilder().build(); + Operation response = autoscalersClient.updateAsync(project, zone, autoscalerResource).get(); + } + } +} +// [END compute_v1_generated_Autoscalers_Update_StringStringAutoscaler_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalerssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalerssettings/get/SyncGet.java new file mode 100644 index 000000000000..2cc6965e32e0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/autoscalerssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_AutoscalersSettings_Get_sync] +import com.google.cloud.compute.v1.AutoscalersSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AutoscalersSettings.Builder autoscalersSettingsBuilder = AutoscalersSettings.newBuilder(); + autoscalersSettingsBuilder + .getSettings() + .setRetrySettings( + autoscalersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AutoscalersSettings autoscalersSettings = autoscalersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_AutoscalersSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/AsyncAddSignedUrlKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/AsyncAddSignedUrlKey.java new file mode 100644 index 000000000000..781f8122d130 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/AsyncAddSignedUrlKey.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_AddSignedUrlKey_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.SignedUrlKey; +import com.google.longrunning.Operation; + +public class AsyncAddSignedUrlKey { + + public static void main(String[] args) throws Exception { + asyncAddSignedUrlKey(); + } + + public static void asyncAddSignedUrlKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + AddSignedUrlKeyBackendBucketRequest request = + AddSignedUrlKeyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSignedUrlKeyResource(SignedUrlKey.newBuilder().build()) + .build(); + ApiFuture future = + backendBucketsClient.addSignedUrlKeyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_AddSignedUrlKey_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/AsyncAddSignedUrlKeyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/AsyncAddSignedUrlKeyLRO.java new file mode 100644 index 000000000000..193677b5214e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/AsyncAddSignedUrlKeyLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_AddSignedUrlKey_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SignedUrlKey; + +public class AsyncAddSignedUrlKeyLRO { + + public static void main(String[] args) throws Exception { + asyncAddSignedUrlKeyLRO(); + } + + public static void asyncAddSignedUrlKeyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + AddSignedUrlKeyBackendBucketRequest request = + AddSignedUrlKeyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSignedUrlKeyResource(SignedUrlKey.newBuilder().build()) + .build(); + OperationFuture future = + backendBucketsClient.addSignedUrlKeyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_AddSignedUrlKey_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/SyncAddSignedUrlKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/SyncAddSignedUrlKey.java new file mode 100644 index 000000000000..0a4be75e1037 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/SyncAddSignedUrlKey.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_AddSignedUrlKey_sync] +import com.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SignedUrlKey; + +public class SyncAddSignedUrlKey { + + public static void main(String[] args) throws Exception { + syncAddSignedUrlKey(); + } + + public static void syncAddSignedUrlKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + AddSignedUrlKeyBackendBucketRequest request = + AddSignedUrlKeyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSignedUrlKeyResource(SignedUrlKey.newBuilder().build()) + .build(); + Operation response = backendBucketsClient.addSignedUrlKeyAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_AddSignedUrlKey_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/SyncAddSignedUrlKeyStringStringSignedurlkey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/SyncAddSignedUrlKeyStringStringSignedurlkey.java new file mode 100644 index 000000000000..3d6e2c7a2d47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/addsignedurlkey/SyncAddSignedUrlKeyStringStringSignedurlkey.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_AddSignedUrlKey_StringStringSignedurlkey_sync] +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SignedUrlKey; + +public class SyncAddSignedUrlKeyStringStringSignedurlkey { + + public static void main(String[] args) throws Exception { + syncAddSignedUrlKeyStringStringSignedurlkey(); + } + + public static void syncAddSignedUrlKeyStringStringSignedurlkey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + String backendBucket = "backendBucket713751966"; + SignedUrlKey signedUrlKeyResource = SignedUrlKey.newBuilder().build(); + Operation response = + backendBucketsClient + .addSignedUrlKeyAsync(project, backendBucket, signedUrlKeyResource) + .get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_AddSignedUrlKey_StringStringSignedurlkey_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..8eea0fb2fa05 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.BackendBucketsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BackendBucketsSettings backendBucketsSettings = + BackendBucketsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + BackendBucketsClient backendBucketsClient = BackendBucketsClient.create(backendBucketsSettings); + } +} +// [END compute_v1_generated_BackendBuckets_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a8edb46b27c5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.BackendBucketsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BackendBucketsSettings backendBucketsSettings = + BackendBucketsSettings.newBuilder().setEndpoint(myEndpoint).build(); + BackendBucketsClient backendBucketsClient = BackendBucketsClient.create(backendBucketsSettings); + } +} +// [END compute_v1_generated_BackendBuckets_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/AsyncDelete.java new file mode 100644 index 000000000000..b388122780e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.DeleteBackendBucketRequest; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + DeleteBackendBucketRequest request = + DeleteBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backendBucketsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..ce9fc59bfb89 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.DeleteBackendBucketRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + DeleteBackendBucketRequest request = + DeleteBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendBucketsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/SyncDelete.java new file mode 100644 index 000000000000..d69007fa8a4a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Delete_sync] +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.DeleteBackendBucketRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + DeleteBackendBucketRequest request = + DeleteBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendBucketsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..1ccb7ab10442 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Delete_StringString_sync] +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + String backendBucket = "backendBucket713751966"; + Operation response = backendBucketsClient.deleteAsync(project, backendBucket).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/AsyncDeleteSignedUrlKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/AsyncDeleteSignedUrlKey.java new file mode 100644 index 000000000000..dc4c7e049241 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/AsyncDeleteSignedUrlKey.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_DeleteSignedUrlKey_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteSignedUrlKey { + + public static void main(String[] args) throws Exception { + asyncDeleteSignedUrlKey(); + } + + public static void asyncDeleteSignedUrlKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + DeleteSignedUrlKeyBackendBucketRequest request = + DeleteSignedUrlKeyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setKeyName("keyName-815643254") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + backendBucketsClient.deleteSignedUrlKeyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_DeleteSignedUrlKey_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/AsyncDeleteSignedUrlKeyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/AsyncDeleteSignedUrlKeyLRO.java new file mode 100644 index 000000000000..18cf7209bf28 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/AsyncDeleteSignedUrlKeyLRO.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_DeleteSignedUrlKey_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteSignedUrlKeyLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSignedUrlKeyLRO(); + } + + public static void asyncDeleteSignedUrlKeyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + DeleteSignedUrlKeyBackendBucketRequest request = + DeleteSignedUrlKeyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setKeyName("keyName-815643254") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendBucketsClient.deleteSignedUrlKeyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_DeleteSignedUrlKey_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/SyncDeleteSignedUrlKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/SyncDeleteSignedUrlKey.java new file mode 100644 index 000000000000..9b75b7d6a4f5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/SyncDeleteSignedUrlKey.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_DeleteSignedUrlKey_sync] +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteSignedUrlKey { + + public static void main(String[] args) throws Exception { + syncDeleteSignedUrlKey(); + } + + public static void syncDeleteSignedUrlKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + DeleteSignedUrlKeyBackendBucketRequest request = + DeleteSignedUrlKeyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setKeyName("keyName-815643254") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendBucketsClient.deleteSignedUrlKeyAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_DeleteSignedUrlKey_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/SyncDeleteSignedUrlKeyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/SyncDeleteSignedUrlKeyStringStringString.java new file mode 100644 index 000000000000..0d492201f4bb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/deletesignedurlkey/SyncDeleteSignedUrlKeyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_DeleteSignedUrlKey_StringStringString_sync] +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteSignedUrlKeyStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteSignedUrlKeyStringStringString(); + } + + public static void syncDeleteSignedUrlKeyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + String backendBucket = "backendBucket713751966"; + String keyName = "keyName-815643254"; + Operation response = + backendBucketsClient.deleteSignedUrlKeyAsync(project, backendBucket, keyName).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_DeleteSignedUrlKey_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/AsyncGet.java new file mode 100644 index 000000000000..9a0b60738ad9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.GetBackendBucketRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + GetBackendBucketRequest request = + GetBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .build(); + ApiFuture future = backendBucketsClient.getCallable().futureCall(request); + // Do something. + BackendBucket response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/SyncGet.java new file mode 100644 index 000000000000..034a70e4e13c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Get_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.GetBackendBucketRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + GetBackendBucketRequest request = + GetBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .build(); + BackendBucket response = backendBucketsClient.get(request); + } + } +} +// [END compute_v1_generated_BackendBuckets_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/SyncGetStringString.java new file mode 100644 index 000000000000..7a90c483697c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Get_StringString_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + String backendBucket = "backendBucket713751966"; + BackendBucket response = backendBucketsClient.get(project, backendBucket); + } + } +} +// [END compute_v1_generated_BackendBuckets_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/AsyncInsert.java new file mode 100644 index 000000000000..6bf859c8486a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.InsertBackendBucketRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + InsertBackendBucketRequest request = + InsertBackendBucketRequest.newBuilder() + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backendBucketsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..31b636a90a9c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.InsertBackendBucketRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + InsertBackendBucketRequest request = + InsertBackendBucketRequest.newBuilder() + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendBucketsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/SyncInsert.java new file mode 100644 index 000000000000..381ff86c6e86 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Insert_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.InsertBackendBucketRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + InsertBackendBucketRequest request = + InsertBackendBucketRequest.newBuilder() + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendBucketsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/SyncInsertStringBackendbucket.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/SyncInsertStringBackendbucket.java new file mode 100644 index 000000000000..a0d173c27aa4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/insert/SyncInsertStringBackendbucket.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Insert_StringBackendbucket_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringBackendbucket { + + public static void main(String[] args) throws Exception { + syncInsertStringBackendbucket(); + } + + public static void syncInsertStringBackendbucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + BackendBucket backendBucketResource = BackendBucket.newBuilder().build(); + Operation response = backendBucketsClient.insertAsync(project, backendBucketResource).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Insert_StringBackendbucket_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/AsyncList.java new file mode 100644 index 000000000000..d9bc856c79c1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.ListBackendBucketsRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + ListBackendBucketsRequest request = + ListBackendBucketsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + backendBucketsClient.listPagedCallable().futureCall(request); + // Do something. + for (BackendBucket element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendBuckets_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/AsyncListPaged.java new file mode 100644 index 000000000000..1d393f68fab2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_List_Paged_async] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketList; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.ListBackendBucketsRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + ListBackendBucketsRequest request = + ListBackendBucketsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + BackendBucketList response = backendBucketsClient.listCallable().call(request); + for (BackendBucket element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_BackendBuckets_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/SyncList.java new file mode 100644 index 000000000000..91a1010f6df2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_List_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.ListBackendBucketsRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + ListBackendBucketsRequest request = + ListBackendBucketsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (BackendBucket element : backendBucketsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendBuckets_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/SyncListString.java new file mode 100644 index 000000000000..c4a79fcb4210 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_List_String_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + for (BackendBucket element : backendBucketsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendBuckets_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/AsyncPatch.java new file mode 100644 index 000000000000..c19c1f0f342c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.PatchBackendBucketRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + PatchBackendBucketRequest request = + PatchBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backendBucketsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..b6b4afc2bc6c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchBackendBucketRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + PatchBackendBucketRequest request = + PatchBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendBucketsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/SyncPatch.java new file mode 100644 index 000000000000..1056859c7caf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Patch_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchBackendBucketRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + PatchBackendBucketRequest request = + PatchBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendBucketsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/SyncPatchStringStringBackendbucket.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/SyncPatchStringStringBackendbucket.java new file mode 100644 index 000000000000..148753f0a831 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/patch/SyncPatchStringStringBackendbucket.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Patch_StringStringBackendbucket_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringBackendbucket { + + public static void main(String[] args) throws Exception { + syncPatchStringStringBackendbucket(); + } + + public static void syncPatchStringStringBackendbucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + String backendBucket = "backendBucket713751966"; + BackendBucket backendBucketResource = BackendBucket.newBuilder().build(); + Operation response = + backendBucketsClient.patchAsync(project, backendBucket, backendBucketResource).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Patch_StringStringBackendbucket_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicy.java new file mode 100644 index 000000000000..891c0bd700dc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_SetEdgeSecurityPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest; +import com.google.longrunning.Operation; + +public class AsyncSetEdgeSecurityPolicy { + + public static void main(String[] args) throws Exception { + asyncSetEdgeSecurityPolicy(); + } + + public static void asyncSetEdgeSecurityPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + SetEdgeSecurityPolicyBackendBucketRequest request = + SetEdgeSecurityPolicyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + ApiFuture future = + backendBucketsClient.setEdgeSecurityPolicyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_SetEdgeSecurityPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicyLRO.java new file mode 100644 index 000000000000..0728850adca3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicyLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_SetEdgeSecurityPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest; + +public class AsyncSetEdgeSecurityPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncSetEdgeSecurityPolicyLRO(); + } + + public static void asyncSetEdgeSecurityPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + SetEdgeSecurityPolicyBackendBucketRequest request = + SetEdgeSecurityPolicyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + OperationFuture future = + backendBucketsClient.setEdgeSecurityPolicyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_SetEdgeSecurityPolicy_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/SyncSetEdgeSecurityPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/SyncSetEdgeSecurityPolicy.java new file mode 100644 index 000000000000..7be792b5b6be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/SyncSetEdgeSecurityPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_SetEdgeSecurityPolicy_sync] +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest; + +public class SyncSetEdgeSecurityPolicy { + + public static void main(String[] args) throws Exception { + syncSetEdgeSecurityPolicy(); + } + + public static void syncSetEdgeSecurityPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + SetEdgeSecurityPolicyBackendBucketRequest request = + SetEdgeSecurityPolicyBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + Operation response = backendBucketsClient.setEdgeSecurityPolicyAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_SetEdgeSecurityPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference.java new file mode 100644 index 000000000000..9de41b6e054d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/setedgesecuritypolicy/SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_SetEdgeSecurityPolicy_StringStringSecuritypolicyreference_sync] +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; + +public class SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference { + + public static void main(String[] args) throws Exception { + syncSetEdgeSecurityPolicyStringStringSecuritypolicyreference(); + } + + public static void syncSetEdgeSecurityPolicyStringStringSecuritypolicyreference() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + String backendBucket = "backendBucket713751966"; + SecurityPolicyReference securityPolicyReferenceResource = + SecurityPolicyReference.newBuilder().build(); + Operation response = + backendBucketsClient + .setEdgeSecurityPolicyAsync(project, backendBucket, securityPolicyReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_SetEdgeSecurityPolicy_StringStringSecuritypolicyreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/AsyncUpdate.java new file mode 100644 index 000000000000..0c8d06f1aaf6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/AsyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.UpdateBackendBucketRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + UpdateBackendBucketRequest request = + UpdateBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backendBucketsClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..380aba4df3d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/AsyncUpdateLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateBackendBucketRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + UpdateBackendBucketRequest request = + UpdateBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendBucketsClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/SyncUpdate.java new file mode 100644 index 000000000000..7d63a721dd9f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Update_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateBackendBucketRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + UpdateBackendBucketRequest request = + UpdateBackendBucketRequest.newBuilder() + .setBackendBucket("backendBucket713751966") + .setBackendBucketResource(BackendBucket.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendBucketsClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/SyncUpdateStringStringBackendbucket.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/SyncUpdateStringStringBackendbucket.java new file mode 100644 index 000000000000..5d80bb91f366 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbuckets/update/SyncUpdateStringStringBackendbucket.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBuckets_Update_StringStringBackendbucket_sync] +import com.google.cloud.compute.v1.BackendBucket; +import com.google.cloud.compute.v1.BackendBucketsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateStringStringBackendbucket { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringBackendbucket(); + } + + public static void syncUpdateStringStringBackendbucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) { + String project = "project-309310695"; + String backendBucket = "backendBucket713751966"; + BackendBucket backendBucketResource = BackendBucket.newBuilder().build(); + Operation response = + backendBucketsClient.updateAsync(project, backendBucket, backendBucketResource).get(); + } + } +} +// [END compute_v1_generated_BackendBuckets_Update_StringStringBackendbucket_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbucketssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbucketssettings/get/SyncGet.java new file mode 100644 index 000000000000..15a8ef6e9e67 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendbucketssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_BackendBucketsSettings_Get_sync] +import com.google.cloud.compute.v1.BackendBucketsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BackendBucketsSettings.Builder backendBucketsSettingsBuilder = + BackendBucketsSettings.newBuilder(); + backendBucketsSettingsBuilder + .getSettings() + .setRetrySettings( + backendBucketsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BackendBucketsSettings backendBucketsSettings = backendBucketsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_BackendBucketsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/AsyncAddSignedUrlKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/AsyncAddSignedUrlKey.java new file mode 100644 index 000000000000..d674567aa313 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/AsyncAddSignedUrlKey.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_AddSignedUrlKey_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.SignedUrlKey; +import com.google.longrunning.Operation; + +public class AsyncAddSignedUrlKey { + + public static void main(String[] args) throws Exception { + asyncAddSignedUrlKey(); + } + + public static void asyncAddSignedUrlKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + AddSignedUrlKeyBackendServiceRequest request = + AddSignedUrlKeyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSignedUrlKeyResource(SignedUrlKey.newBuilder().build()) + .build(); + ApiFuture future = + backendServicesClient.addSignedUrlKeyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_AddSignedUrlKey_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/AsyncAddSignedUrlKeyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/AsyncAddSignedUrlKeyLRO.java new file mode 100644 index 000000000000..904ed1b87e16 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/AsyncAddSignedUrlKeyLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_AddSignedUrlKey_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SignedUrlKey; + +public class AsyncAddSignedUrlKeyLRO { + + public static void main(String[] args) throws Exception { + asyncAddSignedUrlKeyLRO(); + } + + public static void asyncAddSignedUrlKeyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + AddSignedUrlKeyBackendServiceRequest request = + AddSignedUrlKeyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSignedUrlKeyResource(SignedUrlKey.newBuilder().build()) + .build(); + OperationFuture future = + backendServicesClient.addSignedUrlKeyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_AddSignedUrlKey_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/SyncAddSignedUrlKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/SyncAddSignedUrlKey.java new file mode 100644 index 000000000000..3da8a7647a3b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/SyncAddSignedUrlKey.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_AddSignedUrlKey_sync] +import com.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SignedUrlKey; + +public class SyncAddSignedUrlKey { + + public static void main(String[] args) throws Exception { + syncAddSignedUrlKey(); + } + + public static void syncAddSignedUrlKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + AddSignedUrlKeyBackendServiceRequest request = + AddSignedUrlKeyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSignedUrlKeyResource(SignedUrlKey.newBuilder().build()) + .build(); + Operation response = backendServicesClient.addSignedUrlKeyAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendServices_AddSignedUrlKey_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/SyncAddSignedUrlKeyStringStringSignedurlkey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/SyncAddSignedUrlKeyStringStringSignedurlkey.java new file mode 100644 index 000000000000..57dc696a2545 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/addsignedurlkey/SyncAddSignedUrlKeyStringStringSignedurlkey.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_AddSignedUrlKey_StringStringSignedurlkey_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SignedUrlKey; + +public class SyncAddSignedUrlKeyStringStringSignedurlkey { + + public static void main(String[] args) throws Exception { + syncAddSignedUrlKeyStringStringSignedurlkey(); + } + + public static void syncAddSignedUrlKeyStringStringSignedurlkey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + SignedUrlKey signedUrlKeyResource = SignedUrlKey.newBuilder().build(); + Operation response = + backendServicesClient + .addSignedUrlKeyAsync(project, backendService, signedUrlKeyResource) + .get(); + } + } +} +// [END compute_v1_generated_BackendServices_AddSignedUrlKey_StringStringSignedurlkey_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..5a9033302ab0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListBackendServicesRequest; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.BackendServicesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + AggregatedListBackendServicesRequest request = + AggregatedListBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + backendServicesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendServices_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..50c9b94cc96c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListBackendServicesRequest; +import com.google.cloud.compute.v1.BackendServiceAggregatedList; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.BackendServicesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + AggregatedListBackendServicesRequest request = + AggregatedListBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + BackendServiceAggregatedList response = + backendServicesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_BackendServices_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..0e15cd3e4ae5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListBackendServicesRequest; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.BackendServicesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + AggregatedListBackendServicesRequest request = + AggregatedListBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + backendServicesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendServices_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..59893fe72a83 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_AggregatedList_String_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.BackendServicesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + backendServicesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendServices_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b3b9153c35be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.BackendServicesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BackendServicesSettings backendServicesSettings = + BackendServicesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + BackendServicesClient backendServicesClient = + BackendServicesClient.create(backendServicesSettings); + } +} +// [END compute_v1_generated_BackendServices_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..03c4179de6b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.BackendServicesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BackendServicesSettings backendServicesSettings = + BackendServicesSettings.newBuilder().setEndpoint(myEndpoint).build(); + BackendServicesClient backendServicesClient = + BackendServicesClient.create(backendServicesSettings); + } +} +// [END compute_v1_generated_BackendServices_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/AsyncDelete.java new file mode 100644 index 000000000000..722d33d01b79 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.DeleteBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + DeleteBackendServiceRequest request = + DeleteBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backendServicesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..8842524efb68 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.DeleteBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + DeleteBackendServiceRequest request = + DeleteBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendServicesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/SyncDelete.java new file mode 100644 index 000000000000..cf5f95f21b88 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Delete_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.DeleteBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + DeleteBackendServiceRequest request = + DeleteBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendServicesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendServices_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..d4f361dbd06c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Delete_StringString_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + Operation response = backendServicesClient.deleteAsync(project, backendService).get(); + } + } +} +// [END compute_v1_generated_BackendServices_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/AsyncDeleteSignedUrlKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/AsyncDeleteSignedUrlKey.java new file mode 100644 index 000000000000..1c83456afd6d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/AsyncDeleteSignedUrlKey.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_DeleteSignedUrlKey_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteSignedUrlKey { + + public static void main(String[] args) throws Exception { + asyncDeleteSignedUrlKey(); + } + + public static void asyncDeleteSignedUrlKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + DeleteSignedUrlKeyBackendServiceRequest request = + DeleteSignedUrlKeyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setKeyName("keyName-815643254") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + backendServicesClient.deleteSignedUrlKeyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_DeleteSignedUrlKey_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/AsyncDeleteSignedUrlKeyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/AsyncDeleteSignedUrlKeyLRO.java new file mode 100644 index 000000000000..eb12042dcb8f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/AsyncDeleteSignedUrlKeyLRO.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_DeleteSignedUrlKey_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteSignedUrlKeyLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSignedUrlKeyLRO(); + } + + public static void asyncDeleteSignedUrlKeyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + DeleteSignedUrlKeyBackendServiceRequest request = + DeleteSignedUrlKeyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setKeyName("keyName-815643254") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendServicesClient.deleteSignedUrlKeyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_DeleteSignedUrlKey_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/SyncDeleteSignedUrlKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/SyncDeleteSignedUrlKey.java new file mode 100644 index 000000000000..0721d8222ce8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/SyncDeleteSignedUrlKey.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_DeleteSignedUrlKey_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteSignedUrlKey { + + public static void main(String[] args) throws Exception { + syncDeleteSignedUrlKey(); + } + + public static void syncDeleteSignedUrlKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + DeleteSignedUrlKeyBackendServiceRequest request = + DeleteSignedUrlKeyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setKeyName("keyName-815643254") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendServicesClient.deleteSignedUrlKeyAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendServices_DeleteSignedUrlKey_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/SyncDeleteSignedUrlKeyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/SyncDeleteSignedUrlKeyStringStringString.java new file mode 100644 index 000000000000..4e9b3b36c28d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/deletesignedurlkey/SyncDeleteSignedUrlKeyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_DeleteSignedUrlKey_StringStringString_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteSignedUrlKeyStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteSignedUrlKeyStringStringString(); + } + + public static void syncDeleteSignedUrlKeyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + String keyName = "keyName-815643254"; + Operation response = + backendServicesClient.deleteSignedUrlKeyAsync(project, backendService, keyName).get(); + } + } +} +// [END compute_v1_generated_BackendServices_DeleteSignedUrlKey_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/AsyncGet.java new file mode 100644 index 000000000000..ef9c43d5d8e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GetBackendServiceRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + GetBackendServiceRequest request = + GetBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .build(); + ApiFuture future = backendServicesClient.getCallable().futureCall(request); + // Do something. + BackendService response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/SyncGet.java new file mode 100644 index 000000000000..98b7bf4be006 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Get_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GetBackendServiceRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + GetBackendServiceRequest request = + GetBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .build(); + BackendService response = backendServicesClient.get(request); + } + } +} +// [END compute_v1_generated_BackendServices_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/SyncGetStringString.java new file mode 100644 index 000000000000..46a775623d6a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Get_StringString_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + BackendService response = backendServicesClient.get(project, backendService); + } + } +} +// [END compute_v1_generated_BackendServices_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/AsyncGetHealth.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/AsyncGetHealth.java new file mode 100644 index 000000000000..24b28a848b3e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/AsyncGetHealth.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_GetHealth_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendServiceGroupHealth; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GetHealthBackendServiceRequest; +import com.google.cloud.compute.v1.ResourceGroupReference; + +public class AsyncGetHealth { + + public static void main(String[] args) throws Exception { + asyncGetHealth(); + } + + public static void asyncGetHealth() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + GetHealthBackendServiceRequest request = + GetHealthBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setResourceGroupReferenceResource(ResourceGroupReference.newBuilder().build()) + .build(); + ApiFuture future = + backendServicesClient.getHealthCallable().futureCall(request); + // Do something. + BackendServiceGroupHealth response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_GetHealth_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/SyncGetHealth.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/SyncGetHealth.java new file mode 100644 index 000000000000..b05db4becdfb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/SyncGetHealth.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_GetHealth_sync] +import com.google.cloud.compute.v1.BackendServiceGroupHealth; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GetHealthBackendServiceRequest; +import com.google.cloud.compute.v1.ResourceGroupReference; + +public class SyncGetHealth { + + public static void main(String[] args) throws Exception { + syncGetHealth(); + } + + public static void syncGetHealth() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + GetHealthBackendServiceRequest request = + GetHealthBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setResourceGroupReferenceResource(ResourceGroupReference.newBuilder().build()) + .build(); + BackendServiceGroupHealth response = backendServicesClient.getHealth(request); + } + } +} +// [END compute_v1_generated_BackendServices_GetHealth_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/SyncGetHealthStringStringResourcegroupreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/SyncGetHealthStringStringResourcegroupreference.java new file mode 100644 index 000000000000..80a2479d197d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/gethealth/SyncGetHealthStringStringResourcegroupreference.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_GetHealth_StringStringResourcegroupreference_sync] +import com.google.cloud.compute.v1.BackendServiceGroupHealth; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.ResourceGroupReference; + +public class SyncGetHealthStringStringResourcegroupreference { + + public static void main(String[] args) throws Exception { + syncGetHealthStringStringResourcegroupreference(); + } + + public static void syncGetHealthStringStringResourcegroupreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + ResourceGroupReference resourceGroupReferenceResource = + ResourceGroupReference.newBuilder().build(); + BackendServiceGroupHealth response = + backendServicesClient.getHealth(project, backendService, resourceGroupReferenceResource); + } + } +} +// [END compute_v1_generated_BackendServices_GetHealth_StringStringResourcegroupreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..982974d5d237 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GetIamPolicyBackendServiceRequest; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + GetIamPolicyBackendServiceRequest request = + GetIamPolicyBackendServiceRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = backendServicesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..38c717948276 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_GetIamPolicy_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GetIamPolicyBackendServiceRequest; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + GetIamPolicyBackendServiceRequest request = + GetIamPolicyBackendServiceRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = backendServicesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_BackendServices_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/SyncGetIamPolicyStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/SyncGetIamPolicyStringString.java new file mode 100644 index 000000000000..0ab6975b18b8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/getiampolicy/SyncGetIamPolicyStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_GetIamPolicy_StringString_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringString(); + } + + public static void syncGetIamPolicyStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + Policy response = backendServicesClient.getIamPolicy(project, resource); + } + } +} +// [END compute_v1_generated_BackendServices_GetIamPolicy_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/AsyncInsert.java new file mode 100644 index 000000000000..be77e06105a2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.InsertBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + InsertBackendServiceRequest request = + InsertBackendServiceRequest.newBuilder() + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backendServicesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..ac5d660b1000 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.InsertBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + InsertBackendServiceRequest request = + InsertBackendServiceRequest.newBuilder() + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendServicesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/SyncInsert.java new file mode 100644 index 000000000000..da71a00186b1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Insert_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.InsertBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + InsertBackendServiceRequest request = + InsertBackendServiceRequest.newBuilder() + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendServicesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendServices_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/SyncInsertStringBackendservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/SyncInsertStringBackendservice.java new file mode 100644 index 000000000000..40d52acd9cab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/insert/SyncInsertStringBackendservice.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Insert_StringBackendservice_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringBackendservice { + + public static void main(String[] args) throws Exception { + syncInsertStringBackendservice(); + } + + public static void syncInsertStringBackendservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + BackendService backendServiceResource = BackendService.newBuilder().build(); + Operation response = backendServicesClient.insertAsync(project, backendServiceResource).get(); + } + } +} +// [END compute_v1_generated_BackendServices_Insert_StringBackendservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/AsyncList.java new file mode 100644 index 000000000000..eb06d0a99a3c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.ListBackendServicesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + ListBackendServicesRequest request = + ListBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + backendServicesClient.listPagedCallable().futureCall(request); + // Do something. + for (BackendService element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendServices_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/AsyncListPaged.java new file mode 100644 index 000000000000..d4ef7fca9036 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_List_Paged_async] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServiceList; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.ListBackendServicesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + ListBackendServicesRequest request = + ListBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + BackendServiceList response = backendServicesClient.listCallable().call(request); + for (BackendService element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_BackendServices_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/SyncList.java new file mode 100644 index 000000000000..f8614c057bda --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_List_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.ListBackendServicesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + ListBackendServicesRequest request = + ListBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (BackendService element : backendServicesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendServices_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/SyncListString.java new file mode 100644 index 000000000000..d8c41e442e95 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_List_String_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + for (BackendService element : backendServicesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_BackendServices_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/AsyncPatch.java new file mode 100644 index 000000000000..413ff3fa01d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.PatchBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + PatchBackendServiceRequest request = + PatchBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backendServicesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..78ee68c3f640 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchBackendServiceRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + PatchBackendServiceRequest request = + PatchBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendServicesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/SyncPatch.java new file mode 100644 index 000000000000..951dbdaf8cc4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Patch_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchBackendServiceRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + PatchBackendServiceRequest request = + PatchBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendServicesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendServices_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/SyncPatchStringStringBackendservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/SyncPatchStringStringBackendservice.java new file mode 100644 index 000000000000..0112b950db75 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/patch/SyncPatchStringStringBackendservice.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Patch_StringStringBackendservice_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringBackendservice { + + public static void main(String[] args) throws Exception { + syncPatchStringStringBackendservice(); + } + + public static void syncPatchStringStringBackendservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + BackendService backendServiceResource = BackendService.newBuilder().build(); + Operation response = + backendServicesClient.patchAsync(project, backendService, backendServiceResource).get(); + } + } +} +// [END compute_v1_generated_BackendServices_Patch_StringStringBackendservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicy.java new file mode 100644 index 000000000000..ea46382618f9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetEdgeSecurityPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetEdgeSecurityPolicy { + + public static void main(String[] args) throws Exception { + asyncSetEdgeSecurityPolicy(); + } + + public static void asyncSetEdgeSecurityPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + SetEdgeSecurityPolicyBackendServiceRequest request = + SetEdgeSecurityPolicyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + ApiFuture future = + backendServicesClient.setEdgeSecurityPolicyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetEdgeSecurityPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicyLRO.java new file mode 100644 index 000000000000..4be5ba6e6e72 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/AsyncSetEdgeSecurityPolicyLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetEdgeSecurityPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest; + +public class AsyncSetEdgeSecurityPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncSetEdgeSecurityPolicyLRO(); + } + + public static void asyncSetEdgeSecurityPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + SetEdgeSecurityPolicyBackendServiceRequest request = + SetEdgeSecurityPolicyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + OperationFuture future = + backendServicesClient.setEdgeSecurityPolicyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetEdgeSecurityPolicy_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/SyncSetEdgeSecurityPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/SyncSetEdgeSecurityPolicy.java new file mode 100644 index 000000000000..24e1aadd9a50 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/SyncSetEdgeSecurityPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetEdgeSecurityPolicy_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest; + +public class SyncSetEdgeSecurityPolicy { + + public static void main(String[] args) throws Exception { + syncSetEdgeSecurityPolicy(); + } + + public static void syncSetEdgeSecurityPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + SetEdgeSecurityPolicyBackendServiceRequest request = + SetEdgeSecurityPolicyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + Operation response = backendServicesClient.setEdgeSecurityPolicyAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetEdgeSecurityPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference.java new file mode 100644 index 000000000000..1012ba1ac411 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setedgesecuritypolicy/SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetEdgeSecurityPolicy_StringStringSecuritypolicyreference_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; + +public class SyncSetEdgeSecurityPolicyStringStringSecuritypolicyreference { + + public static void main(String[] args) throws Exception { + syncSetEdgeSecurityPolicyStringStringSecuritypolicyreference(); + } + + public static void syncSetEdgeSecurityPolicyStringStringSecuritypolicyreference() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + SecurityPolicyReference securityPolicyReferenceResource = + SecurityPolicyReference.newBuilder().build(); + Operation response = + backendServicesClient + .setEdgeSecurityPolicyAsync(project, backendService, securityPolicyReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetEdgeSecurityPolicy_StringStringSecuritypolicyreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..407c3629cda2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyBackendServiceRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + SetIamPolicyBackendServiceRequest request = + SetIamPolicyBackendServiceRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = backendServicesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..404eeeb9a1f2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetIamPolicy_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyBackendServiceRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + SetIamPolicyBackendServiceRequest request = + SetIamPolicyBackendServiceRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = backendServicesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_BackendServices_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java new file mode 100644 index 000000000000..0beac5c4e1c6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; + +public class SyncSetIamPolicyStringStringGlobalsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringGlobalsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringGlobalsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetPolicyRequest globalSetPolicyRequestResource = + GlobalSetPolicyRequest.newBuilder().build(); + Policy response = + backendServicesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_BackendServices_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/AsyncSetSecurityPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/AsyncSetSecurityPolicy.java new file mode 100644 index 000000000000..7db23692cc7a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/AsyncSetSecurityPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetSecurityPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetSecurityPolicy { + + public static void main(String[] args) throws Exception { + asyncSetSecurityPolicy(); + } + + public static void asyncSetSecurityPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + SetSecurityPolicyBackendServiceRequest request = + SetSecurityPolicyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + ApiFuture future = + backendServicesClient.setSecurityPolicyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetSecurityPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/AsyncSetSecurityPolicyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/AsyncSetSecurityPolicyLRO.java new file mode 100644 index 000000000000..95ad87e72419 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/AsyncSetSecurityPolicyLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetSecurityPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest; + +public class AsyncSetSecurityPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncSetSecurityPolicyLRO(); + } + + public static void asyncSetSecurityPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + SetSecurityPolicyBackendServiceRequest request = + SetSecurityPolicyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + OperationFuture future = + backendServicesClient.setSecurityPolicyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetSecurityPolicy_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/SyncSetSecurityPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/SyncSetSecurityPolicy.java new file mode 100644 index 000000000000..43e1a3e1d22e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/SyncSetSecurityPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetSecurityPolicy_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; +import com.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest; + +public class SyncSetSecurityPolicy { + + public static void main(String[] args) throws Exception { + syncSetSecurityPolicy(); + } + + public static void syncSetSecurityPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + SetSecurityPolicyBackendServiceRequest request = + SetSecurityPolicyBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build()) + .build(); + Operation response = backendServicesClient.setSecurityPolicyAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetSecurityPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/SyncSetSecurityPolicyStringStringSecuritypolicyreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/SyncSetSecurityPolicyStringStringSecuritypolicyreference.java new file mode 100644 index 000000000000..dda1e59de919 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/setsecuritypolicy/SyncSetSecurityPolicyStringStringSecuritypolicyreference.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_SetSecurityPolicy_StringStringSecuritypolicyreference_sync] +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPolicyReference; + +public class SyncSetSecurityPolicyStringStringSecuritypolicyreference { + + public static void main(String[] args) throws Exception { + syncSetSecurityPolicyStringStringSecuritypolicyreference(); + } + + public static void syncSetSecurityPolicyStringStringSecuritypolicyreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + SecurityPolicyReference securityPolicyReferenceResource = + SecurityPolicyReference.newBuilder().build(); + Operation response = + backendServicesClient + .setSecurityPolicyAsync(project, backendService, securityPolicyReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_BackendServices_SetSecurityPolicy_StringStringSecuritypolicyreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/AsyncUpdate.java new file mode 100644 index 000000000000..b16fbb01402e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/AsyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.UpdateBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + UpdateBackendServiceRequest request = + UpdateBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backendServicesClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..0e521aac8884 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/AsyncUpdateLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateBackendServiceRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + UpdateBackendServiceRequest request = + UpdateBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backendServicesClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_BackendServices_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/SyncUpdate.java new file mode 100644 index 000000000000..de62df1af084 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Update_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateBackendServiceRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + UpdateBackendServiceRequest request = + UpdateBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = backendServicesClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_BackendServices_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/SyncUpdateStringStringBackendservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/SyncUpdateStringStringBackendservice.java new file mode 100644 index 000000000000..aa2b38faf7f0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservices/update/SyncUpdateStringStringBackendservice.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServices_Update_StringStringBackendservice_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateStringStringBackendservice { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringBackendservice(); + } + + public static void syncUpdateStringStringBackendservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) { + String project = "project-309310695"; + String backendService = "backendService-1884714623"; + BackendService backendServiceResource = BackendService.newBuilder().build(); + Operation response = + backendServicesClient.updateAsync(project, backendService, backendServiceResource).get(); + } + } +} +// [END compute_v1_generated_BackendServices_Update_StringStringBackendservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservicessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservicessettings/get/SyncGet.java new file mode 100644 index 000000000000..c4a0abf23503 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/backendservicessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_BackendServicesSettings_Get_sync] +import com.google.cloud.compute.v1.BackendServicesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BackendServicesSettings.Builder backendServicesSettingsBuilder = + BackendServicesSettings.newBuilder(); + backendServicesSettingsBuilder + .getSettings() + .setRetrySettings( + backendServicesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BackendServicesSettings backendServicesSettings = backendServicesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_BackendServicesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/AsyncAddResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/AsyncAddResourcePolicies.java new file mode 100644 index 000000000000..4097c84f01d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/AsyncAddResourcePolicies.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_AddResourcePolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddResourcePoliciesDiskRequest; +import com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.longrunning.Operation; + +public class AsyncAddResourcePolicies { + + public static void main(String[] args) throws Exception { + asyncAddResourcePolicies(); + } + + public static void asyncAddResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + AddResourcePoliciesDiskRequest request = + AddResourcePoliciesDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksAddResourcePoliciesRequestResource( + DisksAddResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.addResourcePoliciesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_AddResourcePolicies_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/AsyncAddResourcePoliciesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/AsyncAddResourcePoliciesLRO.java new file mode 100644 index 000000000000..aa8f633ef8f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/AsyncAddResourcePoliciesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_AddResourcePolicies_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddResourcePoliciesDiskRequest; +import com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddResourcePoliciesLRO { + + public static void main(String[] args) throws Exception { + asyncAddResourcePoliciesLRO(); + } + + public static void asyncAddResourcePoliciesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + AddResourcePoliciesDiskRequest request = + AddResourcePoliciesDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksAddResourcePoliciesRequestResource( + DisksAddResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + disksClient.addResourcePoliciesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_AddResourcePolicies_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/SyncAddResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/SyncAddResourcePolicies.java new file mode 100644 index 000000000000..7044a49dffe1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/SyncAddResourcePolicies.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_AddResourcePolicies_sync] +import com.google.cloud.compute.v1.AddResourcePoliciesDiskRequest; +import com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddResourcePolicies { + + public static void main(String[] args) throws Exception { + syncAddResourcePolicies(); + } + + public static void syncAddResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + AddResourcePoliciesDiskRequest request = + AddResourcePoliciesDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksAddResourcePoliciesRequestResource( + DisksAddResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = disksClient.addResourcePoliciesAsync(request).get(); + } + } +} +// [END compute_v1_generated_Disks_AddResourcePolicies_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/SyncAddResourcePoliciesStringStringStringDisksaddresourcepoliciesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/SyncAddResourcePoliciesStringStringStringDisksaddresourcepoliciesrequest.java new file mode 100644 index 000000000000..578681e79249 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/addresourcepolicies/SyncAddResourcePoliciesStringStringStringDisksaddresourcepoliciesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_AddResourcePolicies_StringStringStringDisksaddresourcepoliciesrequest_sync] +import com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddResourcePoliciesStringStringStringDisksaddresourcepoliciesrequest { + + public static void main(String[] args) throws Exception { + syncAddResourcePoliciesStringStringStringDisksaddresourcepoliciesrequest(); + } + + public static void syncAddResourcePoliciesStringStringStringDisksaddresourcepoliciesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String disk = "disk3083677"; + DisksAddResourcePoliciesRequest disksAddResourcePoliciesRequestResource = + DisksAddResourcePoliciesRequest.newBuilder().build(); + Operation response = + disksClient + .addResourcePoliciesAsync( + project, zone, disk, disksAddResourcePoliciesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Disks_AddResourcePolicies_StringStringStringDisksaddresourcepoliciesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..bd73d05db611 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListDisksRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + AggregatedListDisksRequest request = + AggregatedListDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + disksClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Disks_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..f6ad47e798ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListDisksRequest; +import com.google.cloud.compute.v1.DiskAggregatedList; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + AggregatedListDisksRequest request = + AggregatedListDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + DiskAggregatedList response = disksClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Disks_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..538c823d5cd2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListDisksRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + AggregatedListDisksRequest request = + AggregatedListDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + disksClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Disks_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..c6170aa88697 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_AggregatedList_String_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + disksClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Disks_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..773126f1b5a0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DisksSettings disksSettings = + DisksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DisksClient disksClient = DisksClient.create(disksSettings); + } +} +// [END compute_v1_generated_Disks_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..9da26e13c29f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DisksSettings disksSettings = DisksSettings.newBuilder().setEndpoint(myEndpoint).build(); + DisksClient disksClient = DisksClient.create(disksSettings); + } +} +// [END compute_v1_generated_Disks_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/AsyncCreateSnapshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/AsyncCreateSnapshot.java new file mode 100644 index 000000000000..3814f862efb9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/AsyncCreateSnapshot.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_CreateSnapshot_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.CreateSnapshotDiskRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Snapshot; +import com.google.longrunning.Operation; + +public class AsyncCreateSnapshot { + + public static void main(String[] args) throws Exception { + asyncCreateSnapshot(); + } + + public static void asyncCreateSnapshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + CreateSnapshotDiskRequest request = + CreateSnapshotDiskRequest.newBuilder() + .setDisk("disk3083677") + .setGuestFlush(true) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.createSnapshotCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_CreateSnapshot_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/AsyncCreateSnapshotLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/AsyncCreateSnapshotLRO.java new file mode 100644 index 000000000000..49c4ccba6efd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/AsyncCreateSnapshotLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_CreateSnapshot_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.CreateSnapshotDiskRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Snapshot; + +public class AsyncCreateSnapshotLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSnapshotLRO(); + } + + public static void asyncCreateSnapshotLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + CreateSnapshotDiskRequest request = + CreateSnapshotDiskRequest.newBuilder() + .setDisk("disk3083677") + .setGuestFlush(true) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .setZone("zone3744684") + .build(); + OperationFuture future = + disksClient.createSnapshotOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_CreateSnapshot_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/SyncCreateSnapshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/SyncCreateSnapshot.java new file mode 100644 index 000000000000..2876c1a8168a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/SyncCreateSnapshot.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_CreateSnapshot_sync] +import com.google.cloud.compute.v1.CreateSnapshotDiskRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Snapshot; + +public class SyncCreateSnapshot { + + public static void main(String[] args) throws Exception { + syncCreateSnapshot(); + } + + public static void syncCreateSnapshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + CreateSnapshotDiskRequest request = + CreateSnapshotDiskRequest.newBuilder() + .setDisk("disk3083677") + .setGuestFlush(true) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .setZone("zone3744684") + .build(); + Operation response = disksClient.createSnapshotAsync(request).get(); + } + } +} +// [END compute_v1_generated_Disks_CreateSnapshot_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/SyncCreateSnapshotStringStringStringSnapshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/SyncCreateSnapshotStringStringStringSnapshot.java new file mode 100644 index 000000000000..9c8ee3ebb115 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/createsnapshot/SyncCreateSnapshotStringStringStringSnapshot.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_CreateSnapshot_StringStringStringSnapshot_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Snapshot; + +public class SyncCreateSnapshotStringStringStringSnapshot { + + public static void main(String[] args) throws Exception { + syncCreateSnapshotStringStringStringSnapshot(); + } + + public static void syncCreateSnapshotStringStringStringSnapshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String disk = "disk3083677"; + Snapshot snapshotResource = Snapshot.newBuilder().build(); + Operation response = + disksClient.createSnapshotAsync(project, zone, disk, snapshotResource).get(); + } + } +} +// [END compute_v1_generated_Disks_CreateSnapshot_StringStringStringSnapshot_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/AsyncDelete.java new file mode 100644 index 000000000000..789687611517 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteDiskRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + DeleteDiskRequest request = + DeleteDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..a8d75b9d783f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteDiskRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + DeleteDiskRequest request = + DeleteDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + disksClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/SyncDelete.java new file mode 100644 index 000000000000..2b548de5e840 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Delete_sync] +import com.google.cloud.compute.v1.DeleteDiskRequest; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + DeleteDiskRequest request = + DeleteDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = disksClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Disks_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..9844d4b4e1ec --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String disk = "disk3083677"; + Operation response = disksClient.deleteAsync(project, zone, disk).get(); + } + } +} +// [END compute_v1_generated_Disks_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/AsyncGet.java new file mode 100644 index 000000000000..38a34005baaa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.GetDiskRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + GetDiskRequest request = + GetDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.getCallable().futureCall(request); + // Do something. + Disk response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/SyncGet.java new file mode 100644 index 000000000000..e31965cbf6d1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Get_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.GetDiskRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + GetDiskRequest request = + GetDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Disk response = disksClient.get(request); + } + } +} +// [END compute_v1_generated_Disks_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..2b6ff639e2b5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String disk = "disk3083677"; + Disk response = disksClient.get(project, zone, disk); + } + } +} +// [END compute_v1_generated_Disks_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..b4d1823981b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.GetIamPolicyDiskRequest; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + GetIamPolicyDiskRequest request = + GetIamPolicyDiskRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..c07ccae94042 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_GetIamPolicy_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.GetIamPolicyDiskRequest; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + GetIamPolicyDiskRequest request = + GetIamPolicyDiskRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + Policy response = disksClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_Disks_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..bce8742e81a0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + Policy response = disksClient.getIamPolicy(project, zone, resource); + } + } +} +// [END compute_v1_generated_Disks_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/AsyncInsert.java new file mode 100644 index 000000000000..3d1d41fa93d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/AsyncInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.InsertDiskRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + InsertDiskRequest request = + InsertDiskRequest.newBuilder() + .setDiskResource(Disk.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceImage("sourceImage-105174528") + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..4a35f728ed55 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.InsertDiskRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + InsertDiskRequest request = + InsertDiskRequest.newBuilder() + .setDiskResource(Disk.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceImage("sourceImage-105174528") + .setZone("zone3744684") + .build(); + OperationFuture future = + disksClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/SyncInsert.java new file mode 100644 index 000000000000..e647dfbe5e7e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Insert_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.InsertDiskRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + InsertDiskRequest request = + InsertDiskRequest.newBuilder() + .setDiskResource(Disk.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceImage("sourceImage-105174528") + .setZone("zone3744684") + .build(); + Operation response = disksClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Disks_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/SyncInsertStringStringDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/SyncInsertStringStringDisk.java new file mode 100644 index 000000000000..58ce1858cc21 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/insert/SyncInsertStringStringDisk.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Insert_StringStringDisk_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringDisk { + + public static void main(String[] args) throws Exception { + syncInsertStringStringDisk(); + } + + public static void syncInsertStringStringDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + Disk diskResource = Disk.newBuilder().build(); + Operation response = disksClient.insertAsync(project, zone, diskResource).get(); + } + } +} +// [END compute_v1_generated_Disks_Insert_StringStringDisk_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/AsyncList.java new file mode 100644 index 000000000000..b05fdeb1e0ee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.ListDisksRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + ListDisksRequest request = + ListDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.listPagedCallable().futureCall(request); + // Do something. + for (Disk element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Disks_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/AsyncListPaged.java new file mode 100644 index 000000000000..903f58a2d737 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_List_Paged_async] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DiskList; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.ListDisksRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + ListDisksRequest request = + ListDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + DiskList response = disksClient.listCallable().call(request); + for (Disk element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Disks_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/SyncList.java new file mode 100644 index 000000000000..6314ecfa8512 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_List_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.ListDisksRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + ListDisksRequest request = + ListDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (Disk element : disksClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Disks_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/SyncListStringString.java new file mode 100644 index 000000000000..8f33889431e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_List_StringString_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (Disk element : disksClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Disks_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/AsyncRemoveResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/AsyncRemoveResourcePolicies.java new file mode 100644 index 000000000000..2577087c0d63 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/AsyncRemoveResourcePolicies.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_RemoveResourcePolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveResourcePolicies { + + public static void main(String[] args) throws Exception { + asyncRemoveResourcePolicies(); + } + + public static void asyncRemoveResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + RemoveResourcePoliciesDiskRequest request = + RemoveResourcePoliciesDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksRemoveResourcePoliciesRequestResource( + DisksRemoveResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + disksClient.removeResourcePoliciesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_RemoveResourcePolicies_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java new file mode 100644 index 000000000000..084cc4c81d3c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_RemoveResourcePolicies_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest; + +public class AsyncRemoveResourcePoliciesLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveResourcePoliciesLRO(); + } + + public static void asyncRemoveResourcePoliciesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + RemoveResourcePoliciesDiskRequest request = + RemoveResourcePoliciesDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksRemoveResourcePoliciesRequestResource( + DisksRemoveResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + disksClient.removeResourcePoliciesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_RemoveResourcePolicies_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/SyncRemoveResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/SyncRemoveResourcePolicies.java new file mode 100644 index 000000000000..eb5c3ca468c5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/SyncRemoveResourcePolicies.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_RemoveResourcePolicies_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest; + +public class SyncRemoveResourcePolicies { + + public static void main(String[] args) throws Exception { + syncRemoveResourcePolicies(); + } + + public static void syncRemoveResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + RemoveResourcePoliciesDiskRequest request = + RemoveResourcePoliciesDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksRemoveResourcePoliciesRequestResource( + DisksRemoveResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = disksClient.removeResourcePoliciesAsync(request).get(); + } + } +} +// [END compute_v1_generated_Disks_RemoveResourcePolicies_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringDisksremoveresourcepoliciesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringDisksremoveresourcepoliciesrequest.java new file mode 100644 index 000000000000..8a56c0b51f91 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringDisksremoveresourcepoliciesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_RemoveResourcePolicies_StringStringStringDisksremoveresourcepoliciesrequest_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncRemoveResourcePoliciesStringStringStringDisksremoveresourcepoliciesrequest { + + public static void main(String[] args) throws Exception { + syncRemoveResourcePoliciesStringStringStringDisksremoveresourcepoliciesrequest(); + } + + public static void + syncRemoveResourcePoliciesStringStringStringDisksremoveresourcepoliciesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String disk = "disk3083677"; + DisksRemoveResourcePoliciesRequest disksRemoveResourcePoliciesRequestResource = + DisksRemoveResourcePoliciesRequest.newBuilder().build(); + Operation response = + disksClient + .removeResourcePoliciesAsync( + project, zone, disk, disksRemoveResourcePoliciesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Disks_RemoveResourcePolicies_StringStringStringDisksremoveresourcepoliciesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/AsyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/AsyncResize.java new file mode 100644 index 000000000000..c0c1bf002679 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/AsyncResize.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Resize_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksResizeRequest; +import com.google.cloud.compute.v1.ResizeDiskRequest; +import com.google.longrunning.Operation; + +public class AsyncResize { + + public static void main(String[] args) throws Exception { + asyncResize(); + } + + public static void asyncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + ResizeDiskRequest request = + ResizeDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksResizeRequestResource(DisksResizeRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.resizeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Resize_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/AsyncResizeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/AsyncResizeLRO.java new file mode 100644 index 000000000000..c80a87437154 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/AsyncResizeLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Resize_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksResizeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResizeDiskRequest; + +public class AsyncResizeLRO { + + public static void main(String[] args) throws Exception { + asyncResizeLRO(); + } + + public static void asyncResizeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + ResizeDiskRequest request = + ResizeDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksResizeRequestResource(DisksResizeRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + disksClient.resizeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Resize_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/SyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/SyncResize.java new file mode 100644 index 000000000000..7d3ef9be3c97 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/SyncResize.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Resize_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksResizeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResizeDiskRequest; + +public class SyncResize { + + public static void main(String[] args) throws Exception { + syncResize(); + } + + public static void syncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + ResizeDiskRequest request = + ResizeDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDisksResizeRequestResource(DisksResizeRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = disksClient.resizeAsync(request).get(); + } + } +} +// [END compute_v1_generated_Disks_Resize_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/SyncResizeStringStringStringDisksresizerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/SyncResizeStringStringStringDisksresizerequest.java new file mode 100644 index 000000000000..e52c9c8bb691 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/resize/SyncResizeStringStringStringDisksresizerequest.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Resize_StringStringStringDisksresizerequest_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.DisksResizeRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncResizeStringStringStringDisksresizerequest { + + public static void main(String[] args) throws Exception { + syncResizeStringStringStringDisksresizerequest(); + } + + public static void syncResizeStringStringStringDisksresizerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String disk = "disk3083677"; + DisksResizeRequest disksResizeRequestResource = DisksResizeRequest.newBuilder().build(); + Operation response = + disksClient.resizeAsync(project, zone, disk, disksResizeRequestResource).get(); + } + } +} +// [END compute_v1_generated_Disks_Resize_StringStringStringDisksresizerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..3e486a24f16a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyDiskRequest; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + SetIamPolicyDiskRequest request = + SetIamPolicyDiskRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build()) + .build(); + ApiFuture future = disksClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..a1ae0b587bd9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_SetIamPolicy_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyDiskRequest; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + SetIamPolicyDiskRequest request = + SetIamPolicyDiskRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build()) + .build(); + Policy response = disksClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_Disks_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java new file mode 100644 index 000000000000..f652d953914a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_SetIamPolicy_StringStringStringZonesetpolicyrequest_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringZonesetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringZonesetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringZonesetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build(); + Policy response = + disksClient.setIamPolicy(project, zone, resource, zoneSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_Disks_SetIamPolicy_StringStringStringZonesetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..0f3157288002 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.SetLabelsDiskRequest; +import com.google.cloud.compute.v1.ZoneSetLabelsRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + SetLabelsDiskRequest request = + SetLabelsDiskRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetLabelsRequestResource(ZoneSetLabelsRequest.newBuilder().build()) + .build(); + ApiFuture future = disksClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..91d8fd86b3b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsDiskRequest; +import com.google.cloud.compute.v1.ZoneSetLabelsRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + SetLabelsDiskRequest request = + SetLabelsDiskRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetLabelsRequestResource(ZoneSetLabelsRequest.newBuilder().build()) + .build(); + OperationFuture future = + disksClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..bcb4c2da544d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_SetLabels_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsDiskRequest; +import com.google.cloud.compute.v1.ZoneSetLabelsRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + SetLabelsDiskRequest request = + SetLabelsDiskRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetLabelsRequestResource(ZoneSetLabelsRequest.newBuilder().build()) + .build(); + Operation response = disksClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_Disks_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/SyncSetLabelsStringStringStringZonesetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/SyncSetLabelsStringStringStringZonesetlabelsrequest.java new file mode 100644 index 000000000000..65110e4d3c8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/setlabels/SyncSetLabelsStringStringStringZonesetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_SetLabels_StringStringStringZonesetlabelsrequest_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ZoneSetLabelsRequest; + +public class SyncSetLabelsStringStringStringZonesetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringZonesetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringZonesetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + ZoneSetLabelsRequest zoneSetLabelsRequestResource = ZoneSetLabelsRequest.newBuilder().build(); + Operation response = + disksClient.setLabelsAsync(project, zone, resource, zoneSetLabelsRequestResource).get(); + } + } +} +// [END compute_v1_generated_Disks_SetLabels_StringStringStringZonesetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..87f0c0078828 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.TestIamPermissionsDiskRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + TestIamPermissionsDiskRequest request = + TestIamPermissionsDiskRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = + disksClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..3f93550f4522 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_TestIamPermissions_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.TestIamPermissionsDiskRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + TestIamPermissionsDiskRequest request = + TestIamPermissionsDiskRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + TestPermissionsResponse response = disksClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_Disks_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..7d8199a4c475 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + disksClient.testIamPermissions(project, zone, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_Disks_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/AsyncUpdate.java new file mode 100644 index 000000000000..7777d1bbf92d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/AsyncUpdate.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.UpdateDiskRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + UpdateDiskRequest request = + UpdateDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDiskResource(Disk.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .setZone("zone3744684") + .build(); + ApiFuture future = disksClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..a3f6f2d94664 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/AsyncUpdateLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateDiskRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + UpdateDiskRequest request = + UpdateDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDiskResource(Disk.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .setZone("zone3744684") + .build(); + OperationFuture future = + disksClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Disks_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/SyncUpdate.java new file mode 100644 index 000000000000..578fc16b2df1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Update_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateDiskRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + UpdateDiskRequest request = + UpdateDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDiskResource(Disk.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .setZone("zone3744684") + .build(); + Operation response = disksClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_Disks_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/SyncUpdateStringStringStringDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/SyncUpdateStringStringStringDisk.java new file mode 100644 index 000000000000..7456b4a26c19 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disks/update/SyncUpdateStringStringStringDisk.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.compute.v1.samples; + +// [START compute_v1_generated_Disks_Update_StringStringStringDisk_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DisksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateStringStringStringDisk { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringDisk(); + } + + public static void syncUpdateStringStringStringDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DisksClient disksClient = DisksClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String disk = "disk3083677"; + Disk diskResource = Disk.newBuilder().build(); + Operation response = disksClient.updateAsync(project, zone, disk, diskResource).get(); + } + } +} +// [END compute_v1_generated_Disks_Update_StringStringStringDisk_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/diskssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/diskssettings/get/SyncGet.java new file mode 100644 index 000000000000..a07b7f68ccff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/diskssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_DisksSettings_Get_sync] +import com.google.cloud.compute.v1.DisksSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DisksSettings.Builder disksSettingsBuilder = DisksSettings.newBuilder(); + disksSettingsBuilder + .getSettings() + .setRetrySettings( + disksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DisksSettings disksSettings = disksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_DisksSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..d17514894a34 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListDiskTypesRequest; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.DiskTypesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + AggregatedListDiskTypesRequest request = + AggregatedListDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + diskTypesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_DiskTypes_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..c7cf9e3d9127 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListDiskTypesRequest; +import com.google.cloud.compute.v1.DiskTypeAggregatedList; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.DiskTypesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + AggregatedListDiskTypesRequest request = + AggregatedListDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + DiskTypeAggregatedList response = diskTypesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_DiskTypes_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..52d3b1a52f7d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListDiskTypesRequest; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.DiskTypesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + AggregatedListDiskTypesRequest request = + AggregatedListDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + diskTypesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_DiskTypes_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..2bdfb7f7d03f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_AggregatedList_String_sync] +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.DiskTypesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + diskTypesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_DiskTypes_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..9f0d101a3298 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.DiskTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DiskTypesSettings diskTypesSettings = + DiskTypesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DiskTypesClient diskTypesClient = DiskTypesClient.create(diskTypesSettings); + } +} +// [END compute_v1_generated_DiskTypes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a3118631d970 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.DiskTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DiskTypesSettings diskTypesSettings = + DiskTypesSettings.newBuilder().setEndpoint(myEndpoint).build(); + DiskTypesClient diskTypesClient = DiskTypesClient.create(diskTypesSettings); + } +} +// [END compute_v1_generated_DiskTypes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/AsyncGet.java new file mode 100644 index 000000000000..44ecf2b9eca0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.GetDiskTypeRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + GetDiskTypeRequest request = + GetDiskTypeRequest.newBuilder() + .setDiskType("diskType279771767") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = diskTypesClient.getCallable().futureCall(request); + // Do something. + DiskType response = future.get(); + } + } +} +// [END compute_v1_generated_DiskTypes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/SyncGet.java new file mode 100644 index 000000000000..1a3c177f9ece --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_Get_sync] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.GetDiskTypeRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + GetDiskTypeRequest request = + GetDiskTypeRequest.newBuilder() + .setDiskType("diskType279771767") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + DiskType response = diskTypesClient.get(request); + } + } +} +// [END compute_v1_generated_DiskTypes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..70937f3a2045 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_Get_StringStringString_sync] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.DiskTypesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String diskType = "diskType279771767"; + DiskType response = diskTypesClient.get(project, zone, diskType); + } + } +} +// [END compute_v1_generated_DiskTypes_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/AsyncList.java new file mode 100644 index 000000000000..c2cc0d563c9b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.ListDiskTypesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + ListDiskTypesRequest request = + ListDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = diskTypesClient.listPagedCallable().futureCall(request); + // Do something. + for (DiskType element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_DiskTypes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/AsyncListPaged.java new file mode 100644 index 000000000000..84747a2ccfcf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_List_Paged_async] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.DiskTypeList; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.ListDiskTypesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + ListDiskTypesRequest request = + ListDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + DiskTypeList response = diskTypesClient.listCallable().call(request); + for (DiskType element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_DiskTypes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/SyncList.java new file mode 100644 index 000000000000..7bb220cbfd53 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_List_sync] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.DiskTypesClient; +import com.google.cloud.compute.v1.ListDiskTypesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + ListDiskTypesRequest request = + ListDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (DiskType element : diskTypesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_DiskTypes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/SyncListStringString.java new file mode 100644 index 000000000000..5e493d3518dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypes/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypes_List_StringString_sync] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.DiskTypesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DiskTypesClient diskTypesClient = DiskTypesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (DiskType element : diskTypesClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_DiskTypes_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypessettings/get/SyncGet.java new file mode 100644 index 000000000000..82785ce382e7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/disktypessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_DiskTypesSettings_Get_sync] +import com.google.cloud.compute.v1.DiskTypesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DiskTypesSettings.Builder diskTypesSettingsBuilder = DiskTypesSettings.newBuilder(); + diskTypesSettingsBuilder + .getSettings() + .setRetrySettings( + diskTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DiskTypesSettings diskTypesSettings = diskTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_DiskTypesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..0fc354128c60 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.ExternalVpnGatewaysSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ExternalVpnGatewaysSettings externalVpnGatewaysSettings = + ExternalVpnGatewaysSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ExternalVpnGatewaysClient externalVpnGatewaysClient = + ExternalVpnGatewaysClient.create(externalVpnGatewaysSettings); + } +} +// [END compute_v1_generated_ExternalVpnGateways_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a79b6246ce5a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.ExternalVpnGatewaysSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ExternalVpnGatewaysSettings externalVpnGatewaysSettings = + ExternalVpnGatewaysSettings.newBuilder().setEndpoint(myEndpoint).build(); + ExternalVpnGatewaysClient externalVpnGatewaysClient = + ExternalVpnGatewaysClient.create(externalVpnGatewaysSettings); + } +} +// [END compute_v1_generated_ExternalVpnGateways_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/AsyncDelete.java new file mode 100644 index 000000000000..01a144d56d3a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + DeleteExternalVpnGatewayRequest request = + DeleteExternalVpnGatewayRequest.newBuilder() + .setExternalVpnGateway("externalVpnGateway-1140582181") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = externalVpnGatewaysClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..67b935543ab9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + DeleteExternalVpnGatewayRequest request = + DeleteExternalVpnGatewayRequest.newBuilder() + .setExternalVpnGateway("externalVpnGateway-1140582181") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + externalVpnGatewaysClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/SyncDelete.java new file mode 100644 index 000000000000..6be070969bdc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Delete_sync] +import com.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + DeleteExternalVpnGatewayRequest request = + DeleteExternalVpnGatewayRequest.newBuilder() + .setExternalVpnGateway("externalVpnGateway-1140582181") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = externalVpnGatewaysClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..d3ec943f7210 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Delete_StringString_sync] +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + String project = "project-309310695"; + String externalVpnGateway = "externalVpnGateway-1140582181"; + Operation response = externalVpnGatewaysClient.deleteAsync(project, externalVpnGateway).get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/AsyncGet.java new file mode 100644 index 000000000000..d37a223acbf5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.GetExternalVpnGatewayRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + GetExternalVpnGatewayRequest request = + GetExternalVpnGatewayRequest.newBuilder() + .setExternalVpnGateway("externalVpnGateway-1140582181") + .setProject("project-309310695") + .build(); + ApiFuture future = + externalVpnGatewaysClient.getCallable().futureCall(request); + // Do something. + ExternalVpnGateway response = future.get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/SyncGet.java new file mode 100644 index 000000000000..c010bdd82801 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Get_sync] +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.GetExternalVpnGatewayRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + GetExternalVpnGatewayRequest request = + GetExternalVpnGatewayRequest.newBuilder() + .setExternalVpnGateway("externalVpnGateway-1140582181") + .setProject("project-309310695") + .build(); + ExternalVpnGateway response = externalVpnGatewaysClient.get(request); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/SyncGetStringString.java new file mode 100644 index 000000000000..85d9383290eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Get_StringString_sync] +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + String project = "project-309310695"; + String externalVpnGateway = "externalVpnGateway-1140582181"; + ExternalVpnGateway response = externalVpnGatewaysClient.get(project, externalVpnGateway); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/AsyncInsert.java new file mode 100644 index 000000000000..174d00ff38cc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.InsertExternalVpnGatewayRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + InsertExternalVpnGatewayRequest request = + InsertExternalVpnGatewayRequest.newBuilder() + .setExternalVpnGatewayResource(ExternalVpnGateway.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = externalVpnGatewaysClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..14cc12c9ba1e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.InsertExternalVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + InsertExternalVpnGatewayRequest request = + InsertExternalVpnGatewayRequest.newBuilder() + .setExternalVpnGatewayResource(ExternalVpnGateway.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + externalVpnGatewaysClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/SyncInsert.java new file mode 100644 index 000000000000..79b62978e2f6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Insert_sync] +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.InsertExternalVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + InsertExternalVpnGatewayRequest request = + InsertExternalVpnGatewayRequest.newBuilder() + .setExternalVpnGatewayResource(ExternalVpnGateway.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = externalVpnGatewaysClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/SyncInsertStringExternalvpngateway.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/SyncInsertStringExternalvpngateway.java new file mode 100644 index 000000000000..e9d8a636647f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/insert/SyncInsertStringExternalvpngateway.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_Insert_StringExternalvpngateway_sync] +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringExternalvpngateway { + + public static void main(String[] args) throws Exception { + syncInsertStringExternalvpngateway(); + } + + public static void syncInsertStringExternalvpngateway() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + String project = "project-309310695"; + ExternalVpnGateway externalVpnGatewayResource = ExternalVpnGateway.newBuilder().build(); + Operation response = + externalVpnGatewaysClient.insertAsync(project, externalVpnGatewayResource).get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_Insert_StringExternalvpngateway_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/AsyncList.java new file mode 100644 index 000000000000..5b69e6b1f1b8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.ListExternalVpnGatewaysRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + ListExternalVpnGatewaysRequest request = + ListExternalVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + externalVpnGatewaysClient.listPagedCallable().futureCall(request); + // Do something. + for (ExternalVpnGateway element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/AsyncListPaged.java new file mode 100644 index 000000000000..1d2507b21643 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_List_Paged_async] +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewayList; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.ListExternalVpnGatewaysRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + ListExternalVpnGatewaysRequest request = + ListExternalVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ExternalVpnGatewayList response = externalVpnGatewaysClient.listCallable().call(request); + for (ExternalVpnGateway element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/SyncList.java new file mode 100644 index 000000000000..f7e1b5980a6c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_List_sync] +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.ListExternalVpnGatewaysRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + ListExternalVpnGatewaysRequest request = + ListExternalVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (ExternalVpnGateway element : externalVpnGatewaysClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/SyncListString.java new file mode 100644 index 000000000000..7e52a649a5d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_List_String_sync] +import com.google.cloud.compute.v1.ExternalVpnGateway; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + String project = "project-309310695"; + for (ExternalVpnGateway element : externalVpnGatewaysClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..e85aba102f4f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/AsyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + SetLabelsExternalVpnGatewayRequest request = + SetLabelsExternalVpnGatewayRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = + externalVpnGatewaysClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..791f0416084c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/AsyncSetLabelsLRO.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + SetLabelsExternalVpnGatewayRequest request = + SetLabelsExternalVpnGatewayRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + OperationFuture future = + externalVpnGatewaysClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..bfecbc3e1029 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/SyncSetLabels.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_SetLabels_sync] +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + SetLabelsExternalVpnGatewayRequest request = + SetLabelsExternalVpnGatewayRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Operation response = externalVpnGatewaysClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java new file mode 100644 index 000000000000..c9b91b343cb1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_SetLabels_StringStringGlobalsetlabelsrequest_sync] +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetLabelsStringStringGlobalsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringGlobalsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringGlobalsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetLabelsRequest globalSetLabelsRequestResource = + GlobalSetLabelsRequest.newBuilder().build(); + Operation response = + externalVpnGatewaysClient + .setLabelsAsync(project, resource, globalSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_SetLabels_StringStringGlobalsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..20e7bb14f6c6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/AsyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.TestIamPermissionsExternalVpnGatewayRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + TestIamPermissionsExternalVpnGatewayRequest request = + TestIamPermissionsExternalVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + externalVpnGatewaysClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..e0ae6709473c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_TestIamPermissions_sync] +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.TestIamPermissionsExternalVpnGatewayRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + TestIamPermissionsExternalVpnGatewayRequest request = + TestIamPermissionsExternalVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = externalVpnGatewaysClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..6bec105dd295 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngateways/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGateways_TestIamPermissions_StringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.ExternalVpnGatewaysClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ExternalVpnGatewaysClient externalVpnGatewaysClient = ExternalVpnGatewaysClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + externalVpnGatewaysClient.testIamPermissions( + project, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_ExternalVpnGateways_TestIamPermissions_StringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngatewayssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngatewayssettings/get/SyncGet.java new file mode 100644 index 000000000000..0d2041e9cfdb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/externalvpngatewayssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ExternalVpnGatewaysSettings_Get_sync] +import com.google.cloud.compute.v1.ExternalVpnGatewaysSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ExternalVpnGatewaysSettings.Builder externalVpnGatewaysSettingsBuilder = + ExternalVpnGatewaysSettings.newBuilder(); + externalVpnGatewaysSettingsBuilder + .getSettings() + .setRetrySettings( + externalVpnGatewaysSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ExternalVpnGatewaysSettings externalVpnGatewaysSettings = + externalVpnGatewaysSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ExternalVpnGatewaysSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/AsyncAddAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/AsyncAddAssociation.java new file mode 100644 index 000000000000..f05b35e9c578 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/AsyncAddAssociation.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_AddAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.longrunning.Operation; + +public class AsyncAddAssociation { + + public static void main(String[] args) throws Exception { + asyncAddAssociation(); + } + + public static void asyncAddAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + AddAssociationFirewallPolicyRequest request = + AddAssociationFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + firewallPoliciesClient.addAssociationCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_AddAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/AsyncAddAssociationLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/AsyncAddAssociationLRO.java new file mode 100644 index 000000000000..a170c4446f4a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/AsyncAddAssociationLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_AddAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncAddAssociationLRO(); + } + + public static void asyncAddAssociationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + AddAssociationFirewallPolicyRequest request = + AddAssociationFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.addAssociationOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_AddAssociation_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/SyncAddAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/SyncAddAssociation.java new file mode 100644 index 000000000000..8716bfb24483 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/SyncAddAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_AddAssociation_sync] +import com.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddAssociation { + + public static void main(String[] args) throws Exception { + syncAddAssociation(); + } + + public static void syncAddAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + AddAssociationFirewallPolicyRequest request = + AddAssociationFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.addAssociationAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_AddAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/SyncAddAssociationStringFirewallpolicyassociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/SyncAddAssociationStringFirewallpolicyassociation.java new file mode 100644 index 000000000000..a759baa20435 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addassociation/SyncAddAssociationStringFirewallpolicyassociation.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_AddAssociation_StringFirewallpolicyassociation_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddAssociationStringFirewallpolicyassociation { + + public static void main(String[] args) throws Exception { + syncAddAssociationStringFirewallpolicyassociation(); + } + + public static void syncAddAssociationStringFirewallpolicyassociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyAssociation firewallPolicyAssociationResource = + FirewallPolicyAssociation.newBuilder().build(); + Operation response = + firewallPoliciesClient + .addAssociationAsync(firewallPolicy, firewallPolicyAssociationResource) + .get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_AddAssociation_StringFirewallpolicyassociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/AsyncAddRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/AsyncAddRule.java new file mode 100644 index 000000000000..b8992a1656d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/AsyncAddRule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_AddRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddRuleFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.longrunning.Operation; + +public class AsyncAddRule { + + public static void main(String[] args) throws Exception { + asyncAddRule(); + } + + public static void asyncAddRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + AddRuleFirewallPolicyRequest request = + AddRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallPoliciesClient.addRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_AddRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/AsyncAddRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/AsyncAddRuleLRO.java new file mode 100644 index 000000000000..91d249a8daa9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/AsyncAddRuleLRO.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_AddRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddRuleFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddRuleLRO { + + public static void main(String[] args) throws Exception { + asyncAddRuleLRO(); + } + + public static void asyncAddRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + AddRuleFirewallPolicyRequest request = + AddRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.addRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_AddRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/SyncAddRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/SyncAddRule.java new file mode 100644 index 000000000000..4e7659de05b6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/SyncAddRule.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_AddRule_sync] +import com.google.cloud.compute.v1.AddRuleFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddRule { + + public static void main(String[] args) throws Exception { + syncAddRule(); + } + + public static void syncAddRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + AddRuleFirewallPolicyRequest request = + AddRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.addRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_AddRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/SyncAddRuleStringFirewallpolicyrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/SyncAddRuleStringFirewallpolicyrule.java new file mode 100644 index 000000000000..0b09be4a3445 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/addrule/SyncAddRuleStringFirewallpolicyrule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_AddRule_StringFirewallpolicyrule_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddRuleStringFirewallpolicyrule { + + public static void main(String[] args) throws Exception { + syncAddRuleStringFirewallpolicyrule(); + } + + public static void syncAddRuleStringFirewallpolicyrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule firewallPolicyRuleResource = FirewallPolicyRule.newBuilder().build(); + Operation response = + firewallPoliciesClient.addRuleAsync(firewallPolicy, firewallPolicyRuleResource).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_AddRule_StringFirewallpolicyrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/AsyncCloneRules.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/AsyncCloneRules.java new file mode 100644 index 000000000000..ed43a500b5cd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/AsyncCloneRules.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_CloneRules_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncCloneRules { + + public static void main(String[] args) throws Exception { + asyncCloneRules(); + } + + public static void asyncCloneRules() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + CloneRulesFirewallPolicyRequest request = + CloneRulesFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + ApiFuture future = firewallPoliciesClient.cloneRulesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_CloneRules_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/AsyncCloneRulesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/AsyncCloneRulesLRO.java new file mode 100644 index 000000000000..d329ae37e808 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/AsyncCloneRulesLRO.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_CloneRules_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncCloneRulesLRO { + + public static void main(String[] args) throws Exception { + asyncCloneRulesLRO(); + } + + public static void asyncCloneRulesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + CloneRulesFirewallPolicyRequest request = + CloneRulesFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + OperationFuture future = + firewallPoliciesClient.cloneRulesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_CloneRules_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/SyncCloneRules.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/SyncCloneRules.java new file mode 100644 index 000000000000..0cb469977a03 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/SyncCloneRules.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_CloneRules_sync] +import com.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncCloneRules { + + public static void main(String[] args) throws Exception { + syncCloneRules(); + } + + public static void syncCloneRules() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + CloneRulesFirewallPolicyRequest request = + CloneRulesFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + Operation response = firewallPoliciesClient.cloneRulesAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_CloneRules_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/SyncCloneRulesString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/SyncCloneRulesString.java new file mode 100644 index 000000000000..353bc84d1115 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/clonerules/SyncCloneRulesString.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_CloneRules_String_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncCloneRulesString { + + public static void main(String[] args) throws Exception { + syncCloneRulesString(); + } + + public static void syncCloneRulesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = firewallPoliciesClient.cloneRulesAsync(firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_CloneRules_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..7922adb3c9a9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FirewallPoliciesSettings firewallPoliciesSettings = + FirewallPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + FirewallPoliciesClient firewallPoliciesClient = + FirewallPoliciesClient.create(firewallPoliciesSettings); + } +} +// [END compute_v1_generated_FirewallPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..edd894e8a049 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FirewallPoliciesSettings firewallPoliciesSettings = + FirewallPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + FirewallPoliciesClient firewallPoliciesClient = + FirewallPoliciesClient.create(firewallPoliciesSettings); + } +} +// [END compute_v1_generated_FirewallPolicies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/AsyncDelete.java new file mode 100644 index 000000000000..4f8bcaef8105 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + DeleteFirewallPolicyRequest request = + DeleteFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallPoliciesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..d38d8f769792 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + DeleteFirewallPolicyRequest request = + DeleteFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/SyncDelete.java new file mode 100644 index 000000000000..68e1aaf18b86 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Delete_sync] +import com.google.cloud.compute.v1.DeleteFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + DeleteFirewallPolicyRequest request = + DeleteFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/SyncDeleteString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/SyncDeleteString.java new file mode 100644 index 000000000000..2f859a71aa02 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/delete/SyncDeleteString.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Delete_String_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteString { + + public static void main(String[] args) throws Exception { + syncDeleteString(); + } + + public static void syncDeleteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = firewallPoliciesClient.deleteAsync(firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Delete_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/AsyncGet.java new file mode 100644 index 000000000000..96e17470c81c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/AsyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.GetFirewallPolicyRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + GetFirewallPolicyRequest request = + GetFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .build(); + ApiFuture future = firewallPoliciesClient.getCallable().futureCall(request); + // Do something. + FirewallPolicy response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/SyncGet.java new file mode 100644 index 000000000000..f508dac9688b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Get_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.GetFirewallPolicyRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + GetFirewallPolicyRequest request = + GetFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .build(); + FirewallPolicy response = firewallPoliciesClient.get(request); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/SyncGetString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/SyncGetString.java new file mode 100644 index 000000000000..fbf8b60cc4a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/get/SyncGetString.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Get_String_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; + +public class SyncGetString { + + public static void main(String[] args) throws Exception { + syncGetString(); + } + + public static void syncGetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicy response = firewallPoliciesClient.get(firewallPolicy); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Get_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/AsyncGetAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/AsyncGetAssociation.java new file mode 100644 index 000000000000..7f01e0fed042 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/AsyncGetAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.GetAssociationFirewallPolicyRequest; + +public class AsyncGetAssociation { + + public static void main(String[] args) throws Exception { + asyncGetAssociation(); + } + + public static void asyncGetAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + GetAssociationFirewallPolicyRequest request = + GetAssociationFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .build(); + ApiFuture future = + firewallPoliciesClient.getAssociationCallable().futureCall(request); + // Do something. + FirewallPolicyAssociation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/SyncGetAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/SyncGetAssociation.java new file mode 100644 index 000000000000..60a9fea63b65 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/SyncGetAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetAssociation_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.GetAssociationFirewallPolicyRequest; + +public class SyncGetAssociation { + + public static void main(String[] args) throws Exception { + syncGetAssociation(); + } + + public static void syncGetAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + GetAssociationFirewallPolicyRequest request = + GetAssociationFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .build(); + FirewallPolicyAssociation response = firewallPoliciesClient.getAssociation(request); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/SyncGetAssociationString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/SyncGetAssociationString.java new file mode 100644 index 000000000000..f5dca6d9cc34 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getassociation/SyncGetAssociationString.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetAssociation_String_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; + +public class SyncGetAssociationString { + + public static void main(String[] args) throws Exception { + syncGetAssociationString(); + } + + public static void syncGetAssociationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyAssociation response = firewallPoliciesClient.getAssociation(firewallPolicy); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetAssociation_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..6d45c3d2bfde --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.GetIamPolicyFirewallPolicyRequest; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + GetIamPolicyFirewallPolicyRequest request = + GetIamPolicyFirewallPolicyRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setResource("resource-341064690") + .build(); + ApiFuture future = firewallPoliciesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..d9e2b67a17d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetIamPolicy_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.GetIamPolicyFirewallPolicyRequest; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + GetIamPolicyFirewallPolicyRequest request = + GetIamPolicyFirewallPolicyRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setResource("resource-341064690") + .build(); + Policy response = firewallPoliciesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/SyncGetIamPolicyString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/SyncGetIamPolicyString.java new file mode 100644 index 000000000000..8b990b4a7d91 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getiampolicy/SyncGetIamPolicyString.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetIamPolicy_String_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyString(); + } + + public static void syncGetIamPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String resource = "resource-341064690"; + Policy response = firewallPoliciesClient.getIamPolicy(resource); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetIamPolicy_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/AsyncGetRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/AsyncGetRule.java new file mode 100644 index 000000000000..23ee865793fc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/AsyncGetRule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.GetRuleFirewallPolicyRequest; + +public class AsyncGetRule { + + public static void main(String[] args) throws Exception { + asyncGetRule(); + } + + public static void asyncGetRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + GetRuleFirewallPolicyRequest request = + GetRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .build(); + ApiFuture future = + firewallPoliciesClient.getRuleCallable().futureCall(request); + // Do something. + FirewallPolicyRule response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/SyncGetRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/SyncGetRule.java new file mode 100644 index 000000000000..29c535050f10 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/SyncGetRule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetRule_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.GetRuleFirewallPolicyRequest; + +public class SyncGetRule { + + public static void main(String[] args) throws Exception { + syncGetRule(); + } + + public static void syncGetRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + GetRuleFirewallPolicyRequest request = + GetRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .build(); + FirewallPolicyRule response = firewallPoliciesClient.getRule(request); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/SyncGetRuleString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/SyncGetRuleString.java new file mode 100644 index 000000000000..59d6261b1ac5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/getrule/SyncGetRuleString.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_GetRule_String_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; + +public class SyncGetRuleString { + + public static void main(String[] args) throws Exception { + syncGetRuleString(); + } + + public static void syncGetRuleString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule response = firewallPoliciesClient.getRule(firewallPolicy); + } + } +} +// [END compute_v1_generated_FirewallPolicies_GetRule_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/AsyncInsert.java new file mode 100644 index 000000000000..d879b2038a8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + InsertFirewallPolicyRequest request = + InsertFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setParentId("parentId1175162725") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallPoliciesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..654c71f31386 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + InsertFirewallPolicyRequest request = + InsertFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setParentId("parentId1175162725") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/SyncInsert.java new file mode 100644 index 000000000000..bc0888a2ed95 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Insert_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + InsertFirewallPolicyRequest request = + InsertFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setParentId("parentId1175162725") + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/SyncInsertStringFirewallpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/SyncInsertStringFirewallpolicy.java new file mode 100644 index 000000000000..a2f1a59b100a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/insert/SyncInsertStringFirewallpolicy.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Insert_StringFirewallpolicy_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringFirewallpolicy { + + public static void main(String[] args) throws Exception { + syncInsertStringFirewallpolicy(); + } + + public static void syncInsertStringFirewallpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String parentId = "parentId1175162725"; + FirewallPolicy firewallPolicyResource = FirewallPolicy.newBuilder().build(); + Operation response = + firewallPoliciesClient.insertAsync(parentId, firewallPolicyResource).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Insert_StringFirewallpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/AsyncList.java new file mode 100644 index 000000000000..1f17d6072255 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.ListFirewallPoliciesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + ListFirewallPoliciesRequest request = + ListFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setParentId("parentId1175162725") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + firewallPoliciesClient.listPagedCallable().futureCall(request); + // Do something. + for (FirewallPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_FirewallPolicies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/AsyncListPaged.java new file mode 100644 index 000000000000..0241dc1f0a94 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_List_Paged_async] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.FirewallPolicyList; +import com.google.cloud.compute.v1.ListFirewallPoliciesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + ListFirewallPoliciesRequest request = + ListFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setParentId("parentId1175162725") + .setReturnPartialSuccess(true) + .build(); + while (true) { + FirewallPolicyList response = firewallPoliciesClient.listCallable().call(request); + for (FirewallPolicy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_FirewallPolicies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/SyncList.java new file mode 100644 index 000000000000..883c91f9d5a1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_List_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.ListFirewallPoliciesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + ListFirewallPoliciesRequest request = + ListFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setParentId("parentId1175162725") + .setReturnPartialSuccess(true) + .build(); + for (FirewallPolicy element : firewallPoliciesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_FirewallPolicies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/SyncListNoargs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/SyncListNoargs.java new file mode 100644 index 000000000000..66b54dbcb03f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/list/SyncListNoargs.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_List_Noargs_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; + +public class SyncListNoargs { + + public static void main(String[] args) throws Exception { + syncListNoargs(); + } + + public static void syncListNoargs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + for (FirewallPolicy element : firewallPoliciesClient.list().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_FirewallPolicies_List_Noargs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/AsyncListAssociations.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/AsyncListAssociations.java new file mode 100644 index 000000000000..b83cb1b77239 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/AsyncListAssociations.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_ListAssociations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPoliciesListAssociationsResponse; +import com.google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest; + +public class AsyncListAssociations { + + public static void main(String[] args) throws Exception { + asyncListAssociations(); + } + + public static void asyncListAssociations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + ListAssociationsFirewallPolicyRequest request = + ListAssociationsFirewallPolicyRequest.newBuilder() + .setTargetResource("targetResource-1933150017") + .build(); + ApiFuture future = + firewallPoliciesClient.listAssociationsCallable().futureCall(request); + // Do something. + FirewallPoliciesListAssociationsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_ListAssociations_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/SyncListAssociations.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/SyncListAssociations.java new file mode 100644 index 000000000000..0669c76d4704 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/SyncListAssociations.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_ListAssociations_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPoliciesListAssociationsResponse; +import com.google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest; + +public class SyncListAssociations { + + public static void main(String[] args) throws Exception { + syncListAssociations(); + } + + public static void syncListAssociations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + ListAssociationsFirewallPolicyRequest request = + ListAssociationsFirewallPolicyRequest.newBuilder() + .setTargetResource("targetResource-1933150017") + .build(); + FirewallPoliciesListAssociationsResponse response = + firewallPoliciesClient.listAssociations(request); + } + } +} +// [END compute_v1_generated_FirewallPolicies_ListAssociations_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/SyncListAssociationsNoargs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/SyncListAssociationsNoargs.java new file mode 100644 index 000000000000..0d72ab29ca61 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/listassociations/SyncListAssociationsNoargs.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_ListAssociations_Noargs_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPoliciesListAssociationsResponse; + +public class SyncListAssociationsNoargs { + + public static void main(String[] args) throws Exception { + syncListAssociationsNoargs(); + } + + public static void syncListAssociationsNoargs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + FirewallPoliciesListAssociationsResponse response = firewallPoliciesClient.listAssociations(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_ListAssociations_Noargs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/AsyncMove.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/AsyncMove.java new file mode 100644 index 000000000000..eae9c29e54b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/AsyncMove.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Move_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.MoveFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncMove { + + public static void main(String[] args) throws Exception { + asyncMove(); + } + + public static void asyncMove() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + MoveFirewallPolicyRequest request = + MoveFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setParentId("parentId1175162725") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallPoliciesClient.moveCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Move_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/AsyncMoveLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/AsyncMoveLRO.java new file mode 100644 index 000000000000..43396c3d89cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/AsyncMoveLRO.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Move_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.MoveFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncMoveLRO { + + public static void main(String[] args) throws Exception { + asyncMoveLRO(); + } + + public static void asyncMoveLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + MoveFirewallPolicyRequest request = + MoveFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setParentId("parentId1175162725") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.moveOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Move_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/SyncMove.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/SyncMove.java new file mode 100644 index 000000000000..4a611b3a82f8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/SyncMove.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Move_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.MoveFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncMove { + + public static void main(String[] args) throws Exception { + syncMove(); + } + + public static void syncMove() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + MoveFirewallPolicyRequest request = + MoveFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setParentId("parentId1175162725") + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.moveAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Move_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/SyncMoveStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/SyncMoveStringString.java new file mode 100644 index 000000000000..3fa0ffd8b145 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/move/SyncMoveStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Move_StringString_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncMoveStringString { + + public static void main(String[] args) throws Exception { + syncMoveStringString(); + } + + public static void syncMoveStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + String parentId = "parentId1175162725"; + Operation response = firewallPoliciesClient.moveAsync(firewallPolicy, parentId).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Move_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/AsyncPatch.java new file mode 100644 index 000000000000..1c5b621afbfa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.PatchFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + PatchFirewallPolicyRequest request = + PatchFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallPoliciesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..f9ad985d29e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/AsyncPatchLRO.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchFirewallPolicyRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + PatchFirewallPolicyRequest request = + PatchFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/SyncPatch.java new file mode 100644 index 000000000000..3d6a443597d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/SyncPatch.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Patch_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchFirewallPolicyRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + PatchFirewallPolicyRequest request = + PatchFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/SyncPatchStringFirewallpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/SyncPatchStringFirewallpolicy.java new file mode 100644 index 000000000000..01cfb364b409 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patch/SyncPatchStringFirewallpolicy.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_Patch_StringFirewallpolicy_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringFirewallpolicy { + + public static void main(String[] args) throws Exception { + syncPatchStringFirewallpolicy(); + } + + public static void syncPatchStringFirewallpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicy firewallPolicyResource = FirewallPolicy.newBuilder().build(); + Operation response = + firewallPoliciesClient.patchAsync(firewallPolicy, firewallPolicyResource).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_Patch_StringFirewallpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/AsyncPatchRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/AsyncPatchRule.java new file mode 100644 index 000000000000..d617ebad0dd3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/AsyncPatchRule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_PatchRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncPatchRule { + + public static void main(String[] args) throws Exception { + asyncPatchRule(); + } + + public static void asyncPatchRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + PatchRuleFirewallPolicyRequest request = + PatchRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallPoliciesClient.patchRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_PatchRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/AsyncPatchRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/AsyncPatchRuleLRO.java new file mode 100644 index 000000000000..bda7770290a5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/AsyncPatchRuleLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_PatchRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest; + +public class AsyncPatchRuleLRO { + + public static void main(String[] args) throws Exception { + asyncPatchRuleLRO(); + } + + public static void asyncPatchRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + PatchRuleFirewallPolicyRequest request = + PatchRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.patchRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_PatchRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/SyncPatchRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/SyncPatchRule.java new file mode 100644 index 000000000000..2f682b540158 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/SyncPatchRule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_PatchRule_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest; + +public class SyncPatchRule { + + public static void main(String[] args) throws Exception { + syncPatchRule(); + } + + public static void syncPatchRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + PatchRuleFirewallPolicyRequest request = + PatchRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.patchRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_PatchRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/SyncPatchRuleStringFirewallpolicyrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/SyncPatchRuleStringFirewallpolicyrule.java new file mode 100644 index 000000000000..6b78fb7695c8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/patchrule/SyncPatchRuleStringFirewallpolicyrule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_PatchRule_StringFirewallpolicyrule_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchRuleStringFirewallpolicyrule { + + public static void main(String[] args) throws Exception { + syncPatchRuleStringFirewallpolicyrule(); + } + + public static void syncPatchRuleStringFirewallpolicyrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule firewallPolicyRuleResource = FirewallPolicyRule.newBuilder().build(); + Operation response = + firewallPoliciesClient.patchRuleAsync(firewallPolicy, firewallPolicyRuleResource).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_PatchRule_StringFirewallpolicyrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/AsyncRemoveAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/AsyncRemoveAssociation.java new file mode 100644 index 000000000000..02d74c5f24b3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/AsyncRemoveAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_RemoveAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveAssociation { + + public static void main(String[] args) throws Exception { + asyncRemoveAssociation(); + } + + public static void asyncRemoveAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + RemoveAssociationFirewallPolicyRequest request = + RemoveAssociationFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + firewallPoliciesClient.removeAssociationCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_RemoveAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java new file mode 100644 index 000000000000..8d5faa843b31 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/AsyncRemoveAssociationLRO.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_RemoveAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest; + +public class AsyncRemoveAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveAssociationLRO(); + } + + public static void asyncRemoveAssociationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + RemoveAssociationFirewallPolicyRequest request = + RemoveAssociationFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.removeAssociationOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_RemoveAssociation_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/SyncRemoveAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/SyncRemoveAssociation.java new file mode 100644 index 000000000000..c5e743888eb4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/SyncRemoveAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_RemoveAssociation_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest; + +public class SyncRemoveAssociation { + + public static void main(String[] args) throws Exception { + syncRemoveAssociation(); + } + + public static void syncRemoveAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + RemoveAssociationFirewallPolicyRequest request = + RemoveAssociationFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.removeAssociationAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_RemoveAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/SyncRemoveAssociationString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/SyncRemoveAssociationString.java new file mode 100644 index 000000000000..378fa2deb268 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removeassociation/SyncRemoveAssociationString.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_RemoveAssociation_String_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncRemoveAssociationString { + + public static void main(String[] args) throws Exception { + syncRemoveAssociationString(); + } + + public static void syncRemoveAssociationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = firewallPoliciesClient.removeAssociationAsync(firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_RemoveAssociation_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/AsyncRemoveRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/AsyncRemoveRule.java new file mode 100644 index 000000000000..0264f0cc2d05 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/AsyncRemoveRule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_RemoveRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveRule { + + public static void main(String[] args) throws Exception { + asyncRemoveRule(); + } + + public static void asyncRemoveRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + RemoveRuleFirewallPolicyRequest request = + RemoveRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallPoliciesClient.removeRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_RemoveRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/AsyncRemoveRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/AsyncRemoveRuleLRO.java new file mode 100644 index 000000000000..d14795d74999 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/AsyncRemoveRuleLRO.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_RemoveRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest; + +public class AsyncRemoveRuleLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveRuleLRO(); + } + + public static void asyncRemoveRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + RemoveRuleFirewallPolicyRequest request = + RemoveRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallPoliciesClient.removeRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_RemoveRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/SyncRemoveRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/SyncRemoveRule.java new file mode 100644 index 000000000000..9f90af8b6be3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/SyncRemoveRule.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_RemoveRule_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest; + +public class SyncRemoveRule { + + public static void main(String[] args) throws Exception { + syncRemoveRule(); + } + + public static void syncRemoveRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + RemoveRuleFirewallPolicyRequest request = + RemoveRuleFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setRequestId("requestId693933066") + .build(); + Operation response = firewallPoliciesClient.removeRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_RemoveRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/SyncRemoveRuleString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/SyncRemoveRuleString.java new file mode 100644 index 000000000000..a40f91015a2f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/removerule/SyncRemoveRuleString.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_RemoveRule_String_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncRemoveRuleString { + + public static void main(String[] args) throws Exception { + syncRemoveRuleString(); + } + + public static void syncRemoveRuleString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = firewallPoliciesClient.removeRuleAsync(firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_RemoveRule_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..e908c6675efe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.GlobalOrganizationSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + SetIamPolicyFirewallPolicyRequest request = + SetIamPolicyFirewallPolicyRequest.newBuilder() + .setGlobalOrganizationSetPolicyRequestResource( + GlobalOrganizationSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = firewallPoliciesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..825c453df8c3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_SetIamPolicy_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.GlobalOrganizationSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + SetIamPolicyFirewallPolicyRequest request = + SetIamPolicyFirewallPolicyRequest.newBuilder() + .setGlobalOrganizationSetPolicyRequestResource( + GlobalOrganizationSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = firewallPoliciesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_FirewallPolicies_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/SyncSetIamPolicyStringGlobalorganizationsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/SyncSetIamPolicyStringGlobalorganizationsetpolicyrequest.java new file mode 100644 index 000000000000..de0efcae03b8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/setiampolicy/SyncSetIamPolicyStringGlobalorganizationsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_SetIamPolicy_StringGlobalorganizationsetpolicyrequest_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.GlobalOrganizationSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; + +public class SyncSetIamPolicyStringGlobalorganizationsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringGlobalorganizationsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringGlobalorganizationsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String resource = "resource-341064690"; + GlobalOrganizationSetPolicyRequest globalOrganizationSetPolicyRequestResource = + GlobalOrganizationSetPolicyRequest.newBuilder().build(); + Policy response = + firewallPoliciesClient.setIamPolicy(resource, globalOrganizationSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_FirewallPolicies_SetIamPolicy_StringGlobalorganizationsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..e78f13f620c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/AsyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + TestIamPermissionsFirewallPolicyRequest request = + TestIamPermissionsFirewallPolicyRequest.newBuilder() + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + firewallPoliciesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_FirewallPolicies_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..c80568d4f40e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_TestIamPermissions_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + TestIamPermissionsFirewallPolicyRequest request = + TestIamPermissionsFirewallPolicyRequest.newBuilder() + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = firewallPoliciesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_FirewallPolicies_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/SyncTestIamPermissionsStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/SyncTestIamPermissionsStringTestpermissionsrequest.java new file mode 100644 index 000000000000..cf370bfb12aa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpolicies/testiampermissions/SyncTestIamPermissionsStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPolicies_TestIamPermissions_StringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.FirewallPoliciesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.create()) { + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + firewallPoliciesClient.testIamPermissions(resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_FirewallPolicies_TestIamPermissions_StringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpoliciessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpoliciessettings/get/SyncGet.java new file mode 100644 index 000000000000..f4ffbd7a237f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallpoliciessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_FirewallPoliciesSettings_Get_sync] +import com.google.cloud.compute.v1.FirewallPoliciesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FirewallPoliciesSettings.Builder firewallPoliciesSettingsBuilder = + FirewallPoliciesSettings.newBuilder(); + firewallPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + firewallPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FirewallPoliciesSettings firewallPoliciesSettings = firewallPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_FirewallPoliciesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..aa0c84c1f191 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.FirewallsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FirewallsSettings firewallsSettings = + FirewallsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + FirewallsClient firewallsClient = FirewallsClient.create(firewallsSettings); + } +} +// [END compute_v1_generated_Firewalls_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..c4cb8b59a2f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.FirewallsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FirewallsSettings firewallsSettings = + FirewallsSettings.newBuilder().setEndpoint(myEndpoint).build(); + FirewallsClient firewallsClient = FirewallsClient.create(firewallsSettings); + } +} +// [END compute_v1_generated_Firewalls_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/AsyncDelete.java new file mode 100644 index 000000000000..59e7c0a53982 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteFirewallRequest; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + DeleteFirewallRequest request = + DeleteFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..d7d8871ce931 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteFirewallRequest; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + DeleteFirewallRequest request = + DeleteFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/SyncDelete.java new file mode 100644 index 000000000000..cfb79a33ad32 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Delete_sync] +import com.google.cloud.compute.v1.DeleteFirewallRequest; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + DeleteFirewallRequest request = + DeleteFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = firewallsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Firewalls_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..69b77fadabf8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Delete_StringString_sync] +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + String project = "project-309310695"; + String firewall = "firewall-562725632"; + Operation response = firewallsClient.deleteAsync(project, firewall).get(); + } + } +} +// [END compute_v1_generated_Firewalls_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/AsyncGet.java new file mode 100644 index 000000000000..b106d650f95e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.GetFirewallRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + GetFirewallRequest request = + GetFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setProject("project-309310695") + .build(); + ApiFuture future = firewallsClient.getCallable().futureCall(request); + // Do something. + Firewall response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/SyncGet.java new file mode 100644 index 000000000000..042354a6aa0b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Get_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.GetFirewallRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + GetFirewallRequest request = + GetFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setProject("project-309310695") + .build(); + Firewall response = firewallsClient.get(request); + } + } +} +// [END compute_v1_generated_Firewalls_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/SyncGetStringString.java new file mode 100644 index 000000000000..a0db7bb51df5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Get_StringString_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + String project = "project-309310695"; + String firewall = "firewall-562725632"; + Firewall response = firewallsClient.get(project, firewall); + } + } +} +// [END compute_v1_generated_Firewalls_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/AsyncInsert.java new file mode 100644 index 000000000000..b1471b2fb166 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.InsertFirewallRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + InsertFirewallRequest request = + InsertFirewallRequest.newBuilder() + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..5b87ab8eedd3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.InsertFirewallRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + InsertFirewallRequest request = + InsertFirewallRequest.newBuilder() + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/SyncInsert.java new file mode 100644 index 000000000000..4832786f0072 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Insert_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.InsertFirewallRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + InsertFirewallRequest request = + InsertFirewallRequest.newBuilder() + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = firewallsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Firewalls_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/SyncInsertStringFirewall.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/SyncInsertStringFirewall.java new file mode 100644 index 000000000000..25c1503550d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/insert/SyncInsertStringFirewall.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Insert_StringFirewall_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringFirewall { + + public static void main(String[] args) throws Exception { + syncInsertStringFirewall(); + } + + public static void syncInsertStringFirewall() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + String project = "project-309310695"; + Firewall firewallResource = Firewall.newBuilder().build(); + Operation response = firewallsClient.insertAsync(project, firewallResource).get(); + } + } +} +// [END compute_v1_generated_Firewalls_Insert_StringFirewall_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/AsyncList.java new file mode 100644 index 000000000000..557d57651864 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.ListFirewallsRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + ListFirewallsRequest request = + ListFirewallsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = firewallsClient.listPagedCallable().futureCall(request); + // Do something. + for (Firewall element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Firewalls_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/AsyncListPaged.java new file mode 100644 index 000000000000..6e8817302838 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_List_Paged_async] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallList; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.ListFirewallsRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + ListFirewallsRequest request = + ListFirewallsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + FirewallList response = firewallsClient.listCallable().call(request); + for (Firewall element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Firewalls_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/SyncList.java new file mode 100644 index 000000000000..ee81bb18e370 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_List_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.ListFirewallsRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + ListFirewallsRequest request = + ListFirewallsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Firewall element : firewallsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Firewalls_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/SyncListString.java new file mode 100644 index 000000000000..b5f39330497a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_List_String_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + String project = "project-309310695"; + for (Firewall element : firewallsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Firewalls_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/AsyncPatch.java new file mode 100644 index 000000000000..8551408e35de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.PatchFirewallRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + PatchFirewallRequest request = + PatchFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..05adaeed6ee0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchFirewallRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + PatchFirewallRequest request = + PatchFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/SyncPatch.java new file mode 100644 index 000000000000..5a0f4e5ef7c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Patch_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchFirewallRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + PatchFirewallRequest request = + PatchFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = firewallsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_Firewalls_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/SyncPatchStringStringFirewall.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/SyncPatchStringStringFirewall.java new file mode 100644 index 000000000000..6adf487dbb35 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/patch/SyncPatchStringStringFirewall.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Patch_StringStringFirewall_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringFirewall { + + public static void main(String[] args) throws Exception { + syncPatchStringStringFirewall(); + } + + public static void syncPatchStringStringFirewall() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + String project = "project-309310695"; + String firewall = "firewall-562725632"; + Firewall firewallResource = Firewall.newBuilder().build(); + Operation response = firewallsClient.patchAsync(project, firewall, firewallResource).get(); + } + } +} +// [END compute_v1_generated_Firewalls_Patch_StringStringFirewall_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/AsyncUpdate.java new file mode 100644 index 000000000000..f94ab683cf6a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/AsyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.UpdateFirewallRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + UpdateFirewallRequest request = + UpdateFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = firewallsClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..c1ff4cc2cafa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/AsyncUpdateLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateFirewallRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + UpdateFirewallRequest request = + UpdateFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + firewallsClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Firewalls_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/SyncUpdate.java new file mode 100644 index 000000000000..49ebcce94141 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Update_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateFirewallRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + UpdateFirewallRequest request = + UpdateFirewallRequest.newBuilder() + .setFirewall("firewall-562725632") + .setFirewallResource(Firewall.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = firewallsClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_Firewalls_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/SyncUpdateStringStringFirewall.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/SyncUpdateStringStringFirewall.java new file mode 100644 index 000000000000..73542e14356e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewalls/update/SyncUpdateStringStringFirewall.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.compute.v1.samples; + +// [START compute_v1_generated_Firewalls_Update_StringStringFirewall_sync] +import com.google.cloud.compute.v1.Firewall; +import com.google.cloud.compute.v1.FirewallsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateStringStringFirewall { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringFirewall(); + } + + public static void syncUpdateStringStringFirewall() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (FirewallsClient firewallsClient = FirewallsClient.create()) { + String project = "project-309310695"; + String firewall = "firewall-562725632"; + Firewall firewallResource = Firewall.newBuilder().build(); + Operation response = firewallsClient.updateAsync(project, firewall, firewallResource).get(); + } + } +} +// [END compute_v1_generated_Firewalls_Update_StringStringFirewall_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallssettings/get/SyncGet.java new file mode 100644 index 000000000000..e38aae3e0ed9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/firewallssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_FirewallsSettings_Get_sync] +import com.google.cloud.compute.v1.FirewallsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FirewallsSettings.Builder firewallsSettingsBuilder = FirewallsSettings.newBuilder(); + firewallsSettingsBuilder + .getSettings() + .setRetrySettings( + firewallsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FirewallsSettings firewallsSettings = firewallsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_FirewallsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..215db0d9b4a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListForwardingRulesRequest; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ForwardingRulesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + AggregatedListForwardingRulesRequest request = + AggregatedListForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + forwardingRulesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ForwardingRules_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..59c9459585bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListForwardingRulesRequest; +import com.google.cloud.compute.v1.ForwardingRuleAggregatedList; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ForwardingRulesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + AggregatedListForwardingRulesRequest request = + AggregatedListForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ForwardingRuleAggregatedList response = + forwardingRulesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_ForwardingRules_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..6bdfbf35df6e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListForwardingRulesRequest; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ForwardingRulesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + AggregatedListForwardingRulesRequest request = + AggregatedListForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + forwardingRulesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ForwardingRules_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..73d0e3dff1e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_AggregatedList_String_sync] +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ForwardingRulesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + forwardingRulesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ForwardingRules_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..2b202cf9f6c4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ForwardingRulesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ForwardingRulesSettings forwardingRulesSettings = + ForwardingRulesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ForwardingRulesClient forwardingRulesClient = + ForwardingRulesClient.create(forwardingRulesSettings); + } +} +// [END compute_v1_generated_ForwardingRules_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..1deeefba0af1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ForwardingRulesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ForwardingRulesSettings forwardingRulesSettings = + ForwardingRulesSettings.newBuilder().setEndpoint(myEndpoint).build(); + ForwardingRulesClient forwardingRulesClient = + ForwardingRulesClient.create(forwardingRulesSettings); + } +} +// [END compute_v1_generated_ForwardingRules_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/AsyncDelete.java new file mode 100644 index 000000000000..cd93e5795608 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteForwardingRuleRequest; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + DeleteForwardingRuleRequest request = + DeleteForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = forwardingRulesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..9a3269699974 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteForwardingRuleRequest; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + DeleteForwardingRuleRequest request = + DeleteForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + forwardingRulesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/SyncDelete.java new file mode 100644 index 000000000000..46d38a0644e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Delete_sync] +import com.google.cloud.compute.v1.DeleteForwardingRuleRequest; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + DeleteForwardingRuleRequest request = + DeleteForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = forwardingRulesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..76f0315c00ec --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String forwardingRule = "forwardingRule-1429104743"; + Operation response = forwardingRulesClient.deleteAsync(project, region, forwardingRule).get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/AsyncGet.java new file mode 100644 index 000000000000..2a5324f63c34 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.GetForwardingRuleRequest; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + GetForwardingRuleRequest request = + GetForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = forwardingRulesClient.getCallable().futureCall(request); + // Do something. + ForwardingRule response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/SyncGet.java new file mode 100644 index 000000000000..a5db9d0ce27e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Get_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.GetForwardingRuleRequest; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + GetForwardingRuleRequest request = + GetForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ForwardingRule response = forwardingRulesClient.get(request); + } + } +} +// [END compute_v1_generated_ForwardingRules_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..9ef0df6c8323 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Get_StringStringString_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String forwardingRule = "forwardingRule-1429104743"; + ForwardingRule response = forwardingRulesClient.get(project, region, forwardingRule); + } + } +} +// [END compute_v1_generated_ForwardingRules_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/AsyncInsert.java new file mode 100644 index 000000000000..af2f5603435b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.InsertForwardingRuleRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + InsertForwardingRuleRequest request = + InsertForwardingRuleRequest.newBuilder() + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = forwardingRulesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..e6531389d075 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.InsertForwardingRuleRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + InsertForwardingRuleRequest request = + InsertForwardingRuleRequest.newBuilder() + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + forwardingRulesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/SyncInsert.java new file mode 100644 index 000000000000..496c5c70ed69 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Insert_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.InsertForwardingRuleRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + InsertForwardingRuleRequest request = + InsertForwardingRuleRequest.newBuilder() + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = forwardingRulesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/SyncInsertStringStringForwardingrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/SyncInsertStringStringForwardingrule.java new file mode 100644 index 000000000000..694f7978d5ab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/insert/SyncInsertStringStringForwardingrule.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Insert_StringStringForwardingrule_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringForwardingrule { + + public static void main(String[] args) throws Exception { + syncInsertStringStringForwardingrule(); + } + + public static void syncInsertStringStringForwardingrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + ForwardingRule forwardingRuleResource = ForwardingRule.newBuilder().build(); + Operation response = + forwardingRulesClient.insertAsync(project, region, forwardingRuleResource).get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Insert_StringStringForwardingrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/AsyncList.java new file mode 100644 index 000000000000..34eb2cff2923 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ListForwardingRulesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + ListForwardingRulesRequest request = + ListForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + forwardingRulesClient.listPagedCallable().futureCall(request); + // Do something. + for (ForwardingRule element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ForwardingRules_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/AsyncListPaged.java new file mode 100644 index 000000000000..eef72f584773 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_List_Paged_async] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRuleList; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ListForwardingRulesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + ListForwardingRulesRequest request = + ListForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ForwardingRuleList response = forwardingRulesClient.listCallable().call(request); + for (ForwardingRule element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_ForwardingRules_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/SyncList.java new file mode 100644 index 000000000000..f7f0ee90ed7d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_List_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.ListForwardingRulesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + ListForwardingRulesRequest request = + ListForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (ForwardingRule element : forwardingRulesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ForwardingRules_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/SyncListStringString.java new file mode 100644 index 000000000000..6bbec4124d4c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_List_StringString_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (ForwardingRule element : forwardingRulesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ForwardingRules_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/AsyncPatch.java new file mode 100644 index 000000000000..ec2ca07efa8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.PatchForwardingRuleRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + PatchForwardingRuleRequest request = + PatchForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = forwardingRulesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..30dce3625c91 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchForwardingRuleRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + PatchForwardingRuleRequest request = + PatchForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + forwardingRulesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/SyncPatch.java new file mode 100644 index 000000000000..8565562de693 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Patch_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchForwardingRuleRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + PatchForwardingRuleRequest request = + PatchForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = forwardingRulesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/SyncPatchStringStringStringForwardingrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/SyncPatchStringStringStringForwardingrule.java new file mode 100644 index 000000000000..665ce48a3930 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/patch/SyncPatchStringStringStringForwardingrule.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_Patch_StringStringStringForwardingrule_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringStringForwardingrule { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringForwardingrule(); + } + + public static void syncPatchStringStringStringForwardingrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String forwardingRule = "forwardingRule-1429104743"; + ForwardingRule forwardingRuleResource = ForwardingRule.newBuilder().build(); + Operation response = + forwardingRulesClient + .patchAsync(project, region, forwardingRule, forwardingRuleResource) + .get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_Patch_StringStringStringForwardingrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..84cbd0e6ada3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsForwardingRuleRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + SetLabelsForwardingRuleRequest request = + SetLabelsForwardingRuleRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + ApiFuture future = forwardingRulesClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..db6535704f50 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsForwardingRuleRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + SetLabelsForwardingRuleRequest request = + SetLabelsForwardingRuleRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + OperationFuture future = + forwardingRulesClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..df2fefdd9bf5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_SetLabels_sync] +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsForwardingRuleRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + SetLabelsForwardingRuleRequest request = + SetLabelsForwardingRuleRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + Operation response = forwardingRulesClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java new file mode 100644 index 000000000000..1f4a78fde62a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_SetLabels_StringStringStringRegionsetlabelsrequest_sync] +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; + +public class SyncSetLabelsStringStringStringRegionsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringRegionsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringRegionsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetLabelsRequest regionSetLabelsRequestResource = + RegionSetLabelsRequest.newBuilder().build(); + Operation response = + forwardingRulesClient + .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_SetLabels_StringStringStringRegionsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/AsyncSetTarget.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/AsyncSetTarget.java new file mode 100644 index 000000000000..95defde4bdc4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/AsyncSetTarget.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_SetTarget_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.SetTargetForwardingRuleRequest; +import com.google.cloud.compute.v1.TargetReference; +import com.google.longrunning.Operation; + +public class AsyncSetTarget { + + public static void main(String[] args) throws Exception { + asyncSetTarget(); + } + + public static void asyncSetTarget() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + SetTargetForwardingRuleRequest request = + SetTargetForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + ApiFuture future = forwardingRulesClient.setTargetCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_SetTarget_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/AsyncSetTargetLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/AsyncSetTargetLRO.java new file mode 100644 index 000000000000..226caf3b785e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/AsyncSetTargetLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_SetTarget_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetTargetForwardingRuleRequest; +import com.google.cloud.compute.v1.TargetReference; + +public class AsyncSetTargetLRO { + + public static void main(String[] args) throws Exception { + asyncSetTargetLRO(); + } + + public static void asyncSetTargetLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + SetTargetForwardingRuleRequest request = + SetTargetForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + OperationFuture future = + forwardingRulesClient.setTargetOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_SetTarget_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/SyncSetTarget.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/SyncSetTarget.java new file mode 100644 index 000000000000..af69683db779 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/SyncSetTarget.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_SetTarget_sync] +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetTargetForwardingRuleRequest; +import com.google.cloud.compute.v1.TargetReference; + +public class SyncSetTarget { + + public static void main(String[] args) throws Exception { + syncSetTarget(); + } + + public static void syncSetTarget() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + SetTargetForwardingRuleRequest request = + SetTargetForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + Operation response = forwardingRulesClient.setTargetAsync(request).get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_SetTarget_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/SyncSetTargetStringStringStringTargetreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/SyncSetTargetStringStringStringTargetreference.java new file mode 100644 index 000000000000..36496d5081dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrules/settarget/SyncSetTargetStringStringStringTargetreference.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRules_SetTarget_StringStringStringTargetreference_sync] +import com.google.cloud.compute.v1.ForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetReference; + +public class SyncSetTargetStringStringStringTargetreference { + + public static void main(String[] args) throws Exception { + syncSetTargetStringStringStringTargetreference(); + } + + public static void syncSetTargetStringStringStringTargetreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String forwardingRule = "forwardingRule-1429104743"; + TargetReference targetReferenceResource = TargetReference.newBuilder().build(); + Operation response = + forwardingRulesClient + .setTargetAsync(project, region, forwardingRule, targetReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_ForwardingRules_SetTarget_StringStringStringTargetreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrulessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrulessettings/get/SyncGet.java new file mode 100644 index 000000000000..c4a175d36c07 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/forwardingrulessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ForwardingRulesSettings_Get_sync] +import com.google.cloud.compute.v1.ForwardingRulesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ForwardingRulesSettings.Builder forwardingRulesSettingsBuilder = + ForwardingRulesSettings.newBuilder(); + forwardingRulesSettingsBuilder + .getSettings() + .setRetrySettings( + forwardingRulesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ForwardingRulesSettings forwardingRulesSettings = forwardingRulesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ForwardingRulesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b3178c1a71fe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.GlobalAddressesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalAddressesSettings globalAddressesSettings = + GlobalAddressesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GlobalAddressesClient globalAddressesClient = + GlobalAddressesClient.create(globalAddressesSettings); + } +} +// [END compute_v1_generated_GlobalAddresses_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..80f464915772 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.GlobalAddressesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalAddressesSettings globalAddressesSettings = + GlobalAddressesSettings.newBuilder().setEndpoint(myEndpoint).build(); + GlobalAddressesClient globalAddressesClient = + GlobalAddressesClient.create(globalAddressesSettings); + } +} +// [END compute_v1_generated_GlobalAddresses_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/AsyncDelete.java new file mode 100644 index 000000000000..c5967d85defb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteGlobalAddressRequest; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + DeleteGlobalAddressRequest request = + DeleteGlobalAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = globalAddressesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..836502968de0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteGlobalAddressRequest; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + DeleteGlobalAddressRequest request = + DeleteGlobalAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalAddressesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/SyncDelete.java new file mode 100644 index 000000000000..cc1610a454f3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Delete_sync] +import com.google.cloud.compute.v1.DeleteGlobalAddressRequest; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + DeleteGlobalAddressRequest request = + DeleteGlobalAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = globalAddressesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..8bfd28552c17 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Delete_StringString_sync] +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + String project = "project-309310695"; + String address = "address-1147692044"; + Operation response = globalAddressesClient.deleteAsync(project, address).get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/AsyncGet.java new file mode 100644 index 000000000000..cc8006844f17 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GetGlobalAddressRequest; +import com.google.cloud.compute.v1.GlobalAddressesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + GetGlobalAddressRequest request = + GetGlobalAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .build(); + ApiFuture
future = globalAddressesClient.getCallable().futureCall(request); + // Do something. + Address response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/SyncGet.java new file mode 100644 index 000000000000..85fbf88158d6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Get_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GetGlobalAddressRequest; +import com.google.cloud.compute.v1.GlobalAddressesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + GetGlobalAddressRequest request = + GetGlobalAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .build(); + Address response = globalAddressesClient.get(request); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/SyncGetStringString.java new file mode 100644 index 000000000000..677dabec0ec2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Get_StringString_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GlobalAddressesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + String project = "project-309310695"; + String address = "address-1147692044"; + Address response = globalAddressesClient.get(project, address); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/AsyncInsert.java new file mode 100644 index 000000000000..a08415e6a91f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.InsertGlobalAddressRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + InsertGlobalAddressRequest request = + InsertGlobalAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = globalAddressesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..fffcd8b9add8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.InsertGlobalAddressRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + InsertGlobalAddressRequest request = + InsertGlobalAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalAddressesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/SyncInsert.java new file mode 100644 index 000000000000..0f5672e8b581 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Insert_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.InsertGlobalAddressRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + InsertGlobalAddressRequest request = + InsertGlobalAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = globalAddressesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/SyncInsertStringAddress.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/SyncInsertStringAddress.java new file mode 100644 index 000000000000..c0d75adf615a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/insert/SyncInsertStringAddress.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_Insert_StringAddress_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringAddress { + + public static void main(String[] args) throws Exception { + syncInsertStringAddress(); + } + + public static void syncInsertStringAddress() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + String project = "project-309310695"; + Address addressResource = Address.newBuilder().build(); + Operation response = globalAddressesClient.insertAsync(project, addressResource).get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_Insert_StringAddress_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/AsyncList.java new file mode 100644 index 000000000000..0fa71e2576c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.ListGlobalAddressesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + ListGlobalAddressesRequest request = + ListGlobalAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture
future = globalAddressesClient.listPagedCallable().futureCall(request); + // Do something. + for (Address element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalAddresses_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/AsyncListPaged.java new file mode 100644 index 000000000000..87463d09433b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_List_Paged_async] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressList; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.ListGlobalAddressesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + ListGlobalAddressesRequest request = + ListGlobalAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + AddressList response = globalAddressesClient.listCallable().call(request); + for (Address element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_GlobalAddresses_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/SyncList.java new file mode 100644 index 000000000000..f174785eecdf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_List_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.ListGlobalAddressesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + ListGlobalAddressesRequest request = + ListGlobalAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Address element : globalAddressesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalAddresses_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/SyncListString.java new file mode 100644 index 000000000000..fb6101f1a751 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_List_String_sync] +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.GlobalAddressesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + String project = "project-309310695"; + for (Address element : globalAddressesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalAddresses_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..4c5f9721afc9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/AsyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsGlobalAddressRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + SetLabelsGlobalAddressRequest request = + SetLabelsGlobalAddressRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = globalAddressesClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..50d80e94511e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/AsyncSetLabelsLRO.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsGlobalAddressRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + SetLabelsGlobalAddressRequest request = + SetLabelsGlobalAddressRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + OperationFuture future = + globalAddressesClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..f0e531b1e638 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/SyncSetLabels.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_SetLabels_sync] +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsGlobalAddressRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + SetLabelsGlobalAddressRequest request = + SetLabelsGlobalAddressRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Operation response = globalAddressesClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java new file mode 100644 index 000000000000..8ac1044d4ea0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddresses_SetLabels_StringStringGlobalsetlabelsrequest_sync] +import com.google.cloud.compute.v1.GlobalAddressesClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetLabelsStringStringGlobalsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringGlobalsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringGlobalsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetLabelsRequest globalSetLabelsRequestResource = + GlobalSetLabelsRequest.newBuilder().build(); + Operation response = + globalAddressesClient + .setLabelsAsync(project, resource, globalSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalAddresses_SetLabels_StringStringGlobalsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdressessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdressessettings/get/SyncGet.java new file mode 100644 index 000000000000..9cd8eca576c7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdressessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalAddressesSettings_Get_sync] +import com.google.cloud.compute.v1.GlobalAddressesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalAddressesSettings.Builder globalAddressesSettingsBuilder = + GlobalAddressesSettings.newBuilder(); + globalAddressesSettingsBuilder + .getSettings() + .setRetrySettings( + globalAddressesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalAddressesSettings globalAddressesSettings = globalAddressesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalAddressesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..f759eef1c812 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.GlobalForwardingRulesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalForwardingRulesSettings globalForwardingRulesSettings = + GlobalForwardingRulesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create(globalForwardingRulesSettings); + } +} +// [END compute_v1_generated_GlobalForwardingRules_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..72b60379cd76 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.GlobalForwardingRulesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalForwardingRulesSettings globalForwardingRulesSettings = + GlobalForwardingRulesSettings.newBuilder().setEndpoint(myEndpoint).build(); + GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create(globalForwardingRulesSettings); + } +} +// [END compute_v1_generated_GlobalForwardingRules_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/AsyncDelete.java new file mode 100644 index 000000000000..a1090a24ac3d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + DeleteGlobalForwardingRuleRequest request = + DeleteGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalForwardingRulesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..daec8605b38c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + DeleteGlobalForwardingRuleRequest request = + DeleteGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalForwardingRulesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/SyncDelete.java new file mode 100644 index 000000000000..15893a4a5a60 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Delete_sync] +import com.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + DeleteGlobalForwardingRuleRequest request = + DeleteGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = globalForwardingRulesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..f38a76ea4712 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/delete/SyncDeleteStringString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Delete_StringString_sync] +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + String project = "project-309310695"; + String forwardingRule = "forwardingRule-1429104743"; + Operation response = globalForwardingRulesClient.deleteAsync(project, forwardingRule).get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/AsyncGet.java new file mode 100644 index 000000000000..e2439fb31fe3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GetGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + GetGlobalForwardingRuleRequest request = + GetGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .build(); + ApiFuture future = + globalForwardingRulesClient.getCallable().futureCall(request); + // Do something. + ForwardingRule response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/SyncGet.java new file mode 100644 index 000000000000..1dd2fbc68049 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Get_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GetGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + GetGlobalForwardingRuleRequest request = + GetGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .build(); + ForwardingRule response = globalForwardingRulesClient.get(request); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/SyncGetStringString.java new file mode 100644 index 000000000000..58187be0154f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/get/SyncGetStringString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Get_StringString_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + String project = "project-309310695"; + String forwardingRule = "forwardingRule-1429104743"; + ForwardingRule response = globalForwardingRulesClient.get(project, forwardingRule); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/AsyncInsert.java new file mode 100644 index 000000000000..67dfe34714de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/AsyncInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + InsertGlobalForwardingRuleRequest request = + InsertGlobalForwardingRuleRequest.newBuilder() + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalForwardingRulesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..1d403b57c919 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + InsertGlobalForwardingRuleRequest request = + InsertGlobalForwardingRuleRequest.newBuilder() + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalForwardingRulesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/SyncInsert.java new file mode 100644 index 000000000000..42b32a0ec904 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Insert_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + InsertGlobalForwardingRuleRequest request = + InsertGlobalForwardingRuleRequest.newBuilder() + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = globalForwardingRulesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/SyncInsertStringForwardingrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/SyncInsertStringForwardingrule.java new file mode 100644 index 000000000000..3e6a27fea9ac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/insert/SyncInsertStringForwardingrule.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Insert_StringForwardingrule_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringForwardingrule { + + public static void main(String[] args) throws Exception { + syncInsertStringForwardingrule(); + } + + public static void syncInsertStringForwardingrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + String project = "project-309310695"; + ForwardingRule forwardingRuleResource = ForwardingRule.newBuilder().build(); + Operation response = + globalForwardingRulesClient.insertAsync(project, forwardingRuleResource).get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Insert_StringForwardingrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/AsyncList.java new file mode 100644 index 000000000000..73e88dc27d92 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.ListGlobalForwardingRulesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + ListGlobalForwardingRulesRequest request = + ListGlobalForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + globalForwardingRulesClient.listPagedCallable().futureCall(request); + // Do something. + for (ForwardingRule element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/AsyncListPaged.java new file mode 100644 index 000000000000..a5b6515020f8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_List_Paged_async] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.ForwardingRuleList; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.ListGlobalForwardingRulesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + ListGlobalForwardingRulesRequest request = + ListGlobalForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ForwardingRuleList response = globalForwardingRulesClient.listCallable().call(request); + for (ForwardingRule element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/SyncList.java new file mode 100644 index 000000000000..c7d3fb03a0e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_List_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.ListGlobalForwardingRulesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + ListGlobalForwardingRulesRequest request = + ListGlobalForwardingRulesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (ForwardingRule element : globalForwardingRulesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/SyncListString.java new file mode 100644 index 000000000000..4f438a1245ac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_List_String_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + String project = "project-309310695"; + for (ForwardingRule element : globalForwardingRulesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/AsyncPatch.java new file mode 100644 index 000000000000..76fe280d469c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + PatchGlobalForwardingRuleRequest request = + PatchGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = globalForwardingRulesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..6301fc08b68a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + PatchGlobalForwardingRuleRequest request = + PatchGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalForwardingRulesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/SyncPatch.java new file mode 100644 index 000000000000..a7eb3864b45a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Patch_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + PatchGlobalForwardingRuleRequest request = + PatchGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setForwardingRuleResource(ForwardingRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = globalForwardingRulesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/SyncPatchStringStringForwardingrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/SyncPatchStringStringForwardingrule.java new file mode 100644 index 000000000000..30475ed27e1c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/patch/SyncPatchStringStringForwardingrule.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_Patch_StringStringForwardingrule_sync] +import com.google.cloud.compute.v1.ForwardingRule; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringForwardingrule { + + public static void main(String[] args) throws Exception { + syncPatchStringStringForwardingrule(); + } + + public static void syncPatchStringStringForwardingrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + String project = "project-309310695"; + String forwardingRule = "forwardingRule-1429104743"; + ForwardingRule forwardingRuleResource = ForwardingRule.newBuilder().build(); + Operation response = + globalForwardingRulesClient + .patchAsync(project, forwardingRule, forwardingRuleResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_Patch_StringStringForwardingrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..dde66837c2ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + SetLabelsGlobalForwardingRuleRequest request = + SetLabelsGlobalForwardingRuleRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = + globalForwardingRulesClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..d65e0a4f014f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + SetLabelsGlobalForwardingRuleRequest request = + SetLabelsGlobalForwardingRuleRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + OperationFuture future = + globalForwardingRulesClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..f5b82c521026 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_SetLabels_sync] +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + SetLabelsGlobalForwardingRuleRequest request = + SetLabelsGlobalForwardingRuleRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Operation response = globalForwardingRulesClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java new file mode 100644 index 000000000000..ba6d2816d23e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_SetLabels_StringStringGlobalsetlabelsrequest_sync] +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetLabelsStringStringGlobalsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringGlobalsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringGlobalsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetLabelsRequest globalSetLabelsRequestResource = + GlobalSetLabelsRequest.newBuilder().build(); + Operation response = + globalForwardingRulesClient + .setLabelsAsync(project, resource, globalSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_SetLabels_StringStringGlobalsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/AsyncSetTarget.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/AsyncSetTarget.java new file mode 100644 index 000000000000..0f00bbc3de25 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/AsyncSetTarget.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_SetTarget_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.TargetReference; +import com.google.longrunning.Operation; + +public class AsyncSetTarget { + + public static void main(String[] args) throws Exception { + asyncSetTarget(); + } + + public static void asyncSetTarget() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + SetTargetGlobalForwardingRuleRequest request = + SetTargetGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + ApiFuture future = + globalForwardingRulesClient.setTargetCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_SetTarget_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/AsyncSetTargetLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/AsyncSetTargetLRO.java new file mode 100644 index 000000000000..e49ffde6b186 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/AsyncSetTargetLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_SetTarget_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.TargetReference; + +public class AsyncSetTargetLRO { + + public static void main(String[] args) throws Exception { + asyncSetTargetLRO(); + } + + public static void asyncSetTargetLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + SetTargetGlobalForwardingRuleRequest request = + SetTargetGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + OperationFuture future = + globalForwardingRulesClient.setTargetOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_SetTarget_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/SyncSetTarget.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/SyncSetTarget.java new file mode 100644 index 000000000000..1fb8a030ef10 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/SyncSetTarget.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_SetTarget_sync] +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest; +import com.google.cloud.compute.v1.TargetReference; + +public class SyncSetTarget { + + public static void main(String[] args) throws Exception { + syncSetTarget(); + } + + public static void syncSetTarget() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + SetTargetGlobalForwardingRuleRequest request = + SetTargetGlobalForwardingRuleRequest.newBuilder() + .setForwardingRule("forwardingRule-1429104743") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + Operation response = globalForwardingRulesClient.setTargetAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_SetTarget_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/SyncSetTargetStringStringTargetreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/SyncSetTargetStringStringTargetreference.java new file mode 100644 index 000000000000..bf1583113710 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrules/settarget/SyncSetTargetStringStringTargetreference.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRules_SetTarget_StringStringTargetreference_sync] +import com.google.cloud.compute.v1.GlobalForwardingRulesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetReference; + +public class SyncSetTargetStringStringTargetreference { + + public static void main(String[] args) throws Exception { + syncSetTargetStringStringTargetreference(); + } + + public static void syncSetTargetStringStringTargetreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalForwardingRulesClient globalForwardingRulesClient = + GlobalForwardingRulesClient.create()) { + String project = "project-309310695"; + String forwardingRule = "forwardingRule-1429104743"; + TargetReference targetReferenceResource = TargetReference.newBuilder().build(); + Operation response = + globalForwardingRulesClient + .setTargetAsync(project, forwardingRule, targetReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalForwardingRules_SetTarget_StringStringTargetreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrulessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrulessettings/get/SyncGet.java new file mode 100644 index 000000000000..d2e4be2a8365 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalforwardingrulessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalForwardingRulesSettings_Get_sync] +import com.google.cloud.compute.v1.GlobalForwardingRulesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalForwardingRulesSettings.Builder globalForwardingRulesSettingsBuilder = + GlobalForwardingRulesSettings.newBuilder(); + globalForwardingRulesSettingsBuilder + .getSettings() + .setRetrySettings( + globalForwardingRulesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalForwardingRulesSettings globalForwardingRulesSettings = + globalForwardingRulesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalForwardingRulesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpoints.java new file mode 100644 index 000000000000..f92727b47013 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpoints.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_AttachNetworkEndpoints_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncAttachNetworkEndpoints { + + public static void main(String[] args) throws Exception { + asyncAttachNetworkEndpoints(); + } + + public static void asyncAttachNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest request = + AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.newBuilder() + .setGlobalNetworkEndpointGroupsAttachEndpointsRequestResource( + GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build()) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalNetworkEndpointGroupsClient.attachNetworkEndpointsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_AttachNetworkEndpoints_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpointsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpointsLRO.java new file mode 100644 index 000000000000..034a91c0eb49 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpointsLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_AttachNetworkEndpoints_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAttachNetworkEndpointsLRO { + + public static void main(String[] args) throws Exception { + asyncAttachNetworkEndpointsLRO(); + } + + public static void asyncAttachNetworkEndpointsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest request = + AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.newBuilder() + .setGlobalNetworkEndpointGroupsAttachEndpointsRequestResource( + GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build()) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalNetworkEndpointGroupsClient + .attachNetworkEndpointsOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_AttachNetworkEndpoints_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpoints.java new file mode 100644 index 000000000000..f2f7c99642ff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpoints.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_AttachNetworkEndpoints_sync] +import com.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAttachNetworkEndpoints { + + public static void main(String[] args) throws Exception { + syncAttachNetworkEndpoints(); + } + + public static void syncAttachNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest request = + AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.newBuilder() + .setGlobalNetworkEndpointGroupsAttachEndpointsRequestResource( + GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build()) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = + globalNetworkEndpointGroupsClient.attachNetworkEndpointsAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_AttachNetworkEndpoints_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpointsStringStringGlobalnetworkendpointgroupsattachendpointsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpointsStringStringGlobalnetworkendpointgroupsattachendpointsrequest.java new file mode 100644 index 000000000000..b3b69b3794cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpointsStringStringGlobalnetworkendpointgroupsattachendpointsrequest.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_AttachNetworkEndpoints_StringStringGlobalnetworkendpointgroupsattachendpointsrequest_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public +class SyncAttachNetworkEndpointsStringStringGlobalnetworkendpointgroupsattachendpointsrequest { + + public static void main(String[] args) throws Exception { + syncAttachNetworkEndpointsStringStringGlobalnetworkendpointgroupsattachendpointsrequest(); + } + + public static void + syncAttachNetworkEndpointsStringStringGlobalnetworkendpointgroupsattachendpointsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + GlobalNetworkEndpointGroupsAttachEndpointsRequest + globalNetworkEndpointGroupsAttachEndpointsRequestResource = + GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build(); + Operation response = + globalNetworkEndpointGroupsClient + .attachNetworkEndpointsAsync( + project, + networkEndpointGroup, + globalNetworkEndpointGroupsAttachEndpointsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_AttachNetworkEndpoints_StringStringGlobalnetworkendpointgroupsattachendpointsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..c13ccf6d38cc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalNetworkEndpointGroupsSettings globalNetworkEndpointGroupsSettings = + GlobalNetworkEndpointGroupsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create(globalNetworkEndpointGroupsSettings); + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..4776ea10edfa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalNetworkEndpointGroupsSettings globalNetworkEndpointGroupsSettings = + GlobalNetworkEndpointGroupsSettings.newBuilder().setEndpoint(myEndpoint).build(); + GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create(globalNetworkEndpointGroupsSettings); + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/AsyncDelete.java new file mode 100644 index 000000000000..e85862961b7c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + DeleteGlobalNetworkEndpointGroupRequest request = + DeleteGlobalNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalNetworkEndpointGroupsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..6aa715242199 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + DeleteGlobalNetworkEndpointGroupRequest request = + DeleteGlobalNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalNetworkEndpointGroupsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/SyncDelete.java new file mode 100644 index 000000000000..a2b44f71fd39 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Delete_sync] +import com.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + DeleteGlobalNetworkEndpointGroupRequest request = + DeleteGlobalNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = globalNetworkEndpointGroupsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..3bc539c88259 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/delete/SyncDeleteStringString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Delete_StringString_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + Operation response = + globalNetworkEndpointGroupsClient.deleteAsync(project, networkEndpointGroup).get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpoints.java new file mode 100644 index 000000000000..692ef2653701 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpoints.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_DetachNetworkEndpoints_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest; +import com.google.longrunning.Operation; + +public class AsyncDetachNetworkEndpoints { + + public static void main(String[] args) throws Exception { + asyncDetachNetworkEndpoints(); + } + + public static void asyncDetachNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest request = + DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.newBuilder() + .setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource( + GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build()) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalNetworkEndpointGroupsClient.detachNetworkEndpointsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_DetachNetworkEndpoints_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpointsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpointsLRO.java new file mode 100644 index 000000000000..4ed44d253f02 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpointsLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_DetachNetworkEndpoints_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDetachNetworkEndpointsLRO { + + public static void main(String[] args) throws Exception { + asyncDetachNetworkEndpointsLRO(); + } + + public static void asyncDetachNetworkEndpointsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest request = + DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.newBuilder() + .setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource( + GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build()) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalNetworkEndpointGroupsClient + .detachNetworkEndpointsOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_DetachNetworkEndpoints_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpoints.java new file mode 100644 index 000000000000..8703ba9f7324 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpoints.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_DetachNetworkEndpoints_sync] +import com.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDetachNetworkEndpoints { + + public static void main(String[] args) throws Exception { + syncDetachNetworkEndpoints(); + } + + public static void syncDetachNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest request = + DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.newBuilder() + .setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource( + GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build()) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = + globalNetworkEndpointGroupsClient.detachNetworkEndpointsAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_DetachNetworkEndpoints_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpointsStringStringGlobalnetworkendpointgroupsdetachendpointsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpointsStringStringGlobalnetworkendpointgroupsdetachendpointsrequest.java new file mode 100644 index 000000000000..be683b4f6dd3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpointsStringStringGlobalnetworkendpointgroupsdetachendpointsrequest.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_DetachNetworkEndpoints_StringStringGlobalnetworkendpointgroupsdetachendpointsrequest_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest; +import com.google.cloud.compute.v1.Operation; + +public +class SyncDetachNetworkEndpointsStringStringGlobalnetworkendpointgroupsdetachendpointsrequest { + + public static void main(String[] args) throws Exception { + syncDetachNetworkEndpointsStringStringGlobalnetworkendpointgroupsdetachendpointsrequest(); + } + + public static void + syncDetachNetworkEndpointsStringStringGlobalnetworkendpointgroupsdetachendpointsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource = + GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build(); + Operation response = + globalNetworkEndpointGroupsClient + .detachNetworkEndpointsAsync( + project, + networkEndpointGroup, + globalNetworkEndpointGroupsDetachEndpointsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_DetachNetworkEndpoints_StringStringGlobalnetworkendpointgroupsdetachendpointsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/AsyncGet.java new file mode 100644 index 000000000000..2636468c569f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroup; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + GetGlobalNetworkEndpointGroupRequest request = + GetGlobalNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .build(); + ApiFuture future = + globalNetworkEndpointGroupsClient.getCallable().futureCall(request); + // Do something. + NetworkEndpointGroup response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/SyncGet.java new file mode 100644 index 000000000000..94d7301e44c6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Get_sync] +import com.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroup; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + GetGlobalNetworkEndpointGroupRequest request = + GetGlobalNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .build(); + NetworkEndpointGroup response = globalNetworkEndpointGroupsClient.get(request); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/SyncGetStringString.java new file mode 100644 index 000000000000..ad826b60f888 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/get/SyncGetStringString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Get_StringString_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroup; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + NetworkEndpointGroup response = + globalNetworkEndpointGroupsClient.get(project, networkEndpointGroup); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/AsyncInsert.java new file mode 100644 index 000000000000..e711cacb321a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/AsyncInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + InsertGlobalNetworkEndpointGroupRequest request = + InsertGlobalNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalNetworkEndpointGroupsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..16ac807b89d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + InsertGlobalNetworkEndpointGroupRequest request = + InsertGlobalNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalNetworkEndpointGroupsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/SyncInsert.java new file mode 100644 index 000000000000..935db0dcc299 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Insert_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + InsertGlobalNetworkEndpointGroupRequest request = + InsertGlobalNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = globalNetworkEndpointGroupsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/SyncInsertStringNetworkendpointgroup.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/SyncInsertStringNetworkendpointgroup.java new file mode 100644 index 000000000000..b9b977d82c1e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/insert/SyncInsertStringNetworkendpointgroup.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_Insert_StringNetworkendpointgroup_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringNetworkendpointgroup { + + public static void main(String[] args) throws Exception { + syncInsertStringNetworkendpointgroup(); + } + + public static void syncInsertStringNetworkendpointgroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build(); + Operation response = + globalNetworkEndpointGroupsClient + .insertAsync(project, networkEndpointGroupResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_Insert_StringNetworkendpointgroup_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/AsyncList.java new file mode 100644 index 000000000000..2163e46bea75 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + ListGlobalNetworkEndpointGroupsRequest request = + ListGlobalNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + globalNetworkEndpointGroupsClient.listPagedCallable().futureCall(request); + // Do something. + for (NetworkEndpointGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/AsyncListPaged.java new file mode 100644 index 000000000000..1b7a380c74cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_List_Paged_async] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + ListGlobalNetworkEndpointGroupsRequest request = + ListGlobalNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NetworkEndpointGroupList response = + globalNetworkEndpointGroupsClient.listCallable().call(request); + for (NetworkEndpointGroup element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/SyncList.java new file mode 100644 index 000000000000..b40e84b0d618 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_List_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + ListGlobalNetworkEndpointGroupsRequest request = + ListGlobalNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (NetworkEndpointGroup element : + globalNetworkEndpointGroupsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/SyncListString.java new file mode 100644 index 000000000000..59a9ff49015e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_List_String_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroup; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + for (NetworkEndpointGroup element : + globalNetworkEndpointGroupsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpoints.java new file mode 100644 index 000000000000..c23da2b8dede --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpoints.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_ListNetworkEndpoints_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; + +public class AsyncListNetworkEndpoints { + + public static void main(String[] args) throws Exception { + asyncListNetworkEndpoints(); + } + + public static void asyncListNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest request = + ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + globalNetworkEndpointGroupsClient.listNetworkEndpointsPagedCallable().futureCall(request); + // Do something. + for (NetworkEndpointWithHealthStatus element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_ListNetworkEndpoints_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpointsPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpointsPaged.java new file mode 100644 index 000000000000..e7a907b0a834 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpointsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_ListNetworkEndpoints_Paged_async] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; +import com.google.common.base.Strings; + +public class AsyncListNetworkEndpointsPaged { + + public static void main(String[] args) throws Exception { + asyncListNetworkEndpointsPaged(); + } + + public static void asyncListNetworkEndpointsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest request = + ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NetworkEndpointGroupsListNetworkEndpoints response = + globalNetworkEndpointGroupsClient.listNetworkEndpointsCallable().call(request); + for (NetworkEndpointWithHealthStatus element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_ListNetworkEndpoints_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/SyncListNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/SyncListNetworkEndpoints.java new file mode 100644 index 000000000000..e968bec5ebf8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/SyncListNetworkEndpoints.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_ListNetworkEndpoints_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; + +public class SyncListNetworkEndpoints { + + public static void main(String[] args) throws Exception { + syncListNetworkEndpoints(); + } + + public static void syncListNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest request = + ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (NetworkEndpointWithHealthStatus element : + globalNetworkEndpointGroupsClient.listNetworkEndpoints(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_ListNetworkEndpoints_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/SyncListNetworkEndpointsStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/SyncListNetworkEndpointsStringString.java new file mode 100644 index 000000000000..67800ff64975 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroups/listnetworkendpoints/SyncListNetworkEndpointsStringString.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroups_ListNetworkEndpoints_StringString_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; + +public class SyncListNetworkEndpointsStringString { + + public static void main(String[] args) throws Exception { + syncListNetworkEndpointsStringString(); + } + + public static void syncListNetworkEndpointsStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalNetworkEndpointGroupsClient globalNetworkEndpointGroupsClient = + GlobalNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + for (NetworkEndpointWithHealthStatus element : + globalNetworkEndpointGroupsClient + .listNetworkEndpoints(project, networkEndpointGroup) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroups_ListNetworkEndpoints_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroupssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroupssettings/get/SyncGet.java new file mode 100644 index 000000000000..9de2d3396ff4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalnetworkendpointgroupssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroupsSettings_Get_sync] +import com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalNetworkEndpointGroupsSettings.Builder globalNetworkEndpointGroupsSettingsBuilder = + GlobalNetworkEndpointGroupsSettings.newBuilder(); + globalNetworkEndpointGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + globalNetworkEndpointGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalNetworkEndpointGroupsSettings globalNetworkEndpointGroupsSettings = + globalNetworkEndpointGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroupsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..abf51605cda1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest; +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.OperationsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + AggregatedListGlobalOperationsRequest request = + AggregatedListGlobalOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + globalOperationsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOperations_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..ba09a8eec419 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest; +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.OperationAggregatedList; +import com.google.cloud.compute.v1.OperationsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + AggregatedListGlobalOperationsRequest request = + AggregatedListGlobalOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + OperationAggregatedList response = + globalOperationsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_GlobalOperations_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..0a2bd0c9cefc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest; +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.OperationsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + AggregatedListGlobalOperationsRequest request = + AggregatedListGlobalOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + globalOperationsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOperations_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..a5b50e3ffc05 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_AggregatedList_String_sync] +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.OperationsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + globalOperationsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOperations_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..59402321102d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.GlobalOperationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalOperationsSettings globalOperationsSettings = + GlobalOperationsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GlobalOperationsClient globalOperationsClient = + GlobalOperationsClient.create(globalOperationsSettings); + } +} +// [END compute_v1_generated_GlobalOperations_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..03469b60014e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.GlobalOperationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalOperationsSettings globalOperationsSettings = + GlobalOperationsSettings.newBuilder().setEndpoint(myEndpoint).build(); + GlobalOperationsClient globalOperationsClient = + GlobalOperationsClient.create(globalOperationsSettings); + } +} +// [END compute_v1_generated_GlobalOperations_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/AsyncDelete.java new file mode 100644 index 000000000000..8e8ac054e311 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteGlobalOperationRequest; +import com.google.cloud.compute.v1.DeleteGlobalOperationResponse; +import com.google.cloud.compute.v1.GlobalOperationsClient; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + DeleteGlobalOperationRequest request = + DeleteGlobalOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .build(); + ApiFuture future = + globalOperationsClient.deleteCallable().futureCall(request); + // Do something. + DeleteGlobalOperationResponse response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalOperations_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/SyncDelete.java new file mode 100644 index 000000000000..74506aacb401 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Delete_sync] +import com.google.cloud.compute.v1.DeleteGlobalOperationRequest; +import com.google.cloud.compute.v1.DeleteGlobalOperationResponse; +import com.google.cloud.compute.v1.GlobalOperationsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + DeleteGlobalOperationRequest request = + DeleteGlobalOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .build(); + DeleteGlobalOperationResponse response = globalOperationsClient.delete(request); + } + } +} +// [END compute_v1_generated_GlobalOperations_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..350a3359bba4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Delete_StringString_sync] +import com.google.cloud.compute.v1.DeleteGlobalOperationResponse; +import com.google.cloud.compute.v1.GlobalOperationsClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + String project = "project-309310695"; + String operation = "operation1662702951"; + DeleteGlobalOperationResponse response = globalOperationsClient.delete(project, operation); + } + } +} +// [END compute_v1_generated_GlobalOperations_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/AsyncGet.java new file mode 100644 index 000000000000..fddf0919335b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetGlobalOperationRequest; +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + GetGlobalOperationRequest request = + GetGlobalOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .build(); + ApiFuture future = globalOperationsClient.getCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalOperations_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/SyncGet.java new file mode 100644 index 000000000000..a915c02beb7a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Get_sync] +import com.google.cloud.compute.v1.GetGlobalOperationRequest; +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + GetGlobalOperationRequest request = + GetGlobalOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .build(); + Operation response = globalOperationsClient.get(request); + } + } +} +// [END compute_v1_generated_GlobalOperations_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/SyncGetStringString.java new file mode 100644 index 000000000000..ba3bfd10e486 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Get_StringString_sync] +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + String project = "project-309310695"; + String operation = "operation1662702951"; + Operation response = globalOperationsClient.get(project, operation); + } + } +} +// [END compute_v1_generated_GlobalOperations_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/AsyncList.java new file mode 100644 index 000000000000..4674eab61c8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.ListGlobalOperationsRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + ListGlobalOperationsRequest request = + ListGlobalOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = globalOperationsClient.listPagedCallable().futureCall(request); + // Do something. + for (Operation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOperations_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/AsyncListPaged.java new file mode 100644 index 000000000000..fa7731d48546 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_List_Paged_async] +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.ListGlobalOperationsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.OperationList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + ListGlobalOperationsRequest request = + ListGlobalOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + OperationList response = globalOperationsClient.listCallable().call(request); + for (Operation element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_GlobalOperations_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/SyncList.java new file mode 100644 index 000000000000..cdfbca2ecc81 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_List_sync] +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.ListGlobalOperationsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + ListGlobalOperationsRequest request = + ListGlobalOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Operation element : globalOperationsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOperations_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/SyncListString.java new file mode 100644 index 000000000000..a4f6f74e3380 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_List_String_sync] +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + String project = "project-309310695"; + for (Operation element : globalOperationsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOperations_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/AsyncWait.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/AsyncWait.java new file mode 100644 index 000000000000..0ebec77481e3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/AsyncWait.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Wait_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.WaitGlobalOperationRequest; + +public class AsyncWait { + + public static void main(String[] args) throws Exception { + asyncWait(); + } + + public static void asyncWait() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + WaitGlobalOperationRequest request = + WaitGlobalOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .build(); + ApiFuture future = globalOperationsClient.waitCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalOperations_Wait_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/SyncWait.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/SyncWait.java new file mode 100644 index 000000000000..595f78f0a10c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/SyncWait.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Wait_sync] +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.WaitGlobalOperationRequest; + +public class SyncWait { + + public static void main(String[] args) throws Exception { + syncWait(); + } + + public static void syncWait() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + WaitGlobalOperationRequest request = + WaitGlobalOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .build(); + Operation response = globalOperationsClient.wait(request); + } + } +} +// [END compute_v1_generated_GlobalOperations_Wait_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/SyncWaitStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/SyncWaitStringString.java new file mode 100644 index 000000000000..48bfe6d0aa44 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperations/wait/SyncWaitStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperations_Wait_StringString_sync] +import com.google.cloud.compute.v1.GlobalOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncWaitStringString { + + public static void main(String[] args) throws Exception { + syncWaitStringString(); + } + + public static void syncWaitStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOperationsClient globalOperationsClient = GlobalOperationsClient.create()) { + String project = "project-309310695"; + String operation = "operation1662702951"; + Operation response = globalOperationsClient.wait(project, operation); + } + } +} +// [END compute_v1_generated_GlobalOperations_Wait_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperationssettings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperationssettings/delete/SyncDelete.java new file mode 100644 index 000000000000..24f8bbda21d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaloperationssettings/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOperationsSettings_Delete_sync] +import com.google.cloud.compute.v1.GlobalOperationsSettings; +import java.time.Duration; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalOperationsSettings.Builder globalOperationsSettingsBuilder = + GlobalOperationsSettings.newBuilder(); + globalOperationsSettingsBuilder + .deleteSettings() + .setRetrySettings( + globalOperationsSettingsBuilder + .deleteSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalOperationsSettings globalOperationsSettings = globalOperationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalOperationsSettings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ce9c047d0ec4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalOrganizationOperationsSettings globalOrganizationOperationsSettings = + GlobalOrganizationOperationsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create(globalOrganizationOperationsSettings); + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e6e98af5978d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalOrganizationOperationsSettings globalOrganizationOperationsSettings = + GlobalOrganizationOperationsSettings.newBuilder().setEndpoint(myEndpoint).build(); + GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create(globalOrganizationOperationsSettings); + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/AsyncDelete.java new file mode 100644 index 000000000000..4c8ef52d77fa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationRequest; +import com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationResponse; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + DeleteGlobalOrganizationOperationRequest request = + DeleteGlobalOrganizationOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setParentId("parentId1175162725") + .build(); + ApiFuture future = + globalOrganizationOperationsClient.deleteCallable().futureCall(request); + // Do something. + DeleteGlobalOrganizationOperationResponse response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/SyncDelete.java new file mode 100644 index 000000000000..1f9b4016e6a0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_Delete_sync] +import com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationRequest; +import com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationResponse; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + DeleteGlobalOrganizationOperationRequest request = + DeleteGlobalOrganizationOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setParentId("parentId1175162725") + .build(); + DeleteGlobalOrganizationOperationResponse response = + globalOrganizationOperationsClient.delete(request); + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/SyncDeleteString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/SyncDeleteString.java new file mode 100644 index 000000000000..a21017f467e9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/delete/SyncDeleteString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_Delete_String_sync] +import com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationResponse; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; + +public class SyncDeleteString { + + public static void main(String[] args) throws Exception { + syncDeleteString(); + } + + public static void syncDeleteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + String operation = "operation1662702951"; + DeleteGlobalOrganizationOperationResponse response = + globalOrganizationOperationsClient.delete(operation); + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_Delete_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/AsyncGet.java new file mode 100644 index 000000000000..b2387da4de26 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + GetGlobalOrganizationOperationRequest request = + GetGlobalOrganizationOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setParentId("parentId1175162725") + .build(); + ApiFuture future = + globalOrganizationOperationsClient.getCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/SyncGet.java new file mode 100644 index 000000000000..edc4246b3764 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_Get_sync] +import com.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + GetGlobalOrganizationOperationRequest request = + GetGlobalOrganizationOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setParentId("parentId1175162725") + .build(); + Operation response = globalOrganizationOperationsClient.get(request); + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/SyncGetString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/SyncGetString.java new file mode 100644 index 000000000000..957340f436c5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/get/SyncGetString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_Get_String_sync] +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncGetString { + + public static void main(String[] args) throws Exception { + syncGetString(); + } + + public static void syncGetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + String operation = "operation1662702951"; + Operation response = globalOrganizationOperationsClient.get(operation); + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_Get_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/AsyncList.java new file mode 100644 index 000000000000..2a00acd15162 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + ListGlobalOrganizationOperationsRequest request = + ListGlobalOrganizationOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setParentId("parentId1175162725") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + globalOrganizationOperationsClient.listPagedCallable().futureCall(request); + // Do something. + for (Operation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/AsyncListPaged.java new file mode 100644 index 000000000000..aa361c105331 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_List_Paged_async] +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.OperationList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + ListGlobalOrganizationOperationsRequest request = + ListGlobalOrganizationOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setParentId("parentId1175162725") + .setReturnPartialSuccess(true) + .build(); + while (true) { + OperationList response = globalOrganizationOperationsClient.listCallable().call(request); + for (Operation element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/SyncList.java new file mode 100644 index 000000000000..a8486a78e187 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_List_sync] +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + ListGlobalOrganizationOperationsRequest request = + ListGlobalOrganizationOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setParentId("parentId1175162725") + .setReturnPartialSuccess(true) + .build(); + for (Operation element : globalOrganizationOperationsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/SyncListNoargs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/SyncListNoargs.java new file mode 100644 index 000000000000..4b374da591ea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperations/list/SyncListNoargs.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperations_List_Noargs_sync] +import com.google.cloud.compute.v1.GlobalOrganizationOperationsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncListNoargs { + + public static void main(String[] args) throws Exception { + syncListNoargs(); + } + + public static void syncListNoargs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalOrganizationOperationsClient globalOrganizationOperationsClient = + GlobalOrganizationOperationsClient.create()) { + for (Operation element : globalOrganizationOperationsClient.list().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalOrganizationOperations_List_Noargs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperationssettings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperationssettings/delete/SyncDelete.java new file mode 100644 index 000000000000..cdf504722b4f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalorganizationoperationssettings/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalOrganizationOperationsSettings_Delete_sync] +import com.google.cloud.compute.v1.GlobalOrganizationOperationsSettings; +import java.time.Duration; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalOrganizationOperationsSettings.Builder globalOrganizationOperationsSettingsBuilder = + GlobalOrganizationOperationsSettings.newBuilder(); + globalOrganizationOperationsSettingsBuilder + .deleteSettings() + .setRetrySettings( + globalOrganizationOperationsSettingsBuilder + .deleteSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalOrganizationOperationsSettings globalOrganizationOperationsSettings = + globalOrganizationOperationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalOrganizationOperationsSettings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ebe5c7e00247 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalPublicDelegatedPrefixesSettings globalPublicDelegatedPrefixesSettings = + GlobalPublicDelegatedPrefixesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create(globalPublicDelegatedPrefixesSettings); + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..25c6395db8f6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalPublicDelegatedPrefixesSettings globalPublicDelegatedPrefixesSettings = + GlobalPublicDelegatedPrefixesSettings.newBuilder().setEndpoint(myEndpoint).build(); + GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create(globalPublicDelegatedPrefixesSettings); + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/AsyncDelete.java new file mode 100644 index 000000000000..3020735768bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + DeleteGlobalPublicDelegatedPrefixeRequest request = + DeleteGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalPublicDelegatedPrefixesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..0c7e26f2c1cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + DeleteGlobalPublicDelegatedPrefixeRequest request = + DeleteGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalPublicDelegatedPrefixesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/SyncDelete.java new file mode 100644 index 000000000000..ba4e1b5d82a1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Delete_sync] +import com.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + DeleteGlobalPublicDelegatedPrefixeRequest request = + DeleteGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setRequestId("requestId693933066") + .build(); + Operation response = globalPublicDelegatedPrefixesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..ae1415512426 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/delete/SyncDeleteStringString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Delete_StringString_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + String publicDelegatedPrefix = "publicDelegatedPrefix-663003832"; + Operation response = + globalPublicDelegatedPrefixesClient.deleteAsync(project, publicDelegatedPrefix).get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/AsyncGet.java new file mode 100644 index 000000000000..55ceca1e4981 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + GetGlobalPublicDelegatedPrefixeRequest request = + GetGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .build(); + ApiFuture future = + globalPublicDelegatedPrefixesClient.getCallable().futureCall(request); + // Do something. + PublicDelegatedPrefix response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/SyncGet.java new file mode 100644 index 000000000000..f307a32d5f54 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Get_sync] +import com.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + GetGlobalPublicDelegatedPrefixeRequest request = + GetGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .build(); + PublicDelegatedPrefix response = globalPublicDelegatedPrefixesClient.get(request); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/SyncGetStringString.java new file mode 100644 index 000000000000..db8c517aa7e8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/get/SyncGetStringString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Get_StringString_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + String publicDelegatedPrefix = "publicDelegatedPrefix-663003832"; + PublicDelegatedPrefix response = + globalPublicDelegatedPrefixesClient.get(project, publicDelegatedPrefix); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/AsyncInsert.java new file mode 100644 index 000000000000..d4cce9549643 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/AsyncInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + InsertGlobalPublicDelegatedPrefixeRequest request = + InsertGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalPublicDelegatedPrefixesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..76d595fdf907 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + InsertGlobalPublicDelegatedPrefixeRequest request = + InsertGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalPublicDelegatedPrefixesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/SyncInsert.java new file mode 100644 index 000000000000..f1af25ec7002 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Insert_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + InsertGlobalPublicDelegatedPrefixeRequest request = + InsertGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = globalPublicDelegatedPrefixesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/SyncInsertStringPublicdelegatedprefix.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/SyncInsertStringPublicdelegatedprefix.java new file mode 100644 index 000000000000..6c6cd108ae1e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/insert/SyncInsertStringPublicdelegatedprefix.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Insert_StringPublicdelegatedprefix_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class SyncInsertStringPublicdelegatedprefix { + + public static void main(String[] args) throws Exception { + syncInsertStringPublicdelegatedprefix(); + } + + public static void syncInsertStringPublicdelegatedprefix() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + PublicDelegatedPrefix publicDelegatedPrefixResource = + PublicDelegatedPrefix.newBuilder().build(); + Operation response = + globalPublicDelegatedPrefixesClient + .insertAsync(project, publicDelegatedPrefixResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Insert_StringPublicdelegatedprefix_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/AsyncList.java new file mode 100644 index 000000000000..07c642b30e02 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + ListGlobalPublicDelegatedPrefixesRequest request = + ListGlobalPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + globalPublicDelegatedPrefixesClient.listPagedCallable().futureCall(request); + // Do something. + for (PublicDelegatedPrefix element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/AsyncListPaged.java new file mode 100644 index 000000000000..cdd1c96b7aa9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_List_Paged_async] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + ListGlobalPublicDelegatedPrefixesRequest request = + ListGlobalPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + PublicDelegatedPrefixList response = + globalPublicDelegatedPrefixesClient.listCallable().call(request); + for (PublicDelegatedPrefix element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/SyncList.java new file mode 100644 index 000000000000..cc271375cd2c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_List_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + ListGlobalPublicDelegatedPrefixesRequest request = + ListGlobalPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (PublicDelegatedPrefix element : + globalPublicDelegatedPrefixesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/SyncListString.java new file mode 100644 index 000000000000..2de7d63e9e29 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_List_String_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + for (PublicDelegatedPrefix element : + globalPublicDelegatedPrefixesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/AsyncPatch.java new file mode 100644 index 000000000000..d7a625100f6b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/AsyncPatch.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + PatchGlobalPublicDelegatedPrefixeRequest request = + PatchGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + globalPublicDelegatedPrefixesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..018e8648cff1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + PatchGlobalPublicDelegatedPrefixeRequest request = + PatchGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + globalPublicDelegatedPrefixesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/SyncPatch.java new file mode 100644 index 000000000000..d7403a3e9bbf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Patch_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + PatchGlobalPublicDelegatedPrefixeRequest request = + PatchGlobalPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = globalPublicDelegatedPrefixesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/SyncPatchStringStringPublicdelegatedprefix.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/SyncPatchStringStringPublicdelegatedprefix.java new file mode 100644 index 000000000000..b19862c8ae89 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixes/patch/SyncPatchStringStringPublicdelegatedprefix.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixes_Patch_StringStringPublicdelegatedprefix_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; + +public class SyncPatchStringStringPublicdelegatedprefix { + + public static void main(String[] args) throws Exception { + syncPatchStringStringPublicdelegatedprefix(); + } + + public static void syncPatchStringStringPublicdelegatedprefix() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GlobalPublicDelegatedPrefixesClient globalPublicDelegatedPrefixesClient = + GlobalPublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + String publicDelegatedPrefix = "publicDelegatedPrefix-663003832"; + PublicDelegatedPrefix publicDelegatedPrefixResource = + PublicDelegatedPrefix.newBuilder().build(); + Operation response = + globalPublicDelegatedPrefixesClient + .patchAsync(project, publicDelegatedPrefix, publicDelegatedPrefixResource) + .get(); + } + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixes_Patch_StringStringPublicdelegatedprefix_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixessettings/get/SyncGet.java new file mode 100644 index 000000000000..309986484129 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globalpublicdelegatedprefixessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixesSettings_Get_sync] +import com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalPublicDelegatedPrefixesSettings.Builder globalPublicDelegatedPrefixesSettingsBuilder = + GlobalPublicDelegatedPrefixesSettings.newBuilder(); + globalPublicDelegatedPrefixesSettingsBuilder + .getSettings() + .setRetrySettings( + globalPublicDelegatedPrefixesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalPublicDelegatedPrefixesSettings globalPublicDelegatedPrefixesSettings = + globalPublicDelegatedPrefixesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..8afac8e46992 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListHealthChecksRequest; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.HealthChecksScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + AggregatedListHealthChecksRequest request = + AggregatedListHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + healthChecksClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_HealthChecks_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..773745135d6a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListHealthChecksRequest; +import com.google.cloud.compute.v1.HealthChecksAggregatedList; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.HealthChecksScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + AggregatedListHealthChecksRequest request = + AggregatedListHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + HealthChecksAggregatedList response = + healthChecksClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_HealthChecks_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..147977e34424 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListHealthChecksRequest; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.HealthChecksScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + AggregatedListHealthChecksRequest request = + AggregatedListHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + healthChecksClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_HealthChecks_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..ddbb1fefe71c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_AggregatedList_String_sync] +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.HealthChecksScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + healthChecksClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_HealthChecks_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..e4bacdd184a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.HealthChecksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthChecksSettings healthChecksSettings = + HealthChecksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + HealthChecksClient healthChecksClient = HealthChecksClient.create(healthChecksSettings); + } +} +// [END compute_v1_generated_HealthChecks_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..baa36c654f8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.HealthChecksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthChecksSettings healthChecksSettings = + HealthChecksSettings.newBuilder().setEndpoint(myEndpoint).build(); + HealthChecksClient healthChecksClient = HealthChecksClient.create(healthChecksSettings); + } +} +// [END compute_v1_generated_HealthChecks_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/AsyncDelete.java new file mode 100644 index 000000000000..264b3569a82f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteHealthCheckRequest; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + DeleteHealthCheckRequest request = + DeleteHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = healthChecksClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..b9d43ecc48d8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteHealthCheckRequest; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + DeleteHealthCheckRequest request = + DeleteHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + healthChecksClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/SyncDelete.java new file mode 100644 index 000000000000..1f67f60a4512 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Delete_sync] +import com.google.cloud.compute.v1.DeleteHealthCheckRequest; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + DeleteHealthCheckRequest request = + DeleteHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = healthChecksClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..6dfd5938b387 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Delete_StringString_sync] +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + String project = "project-309310695"; + String healthCheck = "healthCheck-1938093044"; + Operation response = healthChecksClient.deleteAsync(project, healthCheck).get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/AsyncGet.java new file mode 100644 index 000000000000..503177c944c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetHealthCheckRequest; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + GetHealthCheckRequest request = + GetHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .build(); + ApiFuture future = healthChecksClient.getCallable().futureCall(request); + // Do something. + HealthCheck response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/SyncGet.java new file mode 100644 index 000000000000..6cf4b0b21239 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Get_sync] +import com.google.cloud.compute.v1.GetHealthCheckRequest; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + GetHealthCheckRequest request = + GetHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .build(); + HealthCheck response = healthChecksClient.get(request); + } + } +} +// [END compute_v1_generated_HealthChecks_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/SyncGetStringString.java new file mode 100644 index 000000000000..7b4ea6456928 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Get_StringString_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + String project = "project-309310695"; + String healthCheck = "healthCheck-1938093044"; + HealthCheck response = healthChecksClient.get(project, healthCheck); + } + } +} +// [END compute_v1_generated_HealthChecks_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/AsyncInsert.java new file mode 100644 index 000000000000..be866ba53edb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.InsertHealthCheckRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + InsertHealthCheckRequest request = + InsertHealthCheckRequest.newBuilder() + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = healthChecksClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..5cbddaa4cc4e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.InsertHealthCheckRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + InsertHealthCheckRequest request = + InsertHealthCheckRequest.newBuilder() + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + healthChecksClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/SyncInsert.java new file mode 100644 index 000000000000..c75f534345ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Insert_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.InsertHealthCheckRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + InsertHealthCheckRequest request = + InsertHealthCheckRequest.newBuilder() + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = healthChecksClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/SyncInsertStringHealthcheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/SyncInsertStringHealthcheck.java new file mode 100644 index 000000000000..d1627a132c15 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/insert/SyncInsertStringHealthcheck.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Insert_StringHealthcheck_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringHealthcheck { + + public static void main(String[] args) throws Exception { + syncInsertStringHealthcheck(); + } + + public static void syncInsertStringHealthcheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + String project = "project-309310695"; + HealthCheck healthCheckResource = HealthCheck.newBuilder().build(); + Operation response = healthChecksClient.insertAsync(project, healthCheckResource).get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Insert_StringHealthcheck_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/AsyncList.java new file mode 100644 index 000000000000..8055c7b2f0a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.ListHealthChecksRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + ListHealthChecksRequest request = + ListHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = healthChecksClient.listPagedCallable().futureCall(request); + // Do something. + for (HealthCheck element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_HealthChecks_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/AsyncListPaged.java new file mode 100644 index 000000000000..84fb440b7d47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_List_Paged_async] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthCheckList; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.ListHealthChecksRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + ListHealthChecksRequest request = + ListHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + HealthCheckList response = healthChecksClient.listCallable().call(request); + for (HealthCheck element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_HealthChecks_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/SyncList.java new file mode 100644 index 000000000000..b9b3709892dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_List_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.ListHealthChecksRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + ListHealthChecksRequest request = + ListHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (HealthCheck element : healthChecksClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_HealthChecks_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/SyncListString.java new file mode 100644 index 000000000000..f78979cb9dcd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_List_String_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + String project = "project-309310695"; + for (HealthCheck element : healthChecksClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_HealthChecks_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/AsyncPatch.java new file mode 100644 index 000000000000..47a4c13e2c8b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.PatchHealthCheckRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + PatchHealthCheckRequest request = + PatchHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = healthChecksClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..77ff789e893c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchHealthCheckRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + PatchHealthCheckRequest request = + PatchHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + healthChecksClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/SyncPatch.java new file mode 100644 index 000000000000..919b4b4b8bf9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Patch_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchHealthCheckRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + PatchHealthCheckRequest request = + PatchHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = healthChecksClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/SyncPatchStringStringHealthcheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/SyncPatchStringStringHealthcheck.java new file mode 100644 index 000000000000..c8c0ed3d878e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/patch/SyncPatchStringStringHealthcheck.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Patch_StringStringHealthcheck_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringHealthcheck { + + public static void main(String[] args) throws Exception { + syncPatchStringStringHealthcheck(); + } + + public static void syncPatchStringStringHealthcheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + String project = "project-309310695"; + String healthCheck = "healthCheck-1938093044"; + HealthCheck healthCheckResource = HealthCheck.newBuilder().build(); + Operation response = + healthChecksClient.patchAsync(project, healthCheck, healthCheckResource).get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Patch_StringStringHealthcheck_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/AsyncUpdate.java new file mode 100644 index 000000000000..c3f9b06d7254 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/AsyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.UpdateHealthCheckRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + UpdateHealthCheckRequest request = + UpdateHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = healthChecksClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..fd680883421a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/AsyncUpdateLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateHealthCheckRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + UpdateHealthCheckRequest request = + UpdateHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + healthChecksClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/SyncUpdate.java new file mode 100644 index 000000000000..6eb44987a7c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Update_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateHealthCheckRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + UpdateHealthCheckRequest request = + UpdateHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = healthChecksClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/SyncUpdateStringStringHealthcheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/SyncUpdateStringStringHealthcheck.java new file mode 100644 index 000000000000..1f7e21e337d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthchecks/update/SyncUpdateStringStringHealthcheck.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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecks_Update_StringStringHealthcheck_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthChecksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateStringStringHealthcheck { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringHealthcheck(); + } + + public static void syncUpdateStringStringHealthcheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthChecksClient healthChecksClient = HealthChecksClient.create()) { + String project = "project-309310695"; + String healthCheck = "healthCheck-1938093044"; + HealthCheck healthCheckResource = HealthCheck.newBuilder().build(); + Operation response = + healthChecksClient.updateAsync(project, healthCheck, healthCheckResource).get(); + } + } +} +// [END compute_v1_generated_HealthChecks_Update_StringStringHealthcheck_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthcheckssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthcheckssettings/get/SyncGet.java new file mode 100644 index 000000000000..a5a5eafa6232 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/healthcheckssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_HealthChecksSettings_Get_sync] +import com.google.cloud.compute.v1.HealthChecksSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthChecksSettings.Builder healthChecksSettingsBuilder = HealthChecksSettings.newBuilder(); + healthChecksSettingsBuilder + .getSettings() + .setRetrySettings( + healthChecksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + HealthChecksSettings healthChecksSettings = healthChecksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_HealthChecksSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..54fc369869da --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_ImageFamilyViews_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ImageFamilyViewsClient; +import com.google.cloud.compute.v1.ImageFamilyViewsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageFamilyViewsSettings imageFamilyViewsSettings = + ImageFamilyViewsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ImageFamilyViewsClient imageFamilyViewsClient = + ImageFamilyViewsClient.create(imageFamilyViewsSettings); + } +} +// [END compute_v1_generated_ImageFamilyViews_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..14e2f3ff0779 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ImageFamilyViews_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ImageFamilyViewsClient; +import com.google.cloud.compute.v1.ImageFamilyViewsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageFamilyViewsSettings imageFamilyViewsSettings = + ImageFamilyViewsSettings.newBuilder().setEndpoint(myEndpoint).build(); + ImageFamilyViewsClient imageFamilyViewsClient = + ImageFamilyViewsClient.create(imageFamilyViewsSettings); + } +} +// [END compute_v1_generated_ImageFamilyViews_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/AsyncGet.java new file mode 100644 index 000000000000..0fff44361bb0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ImageFamilyViews_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetImageFamilyViewRequest; +import com.google.cloud.compute.v1.ImageFamilyView; +import com.google.cloud.compute.v1.ImageFamilyViewsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageFamilyViewsClient imageFamilyViewsClient = ImageFamilyViewsClient.create()) { + GetImageFamilyViewRequest request = + GetImageFamilyViewRequest.newBuilder() + .setFamily("family-1281860764") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = imageFamilyViewsClient.getCallable().futureCall(request); + // Do something. + ImageFamilyView response = future.get(); + } + } +} +// [END compute_v1_generated_ImageFamilyViews_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/SyncGet.java new file mode 100644 index 000000000000..d882657dbf6c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ImageFamilyViews_Get_sync] +import com.google.cloud.compute.v1.GetImageFamilyViewRequest; +import com.google.cloud.compute.v1.ImageFamilyView; +import com.google.cloud.compute.v1.ImageFamilyViewsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageFamilyViewsClient imageFamilyViewsClient = ImageFamilyViewsClient.create()) { + GetImageFamilyViewRequest request = + GetImageFamilyViewRequest.newBuilder() + .setFamily("family-1281860764") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ImageFamilyView response = imageFamilyViewsClient.get(request); + } + } +} +// [END compute_v1_generated_ImageFamilyViews_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..048ae3547ec8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviews/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ImageFamilyViews_Get_StringStringString_sync] +import com.google.cloud.compute.v1.ImageFamilyView; +import com.google.cloud.compute.v1.ImageFamilyViewsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageFamilyViewsClient imageFamilyViewsClient = ImageFamilyViewsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String family = "family-1281860764"; + ImageFamilyView response = imageFamilyViewsClient.get(project, zone, family); + } + } +} +// [END compute_v1_generated_ImageFamilyViews_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviewssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviewssettings/get/SyncGet.java new file mode 100644 index 000000000000..7d16073edca0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagefamilyviewssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ImageFamilyViewsSettings_Get_sync] +import com.google.cloud.compute.v1.ImageFamilyViewsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageFamilyViewsSettings.Builder imageFamilyViewsSettingsBuilder = + ImageFamilyViewsSettings.newBuilder(); + imageFamilyViewsSettingsBuilder + .getSettings() + .setRetrySettings( + imageFamilyViewsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageFamilyViewsSettings imageFamilyViewsSettings = imageFamilyViewsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ImageFamilyViewsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d8671dda1be3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.ImagesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImagesSettings imagesSettings = + ImagesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ImagesClient imagesClient = ImagesClient.create(imagesSettings); + } +} +// [END compute_v1_generated_Images_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..3af31cf6b2f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.ImagesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImagesSettings imagesSettings = ImagesSettings.newBuilder().setEndpoint(myEndpoint).build(); + ImagesClient imagesClient = ImagesClient.create(imagesSettings); + } +} +// [END compute_v1_generated_Images_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/AsyncDelete.java new file mode 100644 index 000000000000..5c7a352e4791 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteImageRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + DeleteImageRequest request = + DeleteImageRequest.newBuilder() + .setImage("image100313435") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = imagesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..544a9580cf74 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteImageRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + DeleteImageRequest request = + DeleteImageRequest.newBuilder() + .setImage("image100313435") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + imagesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/SyncDelete.java new file mode 100644 index 000000000000..5ba9c4f15d88 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Delete_sync] +import com.google.cloud.compute.v1.DeleteImageRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + DeleteImageRequest request = + DeleteImageRequest.newBuilder() + .setImage("image100313435") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = imagesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Images_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..173b1341645d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_Delete_StringString_sync] +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String image = "image100313435"; + Operation response = imagesClient.deleteAsync(project, image).get(); + } + } +} +// [END compute_v1_generated_Images_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/AsyncDeprecate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/AsyncDeprecate.java new file mode 100644 index 000000000000..e0d5717645b3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/AsyncDeprecate.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Deprecate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeprecateImageRequest; +import com.google.cloud.compute.v1.DeprecationStatus; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.longrunning.Operation; + +public class AsyncDeprecate { + + public static void main(String[] args) throws Exception { + asyncDeprecate(); + } + + public static void asyncDeprecate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + DeprecateImageRequest request = + DeprecateImageRequest.newBuilder() + .setDeprecationStatusResource(DeprecationStatus.newBuilder().build()) + .setImage("image100313435") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = imagesClient.deprecateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Deprecate_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/AsyncDeprecateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/AsyncDeprecateLRO.java new file mode 100644 index 000000000000..dea3593599eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/AsyncDeprecateLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_Deprecate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeprecateImageRequest; +import com.google.cloud.compute.v1.DeprecationStatus; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeprecateLRO { + + public static void main(String[] args) throws Exception { + asyncDeprecateLRO(); + } + + public static void asyncDeprecateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + DeprecateImageRequest request = + DeprecateImageRequest.newBuilder() + .setDeprecationStatusResource(DeprecationStatus.newBuilder().build()) + .setImage("image100313435") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + imagesClient.deprecateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Deprecate_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/SyncDeprecate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/SyncDeprecate.java new file mode 100644 index 000000000000..6442ede6fbec --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/SyncDeprecate.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Deprecate_sync] +import com.google.cloud.compute.v1.DeprecateImageRequest; +import com.google.cloud.compute.v1.DeprecationStatus; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeprecate { + + public static void main(String[] args) throws Exception { + syncDeprecate(); + } + + public static void syncDeprecate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + DeprecateImageRequest request = + DeprecateImageRequest.newBuilder() + .setDeprecationStatusResource(DeprecationStatus.newBuilder().build()) + .setImage("image100313435") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = imagesClient.deprecateAsync(request).get(); + } + } +} +// [END compute_v1_generated_Images_Deprecate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/SyncDeprecateStringStringDeprecationstatus.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/SyncDeprecateStringStringDeprecationstatus.java new file mode 100644 index 000000000000..7a4de2a36eeb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/deprecate/SyncDeprecateStringStringDeprecationstatus.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Deprecate_StringStringDeprecationstatus_sync] +import com.google.cloud.compute.v1.DeprecationStatus; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeprecateStringStringDeprecationstatus { + + public static void main(String[] args) throws Exception { + syncDeprecateStringStringDeprecationstatus(); + } + + public static void syncDeprecateStringStringDeprecationstatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String image = "image100313435"; + DeprecationStatus deprecationStatusResource = DeprecationStatus.newBuilder().build(); + Operation response = + imagesClient.deprecateAsync(project, image, deprecationStatusResource).get(); + } + } +} +// [END compute_v1_generated_Images_Deprecate_StringStringDeprecationstatus_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/AsyncGet.java new file mode 100644 index 000000000000..f7c4b019b8be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetImageRequest; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + GetImageRequest request = + GetImageRequest.newBuilder() + .setImage("image100313435") + .setProject("project-309310695") + .build(); + ApiFuture future = imagesClient.getCallable().futureCall(request); + // Do something. + Image response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/SyncGet.java new file mode 100644 index 000000000000..55b04040be69 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Get_sync] +import com.google.cloud.compute.v1.GetImageRequest; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + GetImageRequest request = + GetImageRequest.newBuilder() + .setImage("image100313435") + .setProject("project-309310695") + .build(); + Image response = imagesClient.get(request); + } + } +} +// [END compute_v1_generated_Images_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/SyncGetStringString.java new file mode 100644 index 000000000000..0884ade5ea9a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_Get_StringString_sync] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String image = "image100313435"; + Image response = imagesClient.get(project, image); + } + } +} +// [END compute_v1_generated_Images_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/AsyncGetFromFamily.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/AsyncGetFromFamily.java new file mode 100644 index 000000000000..eb5220a8760f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/AsyncGetFromFamily.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.compute.v1.samples; + +// [START compute_v1_generated_Images_GetFromFamily_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetFromFamilyImageRequest; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; + +public class AsyncGetFromFamily { + + public static void main(String[] args) throws Exception { + asyncGetFromFamily(); + } + + public static void asyncGetFromFamily() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + GetFromFamilyImageRequest request = + GetFromFamilyImageRequest.newBuilder() + .setFamily("family-1281860764") + .setProject("project-309310695") + .build(); + ApiFuture future = imagesClient.getFromFamilyCallable().futureCall(request); + // Do something. + Image response = future.get(); + } + } +} +// [END compute_v1_generated_Images_GetFromFamily_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/SyncGetFromFamily.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/SyncGetFromFamily.java new file mode 100644 index 000000000000..fb241f09ca55 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/SyncGetFromFamily.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.compute.v1.samples; + +// [START compute_v1_generated_Images_GetFromFamily_sync] +import com.google.cloud.compute.v1.GetFromFamilyImageRequest; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; + +public class SyncGetFromFamily { + + public static void main(String[] args) throws Exception { + syncGetFromFamily(); + } + + public static void syncGetFromFamily() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + GetFromFamilyImageRequest request = + GetFromFamilyImageRequest.newBuilder() + .setFamily("family-1281860764") + .setProject("project-309310695") + .build(); + Image response = imagesClient.getFromFamily(request); + } + } +} +// [END compute_v1_generated_Images_GetFromFamily_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/SyncGetFromFamilyStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/SyncGetFromFamilyStringString.java new file mode 100644 index 000000000000..087028cbd4e5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getfromfamily/SyncGetFromFamilyStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_GetFromFamily_StringString_sync] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; + +public class SyncGetFromFamilyStringString { + + public static void main(String[] args) throws Exception { + syncGetFromFamilyStringString(); + } + + public static void syncGetFromFamilyStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String family = "family-1281860764"; + Image response = imagesClient.getFromFamily(project, family); + } + } +} +// [END compute_v1_generated_Images_GetFromFamily_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..23d68f8abd89 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Images_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyImageRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + GetIamPolicyImageRequest request = + GetIamPolicyImageRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = imagesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Images_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..9fae5b29cd68 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Images_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyImageRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + GetIamPolicyImageRequest request = + GetIamPolicyImageRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = imagesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_Images_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/SyncGetIamPolicyStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/SyncGetIamPolicyStringString.java new file mode 100644 index 000000000000..9a36dc9c009f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/getiampolicy/SyncGetIamPolicyStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_GetIamPolicy_StringString_sync] +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringString(); + } + + public static void syncGetIamPolicyStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + Policy response = imagesClient.getIamPolicy(project, resource); + } + } +} +// [END compute_v1_generated_Images_GetIamPolicy_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/AsyncInsert.java new file mode 100644 index 000000000000..9c3157e48f6f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.InsertImageRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + InsertImageRequest request = + InsertImageRequest.newBuilder() + .setForceCreate(true) + .setImageResource(Image.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = imagesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..be9d7492555b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.InsertImageRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + InsertImageRequest request = + InsertImageRequest.newBuilder() + .setForceCreate(true) + .setImageResource(Image.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + imagesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/SyncInsert.java new file mode 100644 index 000000000000..631f87257eca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Insert_sync] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.InsertImageRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + InsertImageRequest request = + InsertImageRequest.newBuilder() + .setForceCreate(true) + .setImageResource(Image.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = imagesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Images_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/SyncInsertStringImage.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/SyncInsertStringImage.java new file mode 100644 index 000000000000..832488dc2e39 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/insert/SyncInsertStringImage.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Insert_StringImage_sync] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringImage { + + public static void main(String[] args) throws Exception { + syncInsertStringImage(); + } + + public static void syncInsertStringImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + Image imageResource = Image.newBuilder().build(); + Operation response = imagesClient.insertAsync(project, imageResource).get(); + } + } +} +// [END compute_v1_generated_Images_Insert_StringImage_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/AsyncList.java new file mode 100644 index 000000000000..f4b194d3ad96 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.ListImagesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + ListImagesRequest request = + ListImagesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = imagesClient.listPagedCallable().futureCall(request); + // Do something. + for (Image element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Images_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/AsyncListPaged.java new file mode 100644 index 000000000000..996ca37cdeb0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_List_Paged_async] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImageList; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.ListImagesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + ListImagesRequest request = + ListImagesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ImageList response = imagesClient.listCallable().call(request); + for (Image element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Images_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/SyncList.java new file mode 100644 index 000000000000..20e3827397f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Images_List_sync] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.ListImagesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + ListImagesRequest request = + ListImagesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Image element : imagesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Images_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/SyncListString.java new file mode 100644 index 000000000000..922c82cee6af --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Images_List_String_sync] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + for (Image element : imagesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Images_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/AsyncPatch.java new file mode 100644 index 000000000000..7cca29e8cded --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.PatchImageRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + PatchImageRequest request = + PatchImageRequest.newBuilder() + .setImage("image100313435") + .setImageResource(Image.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = imagesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..7997a7b8b25f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchImageRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + PatchImageRequest request = + PatchImageRequest.newBuilder() + .setImage("image100313435") + .setImageResource(Image.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + imagesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/SyncPatch.java new file mode 100644 index 000000000000..7a45055f6dd4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Patch_sync] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchImageRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + PatchImageRequest request = + PatchImageRequest.newBuilder() + .setImage("image100313435") + .setImageResource(Image.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = imagesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_Images_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/SyncPatchStringStringImage.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/SyncPatchStringStringImage.java new file mode 100644 index 000000000000..19ebfe85f773 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/patch/SyncPatchStringStringImage.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.compute.v1.samples; + +// [START compute_v1_generated_Images_Patch_StringStringImage_sync] +import com.google.cloud.compute.v1.Image; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringImage { + + public static void main(String[] args) throws Exception { + syncPatchStringStringImage(); + } + + public static void syncPatchStringStringImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String image = "image100313435"; + Image imageResource = Image.newBuilder().build(); + Operation response = imagesClient.patchAsync(project, image, imageResource).get(); + } + } +} +// [END compute_v1_generated_Images_Patch_StringStringImage_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..53f7e5084811 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Images_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyImageRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + SetIamPolicyImageRequest request = + SetIamPolicyImageRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = imagesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Images_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..c5f6c9c3849b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_SetIamPolicy_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyImageRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + SetIamPolicyImageRequest request = + SetIamPolicyImageRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = imagesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_Images_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java new file mode 100644 index 000000000000..252a223f4167 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Images_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncSetIamPolicyStringStringGlobalsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringGlobalsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringGlobalsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetPolicyRequest globalSetPolicyRequestResource = + GlobalSetPolicyRequest.newBuilder().build(); + Policy response = + imagesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_Images_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..24132b1d4c8a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/AsyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_Images_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.SetLabelsImageRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + SetLabelsImageRequest request = + SetLabelsImageRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = imagesClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..9c4038cdab1b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/AsyncSetLabelsLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Images_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsImageRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + SetLabelsImageRequest request = + SetLabelsImageRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + OperationFuture future = + imagesClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Images_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..8f5c77dcda23 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/SyncSetLabels.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_SetLabels_sync] +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsImageRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + SetLabelsImageRequest request = + SetLabelsImageRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Operation response = imagesClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_Images_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java new file mode 100644 index 000000000000..e18c8fb979be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Images_SetLabels_StringStringGlobalsetlabelsrequest_sync] +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetLabelsStringStringGlobalsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringGlobalsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringGlobalsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetLabelsRequest globalSetLabelsRequestResource = + GlobalSetLabelsRequest.newBuilder().build(); + Operation response = + imagesClient.setLabelsAsync(project, resource, globalSetLabelsRequestResource).get(); + } + } +} +// [END compute_v1_generated_Images_SetLabels_StringStringGlobalsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..1215b640a957 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/AsyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_Images_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.TestIamPermissionsImageRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + TestIamPermissionsImageRequest request = + TestIamPermissionsImageRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + imagesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Images_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..30a847dd7514 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Images_TestIamPermissions_sync] +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.TestIamPermissionsImageRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + TestIamPermissionsImageRequest request = + TestIamPermissionsImageRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = imagesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_Images_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..95763a5cfc37 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/images/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Images_TestIamPermissions_StringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.ImagesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImagesClient imagesClient = ImagesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + imagesClient.testIamPermissions(project, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_Images_TestIamPermissions_StringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagessettings/get/SyncGet.java new file mode 100644 index 000000000000..322dd033e336 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/imagessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ImagesSettings_Get_sync] +import com.google.cloud.compute.v1.ImagesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImagesSettings.Builder imagesSettingsBuilder = ImagesSettings.newBuilder(); + imagesSettingsBuilder + .getSettings() + .setRetrySettings( + imagesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImagesSettings imagesSettings = imagesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ImagesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/AsyncAbandonInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/AsyncAbandonInstances.java new file mode 100644 index 000000000000..5d39eed4ce7e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/AsyncAbandonInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_AbandonInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncAbandonInstances { + + public static void main(String[] args) throws Exception { + asyncAbandonInstances(); + } + + public static void asyncAbandonInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + AbandonInstancesInstanceGroupManagerRequest request = + AbandonInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersAbandonInstancesRequestResource( + InstanceGroupManagersAbandonInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.abandonInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_AbandonInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/AsyncAbandonInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/AsyncAbandonInstancesLRO.java new file mode 100644 index 000000000000..76b892dd9ca9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/AsyncAbandonInstancesLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_AbandonInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAbandonInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncAbandonInstancesLRO(); + } + + public static void asyncAbandonInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + AbandonInstancesInstanceGroupManagerRequest request = + AbandonInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersAbandonInstancesRequestResource( + InstanceGroupManagersAbandonInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.abandonInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_AbandonInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/SyncAbandonInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/SyncAbandonInstances.java new file mode 100644 index 000000000000..0653b459107b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/SyncAbandonInstances.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_AbandonInstances_sync] +import com.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAbandonInstances { + + public static void main(String[] args) throws Exception { + syncAbandonInstances(); + } + + public static void syncAbandonInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + AbandonInstancesInstanceGroupManagerRequest request = + AbandonInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersAbandonInstancesRequestResource( + InstanceGroupManagersAbandonInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.abandonInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_AbandonInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/SyncAbandonInstancesStringStringStringInstancegroupmanagersabandoninstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/SyncAbandonInstancesStringStringStringInstancegroupmanagersabandoninstancesrequest.java new file mode 100644 index 000000000000..701a588ee81d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/abandoninstances/SyncAbandonInstancesStringStringStringInstancegroupmanagersabandoninstancesrequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_AbandonInstances_StringStringStringInstancegroupmanagersabandoninstancesrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAbandonInstancesStringStringStringInstancegroupmanagersabandoninstancesrequest { + + public static void main(String[] args) throws Exception { + syncAbandonInstancesStringStringStringInstancegroupmanagersabandoninstancesrequest(); + } + + public static void + syncAbandonInstancesStringStringStringInstancegroupmanagersabandoninstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersAbandonInstancesRequest + instanceGroupManagersAbandonInstancesRequestResource = + InstanceGroupManagersAbandonInstancesRequest.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .abandonInstancesAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersAbandonInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_AbandonInstances_StringStringStringInstancegroupmanagersabandoninstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..1338f880b912 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + AggregatedListInstanceGroupManagersRequest request = + AggregatedListInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + instanceGroupManagersClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..f6a8ff9f65f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.InstanceGroupManagerAggregatedList; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + AggregatedListInstanceGroupManagersRequest request = + AggregatedListInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InstanceGroupManagerAggregatedList response = + instanceGroupManagersClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..9229aa0d5120 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + AggregatedListInstanceGroupManagersRequest request = + AggregatedListInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + instanceGroupManagersClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..97b90363f497 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_AggregatedList_String_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + instanceGroupManagersClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstances.java new file mode 100644 index 000000000000..94cf0578fc05 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstances.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncApplyUpdatesToInstances { + + public static void main(String[] args) throws Exception { + asyncApplyUpdatesToInstances(); + } + + public static void asyncApplyUpdatesToInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ApplyUpdatesToInstancesInstanceGroupManagerRequest request = + ApplyUpdatesToInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersApplyUpdatesRequestResource( + InstanceGroupManagersApplyUpdatesRequest.newBuilder().build()) + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.applyUpdatesToInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstancesLRO.java new file mode 100644 index 000000000000..13e1ecec82ce --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstancesLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncApplyUpdatesToInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncApplyUpdatesToInstancesLRO(); + } + + public static void asyncApplyUpdatesToInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ApplyUpdatesToInstancesInstanceGroupManagerRequest request = + ApplyUpdatesToInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersApplyUpdatesRequestResource( + InstanceGroupManagersApplyUpdatesRequest.newBuilder().build()) + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient + .applyUpdatesToInstancesOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstances.java new file mode 100644 index 000000000000..4f33a5ed1144 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstances.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_sync] +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncApplyUpdatesToInstances { + + public static void main(String[] args) throws Exception { + syncApplyUpdatesToInstances(); + } + + public static void syncApplyUpdatesToInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ApplyUpdatesToInstancesInstanceGroupManagerRequest request = + ApplyUpdatesToInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersApplyUpdatesRequestResource( + InstanceGroupManagersApplyUpdatesRequest.newBuilder().build()) + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.applyUpdatesToInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstancesStringStringStringInstancegroupmanagersapplyupdatesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstancesStringStringStringInstancegroupmanagersapplyupdatesrequest.java new file mode 100644 index 000000000000..ff1e20e9adad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstancesStringStringStringInstancegroupmanagersapplyupdatesrequest.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_StringStringStringInstancegroupmanagersapplyupdatesrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncApplyUpdatesToInstancesStringStringStringInstancegroupmanagersapplyupdatesrequest { + + public static void main(String[] args) throws Exception { + syncApplyUpdatesToInstancesStringStringStringInstancegroupmanagersapplyupdatesrequest(); + } + + public static void + syncApplyUpdatesToInstancesStringStringStringInstancegroupmanagersapplyupdatesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource = + InstanceGroupManagersApplyUpdatesRequest.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .applyUpdatesToInstancesAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersApplyUpdatesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_StringStringStringInstancegroupmanagersapplyupdatesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..7a3d0fb63b8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceGroupManagersSettings instanceGroupManagersSettings = + InstanceGroupManagersSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create(instanceGroupManagersSettings); + } +} +// [END compute_v1_generated_InstanceGroupManagers_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..ca1e4f653682 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceGroupManagersSettings instanceGroupManagersSettings = + InstanceGroupManagersSettings.newBuilder().setEndpoint(myEndpoint).build(); + InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create(instanceGroupManagersSettings); + } +} +// [END compute_v1_generated_InstanceGroupManagers_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/AsyncCreateInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/AsyncCreateInstances.java new file mode 100644 index 000000000000..45f09a290b5e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/AsyncCreateInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_CreateInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest; +import com.google.longrunning.Operation; + +public class AsyncCreateInstances { + + public static void main(String[] args) throws Exception { + asyncCreateInstances(); + } + + public static void asyncCreateInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + CreateInstancesInstanceGroupManagerRequest request = + CreateInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersCreateInstancesRequestResource( + InstanceGroupManagersCreateInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.createInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_CreateInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/AsyncCreateInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/AsyncCreateInstancesLRO.java new file mode 100644 index 000000000000..320490f5b05c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/AsyncCreateInstancesLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_CreateInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncCreateInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncCreateInstancesLRO(); + } + + public static void asyncCreateInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + CreateInstancesInstanceGroupManagerRequest request = + CreateInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersCreateInstancesRequestResource( + InstanceGroupManagersCreateInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.createInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_CreateInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/SyncCreateInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/SyncCreateInstances.java new file mode 100644 index 000000000000..4f77aa0874a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/SyncCreateInstances.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_CreateInstances_sync] +import com.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncCreateInstances { + + public static void main(String[] args) throws Exception { + syncCreateInstances(); + } + + public static void syncCreateInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + CreateInstancesInstanceGroupManagerRequest request = + CreateInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersCreateInstancesRequestResource( + InstanceGroupManagersCreateInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.createInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_CreateInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/SyncCreateInstancesStringStringStringInstancegroupmanagerscreateinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/SyncCreateInstancesStringStringStringInstancegroupmanagerscreateinstancesrequest.java new file mode 100644 index 000000000000..36d6bab4bf8f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/createinstances/SyncCreateInstancesStringStringStringInstancegroupmanagerscreateinstancesrequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_CreateInstances_StringStringStringInstancegroupmanagerscreateinstancesrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncCreateInstancesStringStringStringInstancegroupmanagerscreateinstancesrequest { + + public static void main(String[] args) throws Exception { + syncCreateInstancesStringStringStringInstancegroupmanagerscreateinstancesrequest(); + } + + public static void + syncCreateInstancesStringStringStringInstancegroupmanagerscreateinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersCreateInstancesRequest + instanceGroupManagersCreateInstancesRequestResource = + InstanceGroupManagersCreateInstancesRequest.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .createInstancesAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersCreateInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_CreateInstances_StringStringStringInstancegroupmanagerscreateinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/AsyncDelete.java new file mode 100644 index 000000000000..c2d99827839e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeleteInstanceGroupManagerRequest request = + DeleteInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..9746dc7d331e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeleteInstanceGroupManagerRequest request = + DeleteInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/SyncDelete.java new file mode 100644 index 000000000000..8e68f901b38d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Delete_sync] +import com.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeleteInstanceGroupManagerRequest request = + DeleteInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..358c21c9007c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + Operation response = + instanceGroupManagersClient.deleteAsync(project, zone, instanceGroupManager).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/AsyncDeleteInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/AsyncDeleteInstances.java new file mode 100644 index 000000000000..a70ddb93fd13 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/AsyncDeleteInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_DeleteInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteInstances { + + public static void main(String[] args) throws Exception { + asyncDeleteInstances(); + } + + public static void asyncDeleteInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeleteInstancesInstanceGroupManagerRequest request = + DeleteInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersDeleteInstancesRequestResource( + InstanceGroupManagersDeleteInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.deleteInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_DeleteInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/AsyncDeleteInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/AsyncDeleteInstancesLRO.java new file mode 100644 index 000000000000..4f2c5d8fb454 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/AsyncDeleteInstancesLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_DeleteInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteInstancesLRO(); + } + + public static void asyncDeleteInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeleteInstancesInstanceGroupManagerRequest request = + DeleteInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersDeleteInstancesRequestResource( + InstanceGroupManagersDeleteInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.deleteInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_DeleteInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/SyncDeleteInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/SyncDeleteInstances.java new file mode 100644 index 000000000000..c3754a76f7cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/SyncDeleteInstances.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_DeleteInstances_sync] +import com.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteInstances { + + public static void main(String[] args) throws Exception { + syncDeleteInstances(); + } + + public static void syncDeleteInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeleteInstancesInstanceGroupManagerRequest request = + DeleteInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersDeleteInstancesRequestResource( + InstanceGroupManagersDeleteInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.deleteInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_DeleteInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/SyncDeleteInstancesStringStringStringInstancegroupmanagersdeleteinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/SyncDeleteInstancesStringStringStringInstancegroupmanagersdeleteinstancesrequest.java new file mode 100644 index 000000000000..ddb22cc7df2b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteinstances/SyncDeleteInstancesStringStringStringInstancegroupmanagersdeleteinstancesrequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_DeleteInstances_StringStringStringInstancegroupmanagersdeleteinstancesrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteInstancesStringStringStringInstancegroupmanagersdeleteinstancesrequest { + + public static void main(String[] args) throws Exception { + syncDeleteInstancesStringStringStringInstancegroupmanagersdeleteinstancesrequest(); + } + + public static void + syncDeleteInstancesStringStringStringInstancegroupmanagersdeleteinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersDeleteInstancesRequest + instanceGroupManagersDeleteInstancesRequestResource = + InstanceGroupManagersDeleteInstancesRequest.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .deleteInstancesAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersDeleteInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_DeleteInstances_StringStringStringInstancegroupmanagersdeleteinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigs.java new file mode 100644 index 000000000000..1faa4c811b7d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigs.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq; +import com.google.longrunning.Operation; + +public class AsyncDeletePerInstanceConfigs { + + public static void main(String[] args) throws Exception { + asyncDeletePerInstanceConfigs(); + } + + public static void asyncDeletePerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeletePerInstanceConfigsInstanceGroupManagerRequest request = + DeletePerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersDeletePerInstanceConfigsReqResource( + InstanceGroupManagersDeletePerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.deletePerInstanceConfigsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigsLRO.java new file mode 100644 index 000000000000..49cfbe642459 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigsLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeletePerInstanceConfigsLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePerInstanceConfigsLRO(); + } + + public static void asyncDeletePerInstanceConfigsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeletePerInstanceConfigsInstanceGroupManagerRequest request = + DeletePerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersDeletePerInstanceConfigsReqResource( + InstanceGroupManagersDeletePerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient + .deletePerInstanceConfigsOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigs.java new file mode 100644 index 000000000000..e182d86da488 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigs.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_sync] +import com.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeletePerInstanceConfigs { + + public static void main(String[] args) throws Exception { + syncDeletePerInstanceConfigs(); + } + + public static void syncDeletePerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + DeletePerInstanceConfigsInstanceGroupManagerRequest request = + DeletePerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersDeletePerInstanceConfigsReqResource( + InstanceGroupManagersDeletePerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.deletePerInstanceConfigsAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigsStringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigsStringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq.java new file mode 100644 index 000000000000..f74286619962 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigsStringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_StringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; + +public +class SyncDeletePerInstanceConfigsStringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq { + + public static void main(String[] args) throws Exception { + syncDeletePerInstanceConfigsStringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq(); + } + + public static void + syncDeletePerInstanceConfigsStringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersDeletePerInstanceConfigsReq + instanceGroupManagersDeletePerInstanceConfigsReqResource = + InstanceGroupManagersDeletePerInstanceConfigsReq.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .deletePerInstanceConfigsAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersDeletePerInstanceConfigsReqResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_StringStringStringInstancegroupmanagersdeleteperinstanceconfigsreq_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/AsyncGet.java new file mode 100644 index 000000000000..794523fc96fd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + GetInstanceGroupManagerRequest request = + GetInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.getCallable().futureCall(request); + // Do something. + InstanceGroupManager response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/SyncGet.java new file mode 100644 index 000000000000..a3ef8afb3240 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Get_sync] +import com.google.cloud.compute.v1.GetInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + GetInstanceGroupManagerRequest request = + GetInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + InstanceGroupManager response = instanceGroupManagersClient.get(request); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..15a40c36610b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Get_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManager response = + instanceGroupManagersClient.get(project, zone, instanceGroupManager); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/AsyncInsert.java new file mode 100644 index 000000000000..4b18ebfa3073 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + InsertInstanceGroupManagerRequest request = + InsertInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..8998dbc6329f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + InsertInstanceGroupManagerRequest request = + InsertInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/SyncInsert.java new file mode 100644 index 000000000000..5a99641eae78 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Insert_sync] +import com.google.cloud.compute.v1.InsertInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + InsertInstanceGroupManagerRequest request = + InsertInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/SyncInsertStringStringInstancegroupmanager.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/SyncInsertStringStringInstancegroupmanager.java new file mode 100644 index 000000000000..364c1c19ad26 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/insert/SyncInsertStringStringInstancegroupmanager.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Insert_StringStringInstancegroupmanager_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringInstancegroupmanager { + + public static void main(String[] args) throws Exception { + syncInsertStringStringInstancegroupmanager(); + } + + public static void syncInsertStringStringInstancegroupmanager() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .insertAsync(project, zone, instanceGroupManagerResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Insert_StringStringInstancegroupmanager_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/AsyncList.java new file mode 100644 index 000000000000..003823ca88d6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ListInstanceGroupManagersRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListInstanceGroupManagersRequest request = + ListInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.listPagedCallable().futureCall(request); + // Do something. + for (InstanceGroupManager element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/AsyncListPaged.java new file mode 100644 index 000000000000..cf8c8a62ac18 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_List_Paged_async] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagerList; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ListInstanceGroupManagersRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListInstanceGroupManagersRequest request = + ListInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + InstanceGroupManagerList response = + instanceGroupManagersClient.listCallable().call(request); + for (InstanceGroupManager element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/SyncList.java new file mode 100644 index 000000000000..1e94bee2e1d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_List_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ListInstanceGroupManagersRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListInstanceGroupManagersRequest request = + ListInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (InstanceGroupManager element : instanceGroupManagersClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/SyncListStringString.java new file mode 100644 index 000000000000..547026f852c1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_List_StringString_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (InstanceGroupManager element : + instanceGroupManagersClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/AsyncListErrors.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/AsyncListErrors.java new file mode 100644 index 000000000000..b2c042331da8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/AsyncListErrors.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListErrors_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest; + +public class AsyncListErrors { + + public static void main(String[] args) throws Exception { + asyncListErrors(); + } + + public static void asyncListErrors() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListErrorsInstanceGroupManagersRequest request = + ListErrorsInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.listErrorsPagedCallable().futureCall(request); + // Do something. + for (InstanceManagedByIgmError element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListErrors_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/AsyncListErrorsPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/AsyncListErrorsPaged.java new file mode 100644 index 000000000000..36666d3ab3d8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/AsyncListErrorsPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListErrors_Paged_async] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersListErrorsResponse; +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest; +import com.google.common.base.Strings; + +public class AsyncListErrorsPaged { + + public static void main(String[] args) throws Exception { + asyncListErrorsPaged(); + } + + public static void asyncListErrorsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListErrorsInstanceGroupManagersRequest request = + ListErrorsInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + InstanceGroupManagersListErrorsResponse response = + instanceGroupManagersClient.listErrorsCallable().call(request); + for (InstanceManagedByIgmError element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListErrors_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/SyncListErrors.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/SyncListErrors.java new file mode 100644 index 000000000000..871d0781371f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/SyncListErrors.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListErrors_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest; + +public class SyncListErrors { + + public static void main(String[] args) throws Exception { + syncListErrors(); + } + + public static void syncListErrors() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListErrorsInstanceGroupManagersRequest request = + ListErrorsInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (InstanceManagedByIgmError element : + instanceGroupManagersClient.listErrors(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListErrors_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/SyncListErrorsStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/SyncListErrorsStringStringString.java new file mode 100644 index 000000000000..1463436114c8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listerrors/SyncListErrorsStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListErrors_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceManagedByIgmError; + +public class SyncListErrorsStringStringString { + + public static void main(String[] args) throws Exception { + syncListErrorsStringStringString(); + } + + public static void syncListErrorsStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + for (InstanceManagedByIgmError element : + instanceGroupManagersClient + .listErrors(project, zone, instanceGroupManager) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListErrors_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/AsyncListManagedInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/AsyncListManagedInstances.java new file mode 100644 index 000000000000..2d2451e7fb7c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/AsyncListManagedInstances.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListManagedInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.ManagedInstance; + +public class AsyncListManagedInstances { + + public static void main(String[] args) throws Exception { + asyncListManagedInstances(); + } + + public static void asyncListManagedInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListManagedInstancesInstanceGroupManagersRequest request = + ListManagedInstancesInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.listManagedInstancesPagedCallable().futureCall(request); + // Do something. + for (ManagedInstance element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListManagedInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/AsyncListManagedInstancesPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/AsyncListManagedInstancesPaged.java new file mode 100644 index 000000000000..7605d5eb9c21 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/AsyncListManagedInstancesPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListManagedInstances_Paged_async] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersListManagedInstancesResponse; +import com.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.ManagedInstance; +import com.google.common.base.Strings; + +public class AsyncListManagedInstancesPaged { + + public static void main(String[] args) throws Exception { + asyncListManagedInstancesPaged(); + } + + public static void asyncListManagedInstancesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListManagedInstancesInstanceGroupManagersRequest request = + ListManagedInstancesInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + InstanceGroupManagersListManagedInstancesResponse response = + instanceGroupManagersClient.listManagedInstancesCallable().call(request); + for (ManagedInstance element : response.getManagedInstancesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListManagedInstances_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/SyncListManagedInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/SyncListManagedInstances.java new file mode 100644 index 000000000000..e243cc645715 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/SyncListManagedInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListManagedInstances_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.ManagedInstance; + +public class SyncListManagedInstances { + + public static void main(String[] args) throws Exception { + syncListManagedInstances(); + } + + public static void syncListManagedInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListManagedInstancesInstanceGroupManagersRequest request = + ListManagedInstancesInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (ManagedInstance element : + instanceGroupManagersClient.listManagedInstances(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListManagedInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/SyncListManagedInstancesStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/SyncListManagedInstancesStringStringString.java new file mode 100644 index 000000000000..677b134f29b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listmanagedinstances/SyncListManagedInstancesStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListManagedInstances_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ManagedInstance; + +public class SyncListManagedInstancesStringStringString { + + public static void main(String[] args) throws Exception { + syncListManagedInstancesStringStringString(); + } + + public static void syncListManagedInstancesStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + for (ManagedInstance element : + instanceGroupManagersClient + .listManagedInstances(project, zone, instanceGroupManager) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListManagedInstances_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigs.java new file mode 100644 index 000000000000..c8dfb26aa17f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigs.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.PerInstanceConfig; + +public class AsyncListPerInstanceConfigs { + + public static void main(String[] args) throws Exception { + asyncListPerInstanceConfigs(); + } + + public static void asyncListPerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListPerInstanceConfigsInstanceGroupManagersRequest request = + ListPerInstanceConfigsInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.listPerInstanceConfigsPagedCallable().futureCall(request); + // Do something. + for (PerInstanceConfig element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigsPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigsPaged.java new file mode 100644 index 000000000000..ca9e8cda2196 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigsPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_Paged_async] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersListPerInstanceConfigsResp; +import com.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.PerInstanceConfig; +import com.google.common.base.Strings; + +public class AsyncListPerInstanceConfigsPaged { + + public static void main(String[] args) throws Exception { + asyncListPerInstanceConfigsPaged(); + } + + public static void asyncListPerInstanceConfigsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListPerInstanceConfigsInstanceGroupManagersRequest request = + ListPerInstanceConfigsInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + InstanceGroupManagersListPerInstanceConfigsResp response = + instanceGroupManagersClient.listPerInstanceConfigsCallable().call(request); + for (PerInstanceConfig element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigs.java new file mode 100644 index 000000000000..de747f15b1cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigs.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.PerInstanceConfig; + +public class SyncListPerInstanceConfigs { + + public static void main(String[] args) throws Exception { + syncListPerInstanceConfigs(); + } + + public static void syncListPerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ListPerInstanceConfigsInstanceGroupManagersRequest request = + ListPerInstanceConfigsInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (PerInstanceConfig element : + instanceGroupManagersClient.listPerInstanceConfigs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigsStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigsStringStringString.java new file mode 100644 index 000000000000..63f4a102765c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigsStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.PerInstanceConfig; + +public class SyncListPerInstanceConfigsStringStringString { + + public static void main(String[] args) throws Exception { + syncListPerInstanceConfigsStringStringString(); + } + + public static void syncListPerInstanceConfigsStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + for (PerInstanceConfig element : + instanceGroupManagersClient + .listPerInstanceConfigs(project, zone, instanceGroupManager) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/AsyncPatch.java new file mode 100644 index 000000000000..3cb9a9546c8a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/AsyncPatch.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.PatchInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + PatchInstanceGroupManagerRequest request = + PatchInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instanceGroupManagersClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..74cfffc39c7f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchInstanceGroupManagerRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + PatchInstanceGroupManagerRequest request = + PatchInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/SyncPatch.java new file mode 100644 index 000000000000..ca9fcc46de32 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Patch_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchInstanceGroupManagerRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + PatchInstanceGroupManagerRequest request = + PatchInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/SyncPatchStringStringStringInstancegroupmanager.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/SyncPatchStringStringStringInstancegroupmanager.java new file mode 100644 index 000000000000..bdf260c90119 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patch/SyncPatchStringStringStringInstancegroupmanager.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Patch_StringStringStringInstancegroupmanager_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringStringInstancegroupmanager { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringInstancegroupmanager(); + } + + public static void syncPatchStringStringStringInstancegroupmanager() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .patchAsync(project, zone, instanceGroupManager, instanceGroupManagerResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Patch_StringStringStringInstancegroupmanager_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigs.java new file mode 100644 index 000000000000..c12b4683b49c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigs.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq; +import com.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncPatchPerInstanceConfigs { + + public static void main(String[] args) throws Exception { + asyncPatchPerInstanceConfigs(); + } + + public static void asyncPatchPerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + PatchPerInstanceConfigsInstanceGroupManagerRequest request = + PatchPerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersPatchPerInstanceConfigsReqResource( + InstanceGroupManagersPatchPerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.patchPerInstanceConfigsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigsLRO.java new file mode 100644 index 000000000000..8b1a899a0a33 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigsLRO.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest; + +public class AsyncPatchPerInstanceConfigsLRO { + + public static void main(String[] args) throws Exception { + asyncPatchPerInstanceConfigsLRO(); + } + + public static void asyncPatchPerInstanceConfigsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + PatchPerInstanceConfigsInstanceGroupManagerRequest request = + PatchPerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersPatchPerInstanceConfigsReqResource( + InstanceGroupManagersPatchPerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient + .patchPerInstanceConfigsOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigs.java new file mode 100644 index 000000000000..7c4eea38c4b6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigs.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest; + +public class SyncPatchPerInstanceConfigs { + + public static void main(String[] args) throws Exception { + syncPatchPerInstanceConfigs(); + } + + public static void syncPatchPerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + PatchPerInstanceConfigsInstanceGroupManagerRequest request = + PatchPerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersPatchPerInstanceConfigsReqResource( + InstanceGroupManagersPatchPerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.patchPerInstanceConfigsAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigsStringStringStringInstancegroupmanagerspatchperinstanceconfigsreq.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigsStringStringStringInstancegroupmanagerspatchperinstanceconfigsreq.java new file mode 100644 index 000000000000..00abf670cc4a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigsStringStringStringInstancegroupmanagerspatchperinstanceconfigsreq.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_StringStringStringInstancegroupmanagerspatchperinstanceconfigsreq_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; + +public +class SyncPatchPerInstanceConfigsStringStringStringInstancegroupmanagerspatchperinstanceconfigsreq { + + public static void main(String[] args) throws Exception { + syncPatchPerInstanceConfigsStringStringStringInstancegroupmanagerspatchperinstanceconfigsreq(); + } + + public static void + syncPatchPerInstanceConfigsStringStringStringInstancegroupmanagerspatchperinstanceconfigsreq() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersPatchPerInstanceConfigsReq + instanceGroupManagersPatchPerInstanceConfigsReqResource = + InstanceGroupManagersPatchPerInstanceConfigsReq.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .patchPerInstanceConfigsAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersPatchPerInstanceConfigsReqResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_StringStringStringInstancegroupmanagerspatchperinstanceconfigsreq_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/AsyncRecreateInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/AsyncRecreateInstances.java new file mode 100644 index 000000000000..1e157c41c516 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/AsyncRecreateInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_RecreateInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest; +import com.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncRecreateInstances { + + public static void main(String[] args) throws Exception { + asyncRecreateInstances(); + } + + public static void asyncRecreateInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + RecreateInstancesInstanceGroupManagerRequest request = + RecreateInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersRecreateInstancesRequestResource( + InstanceGroupManagersRecreateInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.recreateInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_RecreateInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/AsyncRecreateInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/AsyncRecreateInstancesLRO.java new file mode 100644 index 000000000000..42a451406fa1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/AsyncRecreateInstancesLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_RecreateInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest; + +public class AsyncRecreateInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncRecreateInstancesLRO(); + } + + public static void asyncRecreateInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + RecreateInstancesInstanceGroupManagerRequest request = + RecreateInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersRecreateInstancesRequestResource( + InstanceGroupManagersRecreateInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.recreateInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_RecreateInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/SyncRecreateInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/SyncRecreateInstances.java new file mode 100644 index 000000000000..f796e95291b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/SyncRecreateInstances.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_RecreateInstances_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest; + +public class SyncRecreateInstances { + + public static void main(String[] args) throws Exception { + syncRecreateInstances(); + } + + public static void syncRecreateInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + RecreateInstancesInstanceGroupManagerRequest request = + RecreateInstancesInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersRecreateInstancesRequestResource( + InstanceGroupManagersRecreateInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.recreateInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_RecreateInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/SyncRecreateInstancesStringStringStringInstancegroupmanagersrecreateinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/SyncRecreateInstancesStringStringStringInstancegroupmanagersrecreateinstancesrequest.java new file mode 100644 index 000000000000..5271b30a21d4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/recreateinstances/SyncRecreateInstancesStringStringStringInstancegroupmanagersrecreateinstancesrequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_RecreateInstances_StringStringStringInstancegroupmanagersrecreateinstancesrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncRecreateInstancesStringStringStringInstancegroupmanagersrecreateinstancesrequest { + + public static void main(String[] args) throws Exception { + syncRecreateInstancesStringStringStringInstancegroupmanagersrecreateinstancesrequest(); + } + + public static void + syncRecreateInstancesStringStringStringInstancegroupmanagersrecreateinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersRecreateInstancesRequest + instanceGroupManagersRecreateInstancesRequestResource = + InstanceGroupManagersRecreateInstancesRequest.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .recreateInstancesAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersRecreateInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_RecreateInstances_StringStringStringInstancegroupmanagersrecreateinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/AsyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/AsyncResize.java new file mode 100644 index 000000000000..31f8f5d5c43f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/AsyncResize.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Resize_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncResize { + + public static void main(String[] args) throws Exception { + asyncResize(); + } + + public static void asyncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ResizeInstanceGroupManagerRequest request = + ResizeInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSize(3530753) + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.resizeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Resize_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/AsyncResizeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/AsyncResizeLRO.java new file mode 100644 index 000000000000..04d7008fb5c8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/AsyncResizeLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Resize_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest; + +public class AsyncResizeLRO { + + public static void main(String[] args) throws Exception { + asyncResizeLRO(); + } + + public static void asyncResizeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ResizeInstanceGroupManagerRequest request = + ResizeInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSize(3530753) + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.resizeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Resize_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/SyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/SyncResize.java new file mode 100644 index 000000000000..28d7ef27038e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/SyncResize.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Resize_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest; + +public class SyncResize { + + public static void main(String[] args) throws Exception { + syncResize(); + } + + public static void syncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + ResizeInstanceGroupManagerRequest request = + ResizeInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSize(3530753) + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.resizeAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Resize_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/SyncResizeStringStringStringInt.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/SyncResizeStringStringStringInt.java new file mode 100644 index 000000000000..fcd6edf4df88 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/resize/SyncResizeStringStringStringInt.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_Resize_StringStringStringInt_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncResizeStringStringStringInt { + + public static void main(String[] args) throws Exception { + syncResizeStringStringStringInt(); + } + + public static void syncResizeStringStringStringInt() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + int size = 3530753; + Operation response = + instanceGroupManagersClient.resizeAsync(project, zone, instanceGroupManager, size).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_Resize_StringStringStringInt_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplate.java new file mode 100644 index 000000000000..79e9b031dd2c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplate.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_SetInstanceTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest; +import com.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncSetInstanceTemplate { + + public static void main(String[] args) throws Exception { + asyncSetInstanceTemplate(); + } + + public static void asyncSetInstanceTemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + SetInstanceTemplateInstanceGroupManagerRequest request = + SetInstanceTemplateInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersSetInstanceTemplateRequestResource( + InstanceGroupManagersSetInstanceTemplateRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.setInstanceTemplateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_SetInstanceTemplate_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplateLRO.java new file mode 100644 index 000000000000..05e9822344d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplateLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_SetInstanceTemplate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest; + +public class AsyncSetInstanceTemplateLRO { + + public static void main(String[] args) throws Exception { + asyncSetInstanceTemplateLRO(); + } + + public static void asyncSetInstanceTemplateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + SetInstanceTemplateInstanceGroupManagerRequest request = + SetInstanceTemplateInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersSetInstanceTemplateRequestResource( + InstanceGroupManagersSetInstanceTemplateRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.setInstanceTemplateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_SetInstanceTemplate_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplate.java new file mode 100644 index 000000000000..a4dac58090ff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplate.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_SetInstanceTemplate_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest; + +public class SyncSetInstanceTemplate { + + public static void main(String[] args) throws Exception { + syncSetInstanceTemplate(); + } + + public static void syncSetInstanceTemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + SetInstanceTemplateInstanceGroupManagerRequest request = + SetInstanceTemplateInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersSetInstanceTemplateRequestResource( + InstanceGroupManagersSetInstanceTemplateRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.setInstanceTemplateAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_SetInstanceTemplate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplateStringStringStringInstancegroupmanagerssetinstancetemplaterequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplateStringStringStringInstancegroupmanagerssetinstancetemplaterequest.java new file mode 100644 index 000000000000..24a035749be8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplateStringStringStringInstancegroupmanagerssetinstancetemplaterequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_SetInstanceTemplate_StringStringStringInstancegroupmanagerssetinstancetemplaterequest_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest; +import com.google.cloud.compute.v1.Operation; + +public +class SyncSetInstanceTemplateStringStringStringInstancegroupmanagerssetinstancetemplaterequest { + + public static void main(String[] args) throws Exception { + syncSetInstanceTemplateStringStringStringInstancegroupmanagerssetinstancetemplaterequest(); + } + + public static void + syncSetInstanceTemplateStringStringStringInstancegroupmanagerssetinstancetemplaterequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersSetInstanceTemplateRequest + instanceGroupManagersSetInstanceTemplateRequestResource = + InstanceGroupManagersSetInstanceTemplateRequest.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .setInstanceTemplateAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersSetInstanceTemplateRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_SetInstanceTemplate_StringStringStringInstancegroupmanagerssetinstancetemplaterequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/AsyncSetTargetPools.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/AsyncSetTargetPools.java new file mode 100644 index 000000000000..319fca09e198 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/AsyncSetTargetPools.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_SetTargetPools_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequest; +import com.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncSetTargetPools { + + public static void main(String[] args) throws Exception { + asyncSetTargetPools(); + } + + public static void asyncSetTargetPools() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + SetTargetPoolsInstanceGroupManagerRequest request = + SetTargetPoolsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersSetTargetPoolsRequestResource( + InstanceGroupManagersSetTargetPoolsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.setTargetPoolsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_SetTargetPools_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/AsyncSetTargetPoolsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/AsyncSetTargetPoolsLRO.java new file mode 100644 index 000000000000..1862ab999410 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/AsyncSetTargetPoolsLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_SetTargetPools_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest; + +public class AsyncSetTargetPoolsLRO { + + public static void main(String[] args) throws Exception { + asyncSetTargetPoolsLRO(); + } + + public static void asyncSetTargetPoolsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + SetTargetPoolsInstanceGroupManagerRequest request = + SetTargetPoolsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersSetTargetPoolsRequestResource( + InstanceGroupManagersSetTargetPoolsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient.setTargetPoolsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_SetTargetPools_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/SyncSetTargetPools.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/SyncSetTargetPools.java new file mode 100644 index 000000000000..35efceae84a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/SyncSetTargetPools.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_SetTargetPools_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest; + +public class SyncSetTargetPools { + + public static void main(String[] args) throws Exception { + syncSetTargetPools(); + } + + public static void syncSetTargetPools() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + SetTargetPoolsInstanceGroupManagerRequest request = + SetTargetPoolsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersSetTargetPoolsRequestResource( + InstanceGroupManagersSetTargetPoolsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.setTargetPoolsAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_SetTargetPools_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/SyncSetTargetPoolsStringStringStringInstancegroupmanagerssettargetpoolsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/SyncSetTargetPoolsStringStringStringInstancegroupmanagerssettargetpoolsrequest.java new file mode 100644 index 000000000000..665592f80415 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/settargetpools/SyncSetTargetPoolsStringStringStringInstancegroupmanagerssettargetpoolsrequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_SetTargetPools_StringStringStringInstancegroupmanagerssettargetpoolsrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetTargetPoolsStringStringStringInstancegroupmanagerssettargetpoolsrequest { + + public static void main(String[] args) throws Exception { + syncSetTargetPoolsStringStringStringInstancegroupmanagerssettargetpoolsrequest(); + } + + public static void + syncSetTargetPoolsStringStringStringInstancegroupmanagerssettargetpoolsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersSetTargetPoolsRequest + instanceGroupManagersSetTargetPoolsRequestResource = + InstanceGroupManagersSetTargetPoolsRequest.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .setTargetPoolsAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersSetTargetPoolsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_SetTargetPools_StringStringStringInstancegroupmanagerssettargetpoolsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigs.java new file mode 100644 index 000000000000..db535046b9d2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigs.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq; +import com.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdatePerInstanceConfigs { + + public static void main(String[] args) throws Exception { + asyncUpdatePerInstanceConfigs(); + } + + public static void asyncUpdatePerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + UpdatePerInstanceConfigsInstanceGroupManagerRequest request = + UpdatePerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersUpdatePerInstanceConfigsReqResource( + InstanceGroupManagersUpdatePerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupManagersClient.updatePerInstanceConfigsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigsLRO.java new file mode 100644 index 000000000000..d99264e16da5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigsLRO.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest; + +public class AsyncUpdatePerInstanceConfigsLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePerInstanceConfigsLRO(); + } + + public static void asyncUpdatePerInstanceConfigsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + UpdatePerInstanceConfigsInstanceGroupManagerRequest request = + UpdatePerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersUpdatePerInstanceConfigsReqResource( + InstanceGroupManagersUpdatePerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupManagersClient + .updatePerInstanceConfigsOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigs.java new file mode 100644 index 000000000000..c8503667d557 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigs.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest; + +public class SyncUpdatePerInstanceConfigs { + + public static void main(String[] args) throws Exception { + syncUpdatePerInstanceConfigs(); + } + + public static void syncUpdatePerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + UpdatePerInstanceConfigsInstanceGroupManagerRequest request = + UpdatePerInstanceConfigsInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagersUpdatePerInstanceConfigsReqResource( + InstanceGroupManagersUpdatePerInstanceConfigsReq.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupManagersClient.updatePerInstanceConfigsAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigsStringStringStringInstancegroupmanagersupdateperinstanceconfigsreq.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigsStringStringStringInstancegroupmanagersupdateperinstanceconfigsreq.java new file mode 100644 index 000000000000..447d0a9b6fc6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigsStringStringStringInstancegroupmanagersupdateperinstanceconfigsreq.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_StringStringStringInstancegroupmanagersupdateperinstanceconfigsreq_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersClient; +import com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq; +import com.google.cloud.compute.v1.Operation; + +public +class SyncUpdatePerInstanceConfigsStringStringStringInstancegroupmanagersupdateperinstanceconfigsreq { + + public static void main(String[] args) throws Exception { + syncUpdatePerInstanceConfigsStringStringStringInstancegroupmanagersupdateperinstanceconfigsreq(); + } + + public static void + syncUpdatePerInstanceConfigsStringStringStringInstancegroupmanagersupdateperinstanceconfigsreq() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupManagersClient instanceGroupManagersClient = + InstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManagersUpdatePerInstanceConfigsReq + instanceGroupManagersUpdatePerInstanceConfigsReqResource = + InstanceGroupManagersUpdatePerInstanceConfigsReq.newBuilder().build(); + Operation response = + instanceGroupManagersClient + .updatePerInstanceConfigsAsync( + project, + zone, + instanceGroupManager, + instanceGroupManagersUpdatePerInstanceConfigsReqResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_StringStringStringInstancegroupmanagersupdateperinstanceconfigsreq_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagerssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagerssettings/get/SyncGet.java new file mode 100644 index 000000000000..c689588c84da --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupmanagerssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupManagersSettings_Get_sync] +import com.google.cloud.compute.v1.InstanceGroupManagersSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceGroupManagersSettings.Builder instanceGroupManagersSettingsBuilder = + InstanceGroupManagersSettings.newBuilder(); + instanceGroupManagersSettingsBuilder + .getSettings() + .setRetrySettings( + instanceGroupManagersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InstanceGroupManagersSettings instanceGroupManagersSettings = + instanceGroupManagersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InstanceGroupManagersSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/AsyncAddInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/AsyncAddInstances.java new file mode 100644 index 000000000000..c00bedcae5ee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/AsyncAddInstances.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_AddInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddInstancesInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncAddInstances { + + public static void main(String[] args) throws Exception { + asyncAddInstances(); + } + + public static void asyncAddInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + AddInstancesInstanceGroupRequest request = + AddInstancesInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsAddInstancesRequestResource( + InstanceGroupsAddInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instanceGroupsClient.addInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_AddInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/AsyncAddInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/AsyncAddInstancesLRO.java new file mode 100644 index 000000000000..f951442e25e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/AsyncAddInstancesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_AddInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddInstancesInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncAddInstancesLRO(); + } + + public static void asyncAddInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + AddInstancesInstanceGroupRequest request = + AddInstancesInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsAddInstancesRequestResource( + InstanceGroupsAddInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupsClient.addInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_AddInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/SyncAddInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/SyncAddInstances.java new file mode 100644 index 000000000000..e9c05cf3bcd2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/SyncAddInstances.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_AddInstances_sync] +import com.google.cloud.compute.v1.AddInstancesInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddInstances { + + public static void main(String[] args) throws Exception { + syncAddInstances(); + } + + public static void syncAddInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + AddInstancesInstanceGroupRequest request = + AddInstancesInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsAddInstancesRequestResource( + InstanceGroupsAddInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupsClient.addInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_AddInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/SyncAddInstancesStringStringStringInstancegroupsaddinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/SyncAddInstancesStringStringStringInstancegroupsaddinstancesrequest.java new file mode 100644 index 000000000000..b9d253209f3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/addinstances/SyncAddInstancesStringStringStringInstancegroupsaddinstancesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_AddInstances_StringStringStringInstancegroupsaddinstancesrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddInstancesStringStringStringInstancegroupsaddinstancesrequest { + + public static void main(String[] args) throws Exception { + syncAddInstancesStringStringStringInstancegroupsaddinstancesrequest(); + } + + public static void syncAddInstancesStringStringStringInstancegroupsaddinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroup = "instanceGroup-1404696854"; + InstanceGroupsAddInstancesRequest instanceGroupsAddInstancesRequestResource = + InstanceGroupsAddInstancesRequest.newBuilder().build(); + Operation response = + instanceGroupsClient + .addInstancesAsync( + project, zone, instanceGroup, instanceGroupsAddInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_AddInstances_StringStringStringInstancegroupsaddinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..75c1dbd47824 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + AggregatedListInstanceGroupsRequest request = + AggregatedListInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + instanceGroupsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..82b8cdbf46f5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest; +import com.google.cloud.compute.v1.InstanceGroupAggregatedList; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + AggregatedListInstanceGroupsRequest request = + AggregatedListInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InstanceGroupAggregatedList response = + instanceGroupsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceGroups_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..cfb7f7c14a2f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + AggregatedListInstanceGroupsRequest request = + AggregatedListInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + instanceGroupsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..4d36c1975fb7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_AggregatedList_String_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + instanceGroupsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..db3d9400d770 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceGroupsSettings instanceGroupsSettings = + InstanceGroupsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create(instanceGroupsSettings); + } +} +// [END compute_v1_generated_InstanceGroups_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e78bd138f49a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceGroupsSettings instanceGroupsSettings = + InstanceGroupsSettings.newBuilder().setEndpoint(myEndpoint).build(); + InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create(instanceGroupsSettings); + } +} +// [END compute_v1_generated_InstanceGroups_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/AsyncDelete.java new file mode 100644 index 000000000000..b0ddb65ee8de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + DeleteInstanceGroupRequest request = + DeleteInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instanceGroupsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..9ab64cc59318 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + DeleteInstanceGroupRequest request = + DeleteInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/SyncDelete.java new file mode 100644 index 000000000000..e5c4a87cb804 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Delete_sync] +import com.google.cloud.compute.v1.DeleteInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + DeleteInstanceGroupRequest request = + DeleteInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..81cd210e0183 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroup = "instanceGroup-1404696854"; + Operation response = instanceGroupsClient.deleteAsync(project, zone, instanceGroup).get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/AsyncGet.java new file mode 100644 index 000000000000..baae879a4277 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + GetInstanceGroupRequest request = + GetInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = instanceGroupsClient.getCallable().futureCall(request); + // Do something. + InstanceGroup response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/SyncGet.java new file mode 100644 index 000000000000..e252e6d519f3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Get_sync] +import com.google.cloud.compute.v1.GetInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + GetInstanceGroupRequest request = + GetInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + InstanceGroup response = instanceGroupsClient.get(request); + } + } +} +// [END compute_v1_generated_InstanceGroups_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..188212085860 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Get_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroup = "instanceGroup-1404696854"; + InstanceGroup response = instanceGroupsClient.get(project, zone, instanceGroup); + } + } +} +// [END compute_v1_generated_InstanceGroups_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/AsyncInsert.java new file mode 100644 index 000000000000..c079ba1b7a1c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + InsertInstanceGroupRequest request = + InsertInstanceGroupRequest.newBuilder() + .setInstanceGroupResource(InstanceGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instanceGroupsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..383c972b495a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + InsertInstanceGroupRequest request = + InsertInstanceGroupRequest.newBuilder() + .setInstanceGroupResource(InstanceGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/SyncInsert.java new file mode 100644 index 000000000000..b6edfbd5caed --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Insert_sync] +import com.google.cloud.compute.v1.InsertInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + InsertInstanceGroupRequest request = + InsertInstanceGroupRequest.newBuilder() + .setInstanceGroupResource(InstanceGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/SyncInsertStringStringInstancegroup.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/SyncInsertStringStringInstancegroup.java new file mode 100644 index 000000000000..39a97e66f146 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/insert/SyncInsertStringStringInstancegroup.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_Insert_StringStringInstancegroup_sync] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringInstancegroup { + + public static void main(String[] args) throws Exception { + syncInsertStringStringInstancegroup(); + } + + public static void syncInsertStringStringInstancegroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + InstanceGroup instanceGroupResource = InstanceGroup.newBuilder().build(); + Operation response = + instanceGroupsClient.insertAsync(project, zone, instanceGroupResource).get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_Insert_StringStringInstancegroup_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/AsyncList.java new file mode 100644 index 000000000000..be80718c387d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.ListInstanceGroupsRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + ListInstanceGroupsRequest request = + ListInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupsClient.listPagedCallable().futureCall(request); + // Do something. + for (InstanceGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/AsyncListPaged.java new file mode 100644 index 000000000000..15f5104f46e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_List_Paged_async] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupList; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.ListInstanceGroupsRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + ListInstanceGroupsRequest request = + ListInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + InstanceGroupList response = instanceGroupsClient.listCallable().call(request); + for (InstanceGroup element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceGroups_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/SyncList.java new file mode 100644 index 000000000000..5c665b17675e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_List_sync] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.ListInstanceGroupsRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + ListInstanceGroupsRequest request = + ListInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (InstanceGroup element : instanceGroupsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/SyncListStringString.java new file mode 100644 index 000000000000..f06aa4f6fb19 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_List_StringString_sync] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.InstanceGroupsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (InstanceGroup element : instanceGroupsClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/AsyncListInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/AsyncListInstances.java new file mode 100644 index 000000000000..936e9c393938 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/AsyncListInstances.java @@ -0,0 +1,61 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_ListInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsListInstancesRequest; +import com.google.cloud.compute.v1.InstanceWithNamedPorts; +import com.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest; + +public class AsyncListInstances { + + public static void main(String[] args) throws Exception { + asyncListInstances(); + } + + public static void asyncListInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + ListInstancesInstanceGroupsRequest request = + ListInstancesInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsListInstancesRequestResource( + InstanceGroupsListInstancesRequest.newBuilder().build()) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupsClient.listInstancesPagedCallable().futureCall(request); + // Do something. + for (InstanceWithNamedPorts element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_ListInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/AsyncListInstancesPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/AsyncListInstancesPaged.java new file mode 100644 index 000000000000..853b975394ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/AsyncListInstancesPaged.java @@ -0,0 +1,69 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_ListInstances_Paged_async] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsListInstances; +import com.google.cloud.compute.v1.InstanceGroupsListInstancesRequest; +import com.google.cloud.compute.v1.InstanceWithNamedPorts; +import com.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest; +import com.google.common.base.Strings; + +public class AsyncListInstancesPaged { + + public static void main(String[] args) throws Exception { + asyncListInstancesPaged(); + } + + public static void asyncListInstancesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + ListInstancesInstanceGroupsRequest request = + ListInstancesInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsListInstancesRequestResource( + InstanceGroupsListInstancesRequest.newBuilder().build()) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + InstanceGroupsListInstances response = + instanceGroupsClient.listInstancesCallable().call(request); + for (InstanceWithNamedPorts element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceGroups_ListInstances_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/SyncListInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/SyncListInstances.java new file mode 100644 index 000000000000..cd3a9300d06c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/SyncListInstances.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_ListInstances_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsListInstancesRequest; +import com.google.cloud.compute.v1.InstanceWithNamedPorts; +import com.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest; + +public class SyncListInstances { + + public static void main(String[] args) throws Exception { + syncListInstances(); + } + + public static void syncListInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + ListInstancesInstanceGroupsRequest request = + ListInstancesInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsListInstancesRequestResource( + InstanceGroupsListInstancesRequest.newBuilder().build()) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (InstanceWithNamedPorts element : + instanceGroupsClient.listInstances(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_ListInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/SyncListInstancesStringStringStringInstancegroupslistinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/SyncListInstancesStringStringStringInstancegroupslistinstancesrequest.java new file mode 100644 index 000000000000..c8c32f08af63 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/listinstances/SyncListInstancesStringStringStringInstancegroupslistinstancesrequest.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_ListInstances_StringStringStringInstancegroupslistinstancesrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsListInstancesRequest; +import com.google.cloud.compute.v1.InstanceWithNamedPorts; + +public class SyncListInstancesStringStringStringInstancegroupslistinstancesrequest { + + public static void main(String[] args) throws Exception { + syncListInstancesStringStringStringInstancegroupslistinstancesrequest(); + } + + public static void syncListInstancesStringStringStringInstancegroupslistinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroup = "instanceGroup-1404696854"; + InstanceGroupsListInstancesRequest instanceGroupsListInstancesRequestResource = + InstanceGroupsListInstancesRequest.newBuilder().build(); + for (InstanceWithNamedPorts element : + instanceGroupsClient + .listInstances( + project, zone, instanceGroup, instanceGroupsListInstancesRequestResource) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceGroups_ListInstances_StringStringStringInstancegroupslistinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/AsyncRemoveInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/AsyncRemoveInstances.java new file mode 100644 index 000000000000..9cb9cfcff596 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/AsyncRemoveInstances.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_RemoveInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest; +import com.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveInstances { + + public static void main(String[] args) throws Exception { + asyncRemoveInstances(); + } + + public static void asyncRemoveInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + RemoveInstancesInstanceGroupRequest request = + RemoveInstancesInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsRemoveInstancesRequestResource( + InstanceGroupsRemoveInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupsClient.removeInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_RemoveInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/AsyncRemoveInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/AsyncRemoveInstancesLRO.java new file mode 100644 index 000000000000..8040d61827d6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/AsyncRemoveInstancesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_RemoveInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest; + +public class AsyncRemoveInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveInstancesLRO(); + } + + public static void asyncRemoveInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + RemoveInstancesInstanceGroupRequest request = + RemoveInstancesInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsRemoveInstancesRequestResource( + InstanceGroupsRemoveInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupsClient.removeInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_RemoveInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/SyncRemoveInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/SyncRemoveInstances.java new file mode 100644 index 000000000000..af4646aa355c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/SyncRemoveInstances.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_RemoveInstances_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest; + +public class SyncRemoveInstances { + + public static void main(String[] args) throws Exception { + syncRemoveInstances(); + } + + public static void syncRemoveInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + RemoveInstancesInstanceGroupRequest request = + RemoveInstancesInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsRemoveInstancesRequestResource( + InstanceGroupsRemoveInstancesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupsClient.removeInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_RemoveInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/SyncRemoveInstancesStringStringStringInstancegroupsremoveinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/SyncRemoveInstancesStringStringStringInstancegroupsremoveinstancesrequest.java new file mode 100644 index 000000000000..829a79e504dc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/removeinstances/SyncRemoveInstancesStringStringStringInstancegroupsremoveinstancesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_RemoveInstances_StringStringStringInstancegroupsremoveinstancesrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncRemoveInstancesStringStringStringInstancegroupsremoveinstancesrequest { + + public static void main(String[] args) throws Exception { + syncRemoveInstancesStringStringStringInstancegroupsremoveinstancesrequest(); + } + + public static void syncRemoveInstancesStringStringStringInstancegroupsremoveinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroup = "instanceGroup-1404696854"; + InstanceGroupsRemoveInstancesRequest instanceGroupsRemoveInstancesRequestResource = + InstanceGroupsRemoveInstancesRequest.newBuilder().build(); + Operation response = + instanceGroupsClient + .removeInstancesAsync( + project, zone, instanceGroup, instanceGroupsRemoveInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_RemoveInstances_StringStringStringInstancegroupsremoveinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/AsyncSetNamedPorts.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/AsyncSetNamedPorts.java new file mode 100644 index 000000000000..5b24a62a798d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/AsyncSetNamedPorts.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_SetNamedPorts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsSetNamedPortsRequest; +import com.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest; +import com.google.longrunning.Operation; + +public class AsyncSetNamedPorts { + + public static void main(String[] args) throws Exception { + asyncSetNamedPorts(); + } + + public static void asyncSetNamedPorts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + SetNamedPortsInstanceGroupRequest request = + SetNamedPortsInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsSetNamedPortsRequestResource( + InstanceGroupsSetNamedPortsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instanceGroupsClient.setNamedPortsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_SetNamedPorts_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/AsyncSetNamedPortsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/AsyncSetNamedPortsLRO.java new file mode 100644 index 000000000000..5382083e6924 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/AsyncSetNamedPortsLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_SetNamedPorts_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsSetNamedPortsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest; + +public class AsyncSetNamedPortsLRO { + + public static void main(String[] args) throws Exception { + asyncSetNamedPortsLRO(); + } + + public static void asyncSetNamedPortsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + SetNamedPortsInstanceGroupRequest request = + SetNamedPortsInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsSetNamedPortsRequestResource( + InstanceGroupsSetNamedPortsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instanceGroupsClient.setNamedPortsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_SetNamedPorts_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/SyncSetNamedPorts.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/SyncSetNamedPorts.java new file mode 100644 index 000000000000..563aa3ffcbfb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/SyncSetNamedPorts.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_SetNamedPorts_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsSetNamedPortsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest; + +public class SyncSetNamedPorts { + + public static void main(String[] args) throws Exception { + syncSetNamedPorts(); + } + + public static void syncSetNamedPorts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + SetNamedPortsInstanceGroupRequest request = + SetNamedPortsInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setInstanceGroupsSetNamedPortsRequestResource( + InstanceGroupsSetNamedPortsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instanceGroupsClient.setNamedPortsAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_SetNamedPorts_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/SyncSetNamedPortsStringStringStringInstancegroupssetnamedportsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/SyncSetNamedPortsStringStringStringInstancegroupssetnamedportsrequest.java new file mode 100644 index 000000000000..5997d71e393c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/setnamedports/SyncSetNamedPortsStringStringStringInstancegroupssetnamedportsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroups_SetNamedPorts_StringStringStringInstancegroupssetnamedportsrequest_sync] +import com.google.cloud.compute.v1.InstanceGroupsClient; +import com.google.cloud.compute.v1.InstanceGroupsSetNamedPortsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetNamedPortsStringStringStringInstancegroupssetnamedportsrequest { + + public static void main(String[] args) throws Exception { + syncSetNamedPortsStringStringStringInstancegroupssetnamedportsrequest(); + } + + public static void syncSetNamedPortsStringStringStringInstancegroupssetnamedportsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceGroupsClient instanceGroupsClient = InstanceGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instanceGroup = "instanceGroup-1404696854"; + InstanceGroupsSetNamedPortsRequest instanceGroupsSetNamedPortsRequestResource = + InstanceGroupsSetNamedPortsRequest.newBuilder().build(); + Operation response = + instanceGroupsClient + .setNamedPortsAsync( + project, zone, instanceGroup, instanceGroupsSetNamedPortsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InstanceGroups_SetNamedPorts_StringStringStringInstancegroupssetnamedportsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupssettings/get/SyncGet.java new file mode 100644 index 000000000000..d99edc530a75 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroupssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceGroupsSettings_Get_sync] +import com.google.cloud.compute.v1.InstanceGroupsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceGroupsSettings.Builder instanceGroupsSettingsBuilder = + InstanceGroupsSettings.newBuilder(); + instanceGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + instanceGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InstanceGroupsSettings instanceGroupsSettings = instanceGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InstanceGroupsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/AsyncAddAccessConfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/AsyncAddAccessConfig.java new file mode 100644 index 000000000000..e0295450b678 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/AsyncAddAccessConfig.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AddAccessConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AccessConfig; +import com.google.cloud.compute.v1.AddAccessConfigInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncAddAccessConfig { + + public static void main(String[] args) throws Exception { + asyncAddAccessConfig(); + } + + public static void asyncAddAccessConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AddAccessConfigInstanceRequest request = + AddAccessConfigInstanceRequest.newBuilder() + .setAccessConfigResource(AccessConfig.newBuilder().build()) + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.addAccessConfigCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_AddAccessConfig_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/AsyncAddAccessConfigLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/AsyncAddAccessConfigLRO.java new file mode 100644 index 000000000000..588401b8ecf4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/AsyncAddAccessConfigLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AddAccessConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AccessConfig; +import com.google.cloud.compute.v1.AddAccessConfigInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddAccessConfigLRO { + + public static void main(String[] args) throws Exception { + asyncAddAccessConfigLRO(); + } + + public static void asyncAddAccessConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AddAccessConfigInstanceRequest request = + AddAccessConfigInstanceRequest.newBuilder() + .setAccessConfigResource(AccessConfig.newBuilder().build()) + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.addAccessConfigOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_AddAccessConfig_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/SyncAddAccessConfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/SyncAddAccessConfig.java new file mode 100644 index 000000000000..dc0fefa8ecff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/SyncAddAccessConfig.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AddAccessConfig_sync] +import com.google.cloud.compute.v1.AccessConfig; +import com.google.cloud.compute.v1.AddAccessConfigInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddAccessConfig { + + public static void main(String[] args) throws Exception { + syncAddAccessConfig(); + } + + public static void syncAddAccessConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AddAccessConfigInstanceRequest request = + AddAccessConfigInstanceRequest.newBuilder() + .setAccessConfigResource(AccessConfig.newBuilder().build()) + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.addAccessConfigAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_AddAccessConfig_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/SyncAddAccessConfigStringStringStringStringAccessconfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/SyncAddAccessConfigStringStringStringStringAccessconfig.java new file mode 100644 index 000000000000..b2d08ddc1811 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addaccessconfig/SyncAddAccessConfigStringStringStringStringAccessconfig.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AddAccessConfig_StringStringStringStringAccessconfig_sync] +import com.google.cloud.compute.v1.AccessConfig; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddAccessConfigStringStringStringStringAccessconfig { + + public static void main(String[] args) throws Exception { + syncAddAccessConfigStringStringStringStringAccessconfig(); + } + + public static void syncAddAccessConfigStringStringStringStringAccessconfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + String networkInterface = "networkInterface-341981525"; + AccessConfig accessConfigResource = AccessConfig.newBuilder().build(); + Operation response = + instancesClient + .addAccessConfigAsync(project, zone, instance, networkInterface, accessConfigResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_AddAccessConfig_StringStringStringStringAccessconfig_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/AsyncAddResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/AsyncAddResourcePolicies.java new file mode 100644 index 000000000000..e736eb192048 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/AsyncAddResourcePolicies.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AddResourcePolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest; +import com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncAddResourcePolicies { + + public static void main(String[] args) throws Exception { + asyncAddResourcePolicies(); + } + + public static void asyncAddResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AddResourcePoliciesInstanceRequest request = + AddResourcePoliciesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesAddResourcePoliciesRequestResource( + InstancesAddResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.addResourcePoliciesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_AddResourcePolicies_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/AsyncAddResourcePoliciesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/AsyncAddResourcePoliciesLRO.java new file mode 100644 index 000000000000..1f35c845b58b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/AsyncAddResourcePoliciesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AddResourcePolicies_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest; +import com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddResourcePoliciesLRO { + + public static void main(String[] args) throws Exception { + asyncAddResourcePoliciesLRO(); + } + + public static void asyncAddResourcePoliciesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AddResourcePoliciesInstanceRequest request = + AddResourcePoliciesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesAddResourcePoliciesRequestResource( + InstancesAddResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.addResourcePoliciesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_AddResourcePolicies_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/SyncAddResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/SyncAddResourcePolicies.java new file mode 100644 index 000000000000..7c3f30d5c6df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/SyncAddResourcePolicies.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AddResourcePolicies_sync] +import com.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest; +import com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddResourcePolicies { + + public static void main(String[] args) throws Exception { + syncAddResourcePolicies(); + } + + public static void syncAddResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AddResourcePoliciesInstanceRequest request = + AddResourcePoliciesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesAddResourcePoliciesRequestResource( + InstancesAddResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.addResourcePoliciesAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_AddResourcePolicies_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/SyncAddResourcePoliciesStringStringStringInstancesaddresourcepoliciesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/SyncAddResourcePoliciesStringStringStringInstancesaddresourcepoliciesrequest.java new file mode 100644 index 000000000000..bde42ce5f0d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addresourcepolicies/SyncAddResourcePoliciesStringStringStringInstancesaddresourcepoliciesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AddResourcePolicies_StringStringStringInstancesaddresourcepoliciesrequest_sync] +import com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddResourcePoliciesStringStringStringInstancesaddresourcepoliciesrequest { + + public static void main(String[] args) throws Exception { + syncAddResourcePoliciesStringStringStringInstancesaddresourcepoliciesrequest(); + } + + public static void syncAddResourcePoliciesStringStringStringInstancesaddresourcepoliciesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = + InstancesAddResourcePoliciesRequest.newBuilder().build(); + Operation response = + instancesClient + .addResourcePoliciesAsync( + project, zone, instance, instancesAddResourcePoliciesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_AddResourcePolicies_StringStringStringInstancesaddresourcepoliciesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..b033314b124f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListInstancesRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AggregatedListInstancesRequest request = + AggregatedListInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + instancesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..bf947bbd616a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListInstancesRequest; +import com.google.cloud.compute.v1.InstanceAggregatedList; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AggregatedListInstancesRequest request = + AggregatedListInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InstanceAggregatedList response = instancesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Instances_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..4112ea555af3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListInstancesRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AggregatedListInstancesRequest request = + AggregatedListInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + instancesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..1ce22e4eeecd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AggregatedList_String_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + instancesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/AsyncAttachDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/AsyncAttachDisk.java new file mode 100644 index 000000000000..107904968c3b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/AsyncAttachDisk.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AttachDisk_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AttachDiskInstanceRequest; +import com.google.cloud.compute.v1.AttachedDisk; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncAttachDisk { + + public static void main(String[] args) throws Exception { + asyncAttachDisk(); + } + + public static void asyncAttachDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AttachDiskInstanceRequest request = + AttachDiskInstanceRequest.newBuilder() + .setAttachedDiskResource(AttachedDisk.newBuilder().build()) + .setForceAttach(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.attachDiskCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_AttachDisk_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/AsyncAttachDiskLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/AsyncAttachDiskLRO.java new file mode 100644 index 000000000000..d4f4609cd32b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/AsyncAttachDiskLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AttachDisk_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AttachDiskInstanceRequest; +import com.google.cloud.compute.v1.AttachedDisk; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAttachDiskLRO { + + public static void main(String[] args) throws Exception { + asyncAttachDiskLRO(); + } + + public static void asyncAttachDiskLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AttachDiskInstanceRequest request = + AttachDiskInstanceRequest.newBuilder() + .setAttachedDiskResource(AttachedDisk.newBuilder().build()) + .setForceAttach(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.attachDiskOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_AttachDisk_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/SyncAttachDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/SyncAttachDisk.java new file mode 100644 index 000000000000..bdc9005b306d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/SyncAttachDisk.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AttachDisk_sync] +import com.google.cloud.compute.v1.AttachDiskInstanceRequest; +import com.google.cloud.compute.v1.AttachedDisk; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAttachDisk { + + public static void main(String[] args) throws Exception { + syncAttachDisk(); + } + + public static void syncAttachDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + AttachDiskInstanceRequest request = + AttachDiskInstanceRequest.newBuilder() + .setAttachedDiskResource(AttachedDisk.newBuilder().build()) + .setForceAttach(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.attachDiskAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_AttachDisk_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/SyncAttachDiskStringStringStringAttacheddisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/SyncAttachDiskStringStringStringAttacheddisk.java new file mode 100644 index 000000000000..c81061d937ac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/attachdisk/SyncAttachDiskStringStringStringAttacheddisk.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_AttachDisk_StringStringStringAttacheddisk_sync] +import com.google.cloud.compute.v1.AttachedDisk; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAttachDiskStringStringStringAttacheddisk { + + public static void main(String[] args) throws Exception { + syncAttachDiskStringStringStringAttacheddisk(); + } + + public static void syncAttachDiskStringStringStringAttacheddisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + AttachedDisk attachedDiskResource = AttachedDisk.newBuilder().build(); + Operation response = + instancesClient.attachDiskAsync(project, zone, instance, attachedDiskResource).get(); + } + } +} +// [END compute_v1_generated_Instances_AttachDisk_StringStringStringAttacheddisk_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/AsyncBulkInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/AsyncBulkInsert.java new file mode 100644 index 000000000000..d4bb16df8ef2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/AsyncBulkInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_BulkInsert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BulkInsertInstanceRequest; +import com.google.cloud.compute.v1.BulkInsertInstanceResource; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncBulkInsert { + + public static void main(String[] args) throws Exception { + asyncBulkInsert(); + } + + public static void asyncBulkInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + BulkInsertInstanceRequest request = + BulkInsertInstanceRequest.newBuilder() + .setBulkInsertInstanceResourceResource( + BulkInsertInstanceResource.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.bulkInsertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_BulkInsert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/AsyncBulkInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/AsyncBulkInsertLRO.java new file mode 100644 index 000000000000..619b7f8332a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/AsyncBulkInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_BulkInsert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BulkInsertInstanceRequest; +import com.google.cloud.compute.v1.BulkInsertInstanceResource; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncBulkInsertLRO { + + public static void main(String[] args) throws Exception { + asyncBulkInsertLRO(); + } + + public static void asyncBulkInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + BulkInsertInstanceRequest request = + BulkInsertInstanceRequest.newBuilder() + .setBulkInsertInstanceResourceResource( + BulkInsertInstanceResource.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.bulkInsertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_BulkInsert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/SyncBulkInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/SyncBulkInsert.java new file mode 100644 index 000000000000..c12f5cbdd729 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/SyncBulkInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_BulkInsert_sync] +import com.google.cloud.compute.v1.BulkInsertInstanceRequest; +import com.google.cloud.compute.v1.BulkInsertInstanceResource; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncBulkInsert { + + public static void main(String[] args) throws Exception { + syncBulkInsert(); + } + + public static void syncBulkInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + BulkInsertInstanceRequest request = + BulkInsertInstanceRequest.newBuilder() + .setBulkInsertInstanceResourceResource( + BulkInsertInstanceResource.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.bulkInsertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_BulkInsert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/SyncBulkInsertStringStringBulkinsertinstanceresource.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/SyncBulkInsertStringStringBulkinsertinstanceresource.java new file mode 100644 index 000000000000..e53e71f1f40b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/bulkinsert/SyncBulkInsertStringStringBulkinsertinstanceresource.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_BulkInsert_StringStringBulkinsertinstanceresource_sync] +import com.google.cloud.compute.v1.BulkInsertInstanceResource; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncBulkInsertStringStringBulkinsertinstanceresource { + + public static void main(String[] args) throws Exception { + syncBulkInsertStringStringBulkinsertinstanceresource(); + } + + public static void syncBulkInsertStringStringBulkinsertinstanceresource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + BulkInsertInstanceResource bulkInsertInstanceResourceResource = + BulkInsertInstanceResource.newBuilder().build(); + Operation response = + instancesClient.bulkInsertAsync(project, zone, bulkInsertInstanceResourceResource).get(); + } + } +} +// [END compute_v1_generated_Instances_BulkInsert_StringStringBulkinsertinstanceresource_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..eec5a85c8385 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstancesSettings instancesSettings = + InstancesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InstancesClient instancesClient = InstancesClient.create(instancesSettings); + } +} +// [END compute_v1_generated_Instances_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..2989e4cc35de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstancesSettings instancesSettings = + InstancesSettings.newBuilder().setEndpoint(myEndpoint).build(); + InstancesClient instancesClient = InstancesClient.create(instancesSettings); + } +} +// [END compute_v1_generated_Instances_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/AsyncDelete.java new file mode 100644 index 000000000000..0d3131f1d66e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..22657491e121 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/SyncDelete.java new file mode 100644 index 000000000000..806a7cd04019 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Delete_sync] +import com.google.cloud.compute.v1.DeleteInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..719c3f3c742e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Operation response = instancesClient.deleteAsync(project, zone, instance).get(); + } + } +} +// [END compute_v1_generated_Instances_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/AsyncDeleteAccessConfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/AsyncDeleteAccessConfig.java new file mode 100644 index 000000000000..6eb702747ba7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/AsyncDeleteAccessConfig.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_DeleteAccessConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteAccessConfig { + + public static void main(String[] args) throws Exception { + asyncDeleteAccessConfig(); + } + + public static void asyncDeleteAccessConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DeleteAccessConfigInstanceRequest request = + DeleteAccessConfigInstanceRequest.newBuilder() + .setAccessConfig("accessConfig1549765062") + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.deleteAccessConfigCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_DeleteAccessConfig_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/AsyncDeleteAccessConfigLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/AsyncDeleteAccessConfigLRO.java new file mode 100644 index 000000000000..5ff755492e3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/AsyncDeleteAccessConfigLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_DeleteAccessConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteAccessConfigLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteAccessConfigLRO(); + } + + public static void asyncDeleteAccessConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DeleteAccessConfigInstanceRequest request = + DeleteAccessConfigInstanceRequest.newBuilder() + .setAccessConfig("accessConfig1549765062") + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.deleteAccessConfigOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_DeleteAccessConfig_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/SyncDeleteAccessConfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/SyncDeleteAccessConfig.java new file mode 100644 index 000000000000..5b2765c97adc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/SyncDeleteAccessConfig.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_DeleteAccessConfig_sync] +import com.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteAccessConfig { + + public static void main(String[] args) throws Exception { + syncDeleteAccessConfig(); + } + + public static void syncDeleteAccessConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DeleteAccessConfigInstanceRequest request = + DeleteAccessConfigInstanceRequest.newBuilder() + .setAccessConfig("accessConfig1549765062") + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.deleteAccessConfigAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_DeleteAccessConfig_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/SyncDeleteAccessConfigStringStringStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/SyncDeleteAccessConfigStringStringStringStringString.java new file mode 100644 index 000000000000..a05bc1f6979d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deleteaccessconfig/SyncDeleteAccessConfigStringStringStringStringString.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_DeleteAccessConfig_StringStringStringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteAccessConfigStringStringStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteAccessConfigStringStringStringStringString(); + } + + public static void syncDeleteAccessConfigStringStringStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + String accessConfig = "accessConfig1549765062"; + String networkInterface = "networkInterface-341981525"; + Operation response = + instancesClient + .deleteAccessConfigAsync(project, zone, instance, accessConfig, networkInterface) + .get(); + } + } +} +// [END compute_v1_generated_Instances_DeleteAccessConfig_StringStringStringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/AsyncDetachDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/AsyncDetachDisk.java new file mode 100644 index 000000000000..7eef081b3895 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/AsyncDetachDisk.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_DetachDisk_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DetachDiskInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncDetachDisk { + + public static void main(String[] args) throws Exception { + asyncDetachDisk(); + } + + public static void asyncDetachDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DetachDiskInstanceRequest request = + DetachDiskInstanceRequest.newBuilder() + .setDeviceName("deviceName780988929") + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.detachDiskCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_DetachDisk_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/AsyncDetachDiskLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/AsyncDetachDiskLRO.java new file mode 100644 index 000000000000..496252f48914 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/AsyncDetachDiskLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_DetachDisk_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DetachDiskInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDetachDiskLRO { + + public static void main(String[] args) throws Exception { + asyncDetachDiskLRO(); + } + + public static void asyncDetachDiskLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DetachDiskInstanceRequest request = + DetachDiskInstanceRequest.newBuilder() + .setDeviceName("deviceName780988929") + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.detachDiskOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_DetachDisk_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/SyncDetachDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/SyncDetachDisk.java new file mode 100644 index 000000000000..129313de2291 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/SyncDetachDisk.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_DetachDisk_sync] +import com.google.cloud.compute.v1.DetachDiskInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDetachDisk { + + public static void main(String[] args) throws Exception { + syncDetachDisk(); + } + + public static void syncDetachDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + DetachDiskInstanceRequest request = + DetachDiskInstanceRequest.newBuilder() + .setDeviceName("deviceName780988929") + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.detachDiskAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_DetachDisk_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/SyncDetachDiskStringStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/SyncDetachDiskStringStringStringString.java new file mode 100644 index 000000000000..6e7739a637ec --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/detachdisk/SyncDetachDiskStringStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_DetachDisk_StringStringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDetachDiskStringStringStringString { + + public static void main(String[] args) throws Exception { + syncDetachDiskStringStringStringString(); + } + + public static void syncDetachDiskStringStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + String deviceName = "deviceName780988929"; + Operation response = + instancesClient.detachDiskAsync(project, zone, instance, deviceName).get(); + } + } +} +// [END compute_v1_generated_Instances_DetachDisk_StringStringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/AsyncGet.java new file mode 100644 index 000000000000..20782ed5f5d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetInstanceRequest; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.getCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/SyncGet.java new file mode 100644 index 000000000000..e7823d9ad87e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Get_sync] +import com.google.cloud.compute.v1.GetInstanceRequest; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Instance response = instancesClient.get(request); + } + } +} +// [END compute_v1_generated_Instances_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..35e2a85cc7d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Instance response = instancesClient.get(project, zone, instance); + } + } +} +// [END compute_v1_generated_Instances_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java new file mode 100644 index 000000000000..8da791d64667 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/AsyncGetEffectiveFirewalls.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetEffectiveFirewalls_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponse; + +public class AsyncGetEffectiveFirewalls { + + public static void main(String[] args) throws Exception { + asyncGetEffectiveFirewalls(); + } + + public static void asyncGetEffectiveFirewalls() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetEffectiveFirewallsInstanceRequest request = + GetEffectiveFirewallsInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.getEffectiveFirewallsCallable().futureCall(request); + // Do something. + InstancesGetEffectiveFirewallsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_GetEffectiveFirewalls_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/SyncGetEffectiveFirewalls.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/SyncGetEffectiveFirewalls.java new file mode 100644 index 000000000000..f4e1bd6d473f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/SyncGetEffectiveFirewalls.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetEffectiveFirewalls_sync] +import com.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponse; + +public class SyncGetEffectiveFirewalls { + + public static void main(String[] args) throws Exception { + syncGetEffectiveFirewalls(); + } + + public static void syncGetEffectiveFirewalls() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetEffectiveFirewallsInstanceRequest request = + GetEffectiveFirewallsInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + InstancesGetEffectiveFirewallsResponse response = + instancesClient.getEffectiveFirewalls(request); + } + } +} +// [END compute_v1_generated_Instances_GetEffectiveFirewalls_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/SyncGetEffectiveFirewallsStringStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/SyncGetEffectiveFirewallsStringStringStringString.java new file mode 100644 index 000000000000..f2492bb6fbe7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/geteffectivefirewalls/SyncGetEffectiveFirewallsStringStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetEffectiveFirewalls_StringStringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponse; + +public class SyncGetEffectiveFirewallsStringStringStringString { + + public static void main(String[] args) throws Exception { + syncGetEffectiveFirewallsStringStringStringString(); + } + + public static void syncGetEffectiveFirewallsStringStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + String networkInterface = "networkInterface-341981525"; + InstancesGetEffectiveFirewallsResponse response = + instancesClient.getEffectiveFirewalls(project, zone, instance, networkInterface); + } + } +} +// [END compute_v1_generated_Instances_GetEffectiveFirewalls_StringStringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/AsyncGetGuestAttributes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/AsyncGetGuestAttributes.java new file mode 100644 index 000000000000..dc0eba520eef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/AsyncGetGuestAttributes.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetGuestAttributes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetGuestAttributesInstanceRequest; +import com.google.cloud.compute.v1.GuestAttributes; +import com.google.cloud.compute.v1.InstancesClient; + +public class AsyncGetGuestAttributes { + + public static void main(String[] args) throws Exception { + asyncGetGuestAttributes(); + } + + public static void asyncGetGuestAttributes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetGuestAttributesInstanceRequest request = + GetGuestAttributesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setQueryPath("queryPath-1807004403") + .setVariableKey("variableKey-1951698365") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.getGuestAttributesCallable().futureCall(request); + // Do something. + GuestAttributes response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_GetGuestAttributes_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/SyncGetGuestAttributes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/SyncGetGuestAttributes.java new file mode 100644 index 000000000000..bf54b1924df4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/SyncGetGuestAttributes.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetGuestAttributes_sync] +import com.google.cloud.compute.v1.GetGuestAttributesInstanceRequest; +import com.google.cloud.compute.v1.GuestAttributes; +import com.google.cloud.compute.v1.InstancesClient; + +public class SyncGetGuestAttributes { + + public static void main(String[] args) throws Exception { + syncGetGuestAttributes(); + } + + public static void syncGetGuestAttributes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetGuestAttributesInstanceRequest request = + GetGuestAttributesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setQueryPath("queryPath-1807004403") + .setVariableKey("variableKey-1951698365") + .setZone("zone3744684") + .build(); + GuestAttributes response = instancesClient.getGuestAttributes(request); + } + } +} +// [END compute_v1_generated_Instances_GetGuestAttributes_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/SyncGetGuestAttributesStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/SyncGetGuestAttributesStringStringString.java new file mode 100644 index 000000000000..e4d66c33fb35 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getguestattributes/SyncGetGuestAttributesStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetGuestAttributes_StringStringString_sync] +import com.google.cloud.compute.v1.GuestAttributes; +import com.google.cloud.compute.v1.InstancesClient; + +public class SyncGetGuestAttributesStringStringString { + + public static void main(String[] args) throws Exception { + syncGetGuestAttributesStringStringString(); + } + + public static void syncGetGuestAttributesStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + GuestAttributes response = instancesClient.getGuestAttributes(project, zone, instance); + } + } +} +// [END compute_v1_generated_Instances_GetGuestAttributes_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..a5adf564ea4d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetIamPolicyInstanceRequest request = + GetIamPolicyInstanceRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..0d26b91cdb03 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetIamPolicyInstanceRequest request = + GetIamPolicyInstanceRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + Policy response = instancesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_Instances_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..b031f960a267 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + Policy response = instancesClient.getIamPolicy(project, zone, resource); + } + } +} +// [END compute_v1_generated_Instances_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/AsyncGetScreenshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/AsyncGetScreenshot.java new file mode 100644 index 000000000000..50eec152bff8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/AsyncGetScreenshot.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetScreenshot_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetScreenshotInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Screenshot; + +public class AsyncGetScreenshot { + + public static void main(String[] args) throws Exception { + asyncGetScreenshot(); + } + + public static void asyncGetScreenshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetScreenshotInstanceRequest request = + GetScreenshotInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.getScreenshotCallable().futureCall(request); + // Do something. + Screenshot response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_GetScreenshot_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/SyncGetScreenshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/SyncGetScreenshot.java new file mode 100644 index 000000000000..97a20b1947cc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/SyncGetScreenshot.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetScreenshot_sync] +import com.google.cloud.compute.v1.GetScreenshotInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Screenshot; + +public class SyncGetScreenshot { + + public static void main(String[] args) throws Exception { + syncGetScreenshot(); + } + + public static void syncGetScreenshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetScreenshotInstanceRequest request = + GetScreenshotInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Screenshot response = instancesClient.getScreenshot(request); + } + } +} +// [END compute_v1_generated_Instances_GetScreenshot_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/SyncGetScreenshotStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/SyncGetScreenshotStringStringString.java new file mode 100644 index 000000000000..03a65303f903 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getscreenshot/SyncGetScreenshotStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetScreenshot_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Screenshot; + +public class SyncGetScreenshotStringStringString { + + public static void main(String[] args) throws Exception { + syncGetScreenshotStringStringString(); + } + + public static void syncGetScreenshotStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Screenshot response = instancesClient.getScreenshot(project, zone, instance); + } + } +} +// [END compute_v1_generated_Instances_GetScreenshot_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/AsyncGetSerialPortOutput.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/AsyncGetSerialPortOutput.java new file mode 100644 index 000000000000..88cd434f3814 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/AsyncGetSerialPortOutput.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetSerialPortOutput_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SerialPortOutput; + +public class AsyncGetSerialPortOutput { + + public static void main(String[] args) throws Exception { + asyncGetSerialPortOutput(); + } + + public static void asyncGetSerialPortOutput() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetSerialPortOutputInstanceRequest request = + GetSerialPortOutputInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setPort(3446913) + .setProject("project-309310695") + .setStart(109757538) + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.getSerialPortOutputCallable().futureCall(request); + // Do something. + SerialPortOutput response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_GetSerialPortOutput_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/SyncGetSerialPortOutput.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/SyncGetSerialPortOutput.java new file mode 100644 index 000000000000..c9ddf4b8e17f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/SyncGetSerialPortOutput.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetSerialPortOutput_sync] +import com.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SerialPortOutput; + +public class SyncGetSerialPortOutput { + + public static void main(String[] args) throws Exception { + syncGetSerialPortOutput(); + } + + public static void syncGetSerialPortOutput() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetSerialPortOutputInstanceRequest request = + GetSerialPortOutputInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setPort(3446913) + .setProject("project-309310695") + .setStart(109757538) + .setZone("zone3744684") + .build(); + SerialPortOutput response = instancesClient.getSerialPortOutput(request); + } + } +} +// [END compute_v1_generated_Instances_GetSerialPortOutput_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/SyncGetSerialPortOutputStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/SyncGetSerialPortOutputStringStringString.java new file mode 100644 index 000000000000..ef07c70cbf60 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getserialportoutput/SyncGetSerialPortOutputStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetSerialPortOutput_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SerialPortOutput; + +public class SyncGetSerialPortOutputStringStringString { + + public static void main(String[] args) throws Exception { + syncGetSerialPortOutputStringStringString(); + } + + public static void syncGetSerialPortOutputStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + SerialPortOutput response = instancesClient.getSerialPortOutput(project, zone, instance); + } + } +} +// [END compute_v1_generated_Instances_GetSerialPortOutput_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/AsyncGetShieldedInstanceIdentity.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/AsyncGetShieldedInstanceIdentity.java new file mode 100644 index 000000000000..e2aea69c0a87 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/AsyncGetShieldedInstanceIdentity.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetShieldedInstanceIdentity_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ShieldedInstanceIdentity; + +public class AsyncGetShieldedInstanceIdentity { + + public static void main(String[] args) throws Exception { + asyncGetShieldedInstanceIdentity(); + } + + public static void asyncGetShieldedInstanceIdentity() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetShieldedInstanceIdentityInstanceRequest request = + GetShieldedInstanceIdentityInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.getShieldedInstanceIdentityCallable().futureCall(request); + // Do something. + ShieldedInstanceIdentity response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_GetShieldedInstanceIdentity_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/SyncGetShieldedInstanceIdentity.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/SyncGetShieldedInstanceIdentity.java new file mode 100644 index 000000000000..44c813e6b3ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/SyncGetShieldedInstanceIdentity.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetShieldedInstanceIdentity_sync] +import com.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ShieldedInstanceIdentity; + +public class SyncGetShieldedInstanceIdentity { + + public static void main(String[] args) throws Exception { + syncGetShieldedInstanceIdentity(); + } + + public static void syncGetShieldedInstanceIdentity() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + GetShieldedInstanceIdentityInstanceRequest request = + GetShieldedInstanceIdentityInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ShieldedInstanceIdentity response = instancesClient.getShieldedInstanceIdentity(request); + } + } +} +// [END compute_v1_generated_Instances_GetShieldedInstanceIdentity_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/SyncGetShieldedInstanceIdentityStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/SyncGetShieldedInstanceIdentityStringStringString.java new file mode 100644 index 000000000000..9f7472d7ff03 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/getshieldedinstanceidentity/SyncGetShieldedInstanceIdentityStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_GetShieldedInstanceIdentity_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ShieldedInstanceIdentity; + +public class SyncGetShieldedInstanceIdentityStringStringString { + + public static void main(String[] args) throws Exception { + syncGetShieldedInstanceIdentityStringStringString(); + } + + public static void syncGetShieldedInstanceIdentityStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + ShieldedInstanceIdentity response = + instancesClient.getShieldedInstanceIdentity(project, zone, instance); + } + } +} +// [END compute_v1_generated_Instances_GetShieldedInstanceIdentity_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/AsyncInsert.java new file mode 100644 index 000000000000..0978b293b17d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertInstanceRequest; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + InsertInstanceRequest request = + InsertInstanceRequest.newBuilder() + .setInstanceResource(Instance.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceInstanceTemplate("sourceInstanceTemplate949712490") + .setSourceMachineImage("sourceMachineImage1261073679") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..c82b36e91f35 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/AsyncInsertLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertInstanceRequest; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + InsertInstanceRequest request = + InsertInstanceRequest.newBuilder() + .setInstanceResource(Instance.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceInstanceTemplate("sourceInstanceTemplate949712490") + .setSourceMachineImage("sourceMachineImage1261073679") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/SyncInsert.java new file mode 100644 index 000000000000..8cde7e38f308 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Insert_sync] +import com.google.cloud.compute.v1.InsertInstanceRequest; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + InsertInstanceRequest request = + InsertInstanceRequest.newBuilder() + .setInstanceResource(Instance.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceInstanceTemplate("sourceInstanceTemplate949712490") + .setSourceMachineImage("sourceMachineImage1261073679") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/SyncInsertStringStringInstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/SyncInsertStringStringInstance.java new file mode 100644 index 000000000000..1db530b38871 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/insert/SyncInsertStringStringInstance.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Insert_StringStringInstance_sync] +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringInstance { + + public static void main(String[] args) throws Exception { + syncInsertStringStringInstance(); + } + + public static void syncInsertStringStringInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + Instance instanceResource = Instance.newBuilder().build(); + Operation response = instancesClient.insertAsync(project, zone, instanceResource).get(); + } + } +} +// [END compute_v1_generated_Instances_Insert_StringStringInstance_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/AsyncList.java new file mode 100644 index 000000000000..7b4641b0ef47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ListInstancesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.listPagedCallable().futureCall(request); + // Do something. + for (Instance element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/AsyncListPaged.java new file mode 100644 index 000000000000..9a622016b8fc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_List_Paged_async] +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstanceList; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ListInstancesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + InstanceList response = instancesClient.listCallable().call(request); + for (Instance element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Instances_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/SyncList.java new file mode 100644 index 000000000000..abd62756ed03 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_List_sync] +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ListInstancesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (Instance element : instancesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/SyncListStringString.java new file mode 100644 index 000000000000..0b5abb9f096f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_List_StringString_sync] +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (Instance element : instancesClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/AsyncListReferrers.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/AsyncListReferrers.java new file mode 100644 index 000000000000..843b450edde7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/AsyncListReferrers.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_ListReferrers_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ListReferrersInstancesRequest; +import com.google.cloud.compute.v1.Reference; + +public class AsyncListReferrers { + + public static void main(String[] args) throws Exception { + asyncListReferrers(); + } + + public static void asyncListReferrers() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ListReferrersInstancesRequest request = + ListReferrersInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstance("instance555127957") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.listReferrersPagedCallable().futureCall(request); + // Do something. + for (Reference element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_ListReferrers_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/AsyncListReferrersPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/AsyncListReferrersPaged.java new file mode 100644 index 000000000000..a0e4967eb65d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/AsyncListReferrersPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_ListReferrers_Paged_async] +import com.google.cloud.compute.v1.InstanceListReferrers; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ListReferrersInstancesRequest; +import com.google.cloud.compute.v1.Reference; +import com.google.common.base.Strings; + +public class AsyncListReferrersPaged { + + public static void main(String[] args) throws Exception { + asyncListReferrersPaged(); + } + + public static void asyncListReferrersPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ListReferrersInstancesRequest request = + ListReferrersInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstance("instance555127957") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + InstanceListReferrers response = instancesClient.listReferrersCallable().call(request); + for (Reference element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Instances_ListReferrers_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/SyncListReferrers.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/SyncListReferrers.java new file mode 100644 index 000000000000..b8f44d0109c8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/SyncListReferrers.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_ListReferrers_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ListReferrersInstancesRequest; +import com.google.cloud.compute.v1.Reference; + +public class SyncListReferrers { + + public static void main(String[] args) throws Exception { + syncListReferrers(); + } + + public static void syncListReferrers() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ListReferrersInstancesRequest request = + ListReferrersInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstance("instance555127957") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (Reference element : instancesClient.listReferrers(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_ListReferrers_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/SyncListReferrersStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/SyncListReferrersStringStringString.java new file mode 100644 index 000000000000..be0559c4f6fa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/listreferrers/SyncListReferrersStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_ListReferrers_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Reference; + +public class SyncListReferrersStringStringString { + + public static void main(String[] args) throws Exception { + syncListReferrersStringStringString(); + } + + public static void syncListReferrersStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + for (Reference element : + instancesClient.listReferrers(project, zone, instance).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Instances_ListReferrers_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/AsyncRemoveResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/AsyncRemoveResourcePolicies.java new file mode 100644 index 000000000000..e41caf38749e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/AsyncRemoveResourcePolicies.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_RemoveResourcePolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveResourcePolicies { + + public static void main(String[] args) throws Exception { + asyncRemoveResourcePolicies(); + } + + public static void asyncRemoveResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + RemoveResourcePoliciesInstanceRequest request = + RemoveResourcePoliciesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesRemoveResourcePoliciesRequestResource( + InstancesRemoveResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.removeResourcePoliciesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_RemoveResourcePolicies_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java new file mode 100644 index 000000000000..322872f58f64 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_RemoveResourcePolicies_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest; + +public class AsyncRemoveResourcePoliciesLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveResourcePoliciesLRO(); + } + + public static void asyncRemoveResourcePoliciesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + RemoveResourcePoliciesInstanceRequest request = + RemoveResourcePoliciesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesRemoveResourcePoliciesRequestResource( + InstancesRemoveResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.removeResourcePoliciesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_RemoveResourcePolicies_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/SyncRemoveResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/SyncRemoveResourcePolicies.java new file mode 100644 index 000000000000..aa49b6c1e25a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/SyncRemoveResourcePolicies.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_RemoveResourcePolicies_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest; + +public class SyncRemoveResourcePolicies { + + public static void main(String[] args) throws Exception { + syncRemoveResourcePolicies(); + } + + public static void syncRemoveResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + RemoveResourcePoliciesInstanceRequest request = + RemoveResourcePoliciesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesRemoveResourcePoliciesRequestResource( + InstancesRemoveResourcePoliciesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.removeResourcePoliciesAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_RemoveResourcePolicies_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringInstancesremoveresourcepoliciesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringInstancesremoveresourcepoliciesrequest.java new file mode 100644 index 000000000000..8d6502817f78 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringInstancesremoveresourcepoliciesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_RemoveResourcePolicies_StringStringStringInstancesremoveresourcepoliciesrequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncRemoveResourcePoliciesStringStringStringInstancesremoveresourcepoliciesrequest { + + public static void main(String[] args) throws Exception { + syncRemoveResourcePoliciesStringStringStringInstancesremoveresourcepoliciesrequest(); + } + + public static void + syncRemoveResourcePoliciesStringStringStringInstancesremoveresourcepoliciesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = + InstancesRemoveResourcePoliciesRequest.newBuilder().build(); + Operation response = + instancesClient + .removeResourcePoliciesAsync( + project, zone, instance, instancesRemoveResourcePoliciesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_RemoveResourcePolicies_StringStringStringInstancesremoveresourcepoliciesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/AsyncReset.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/AsyncReset.java new file mode 100644 index 000000000000..caa317036b11 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/AsyncReset.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Reset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ResetInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncReset { + + public static void main(String[] args) throws Exception { + asyncReset(); + } + + public static void asyncReset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ResetInstanceRequest request = + ResetInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.resetCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Reset_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/AsyncResetLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/AsyncResetLRO.java new file mode 100644 index 000000000000..9f072c696d90 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/AsyncResetLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Reset_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResetInstanceRequest; + +public class AsyncResetLRO { + + public static void main(String[] args) throws Exception { + asyncResetLRO(); + } + + public static void asyncResetLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ResetInstanceRequest request = + ResetInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.resetOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Reset_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/SyncReset.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/SyncReset.java new file mode 100644 index 000000000000..621839f3e3fa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/SyncReset.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Reset_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResetInstanceRequest; + +public class SyncReset { + + public static void main(String[] args) throws Exception { + syncReset(); + } + + public static void syncReset() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ResetInstanceRequest request = + ResetInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.resetAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_Reset_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/SyncResetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/SyncResetStringStringString.java new file mode 100644 index 000000000000..2d1d4de21c10 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/reset/SyncResetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Reset_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncResetStringStringString { + + public static void main(String[] args) throws Exception { + syncResetStringStringString(); + } + + public static void syncResetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Operation response = instancesClient.resetAsync(project, zone, instance).get(); + } + } +} +// [END compute_v1_generated_Instances_Reset_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/AsyncResume.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/AsyncResume.java new file mode 100644 index 000000000000..4579391dfdfe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/AsyncResume.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Resume_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ResumeInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncResume { + + public static void main(String[] args) throws Exception { + asyncResume(); + } + + public static void asyncResume() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ResumeInstanceRequest request = + ResumeInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.resumeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Resume_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/AsyncResumeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/AsyncResumeLRO.java new file mode 100644 index 000000000000..45b5bc0321f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/AsyncResumeLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Resume_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResumeInstanceRequest; + +public class AsyncResumeLRO { + + public static void main(String[] args) throws Exception { + asyncResumeLRO(); + } + + public static void asyncResumeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ResumeInstanceRequest request = + ResumeInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.resumeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Resume_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/SyncResume.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/SyncResume.java new file mode 100644 index 000000000000..123571f5b6e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/SyncResume.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Resume_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResumeInstanceRequest; + +public class SyncResume { + + public static void main(String[] args) throws Exception { + syncResume(); + } + + public static void syncResume() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + ResumeInstanceRequest request = + ResumeInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.resumeAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_Resume_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/SyncResumeStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/SyncResumeStringStringString.java new file mode 100644 index 000000000000..16184c674d0c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/resume/SyncResumeStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Resume_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncResumeStringStringString { + + public static void main(String[] args) throws Exception { + syncResumeStringStringString(); + } + + public static void syncResumeStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Operation response = instancesClient.resumeAsync(project, zone, instance).get(); + } + } +} +// [END compute_v1_generated_Instances_Resume_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/AsyncSendDiagnosticInterrupt.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/AsyncSendDiagnosticInterrupt.java new file mode 100644 index 000000000000..664beae878d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/AsyncSendDiagnosticInterrupt.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SendDiagnosticInterrupt_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest; +import com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse; + +public class AsyncSendDiagnosticInterrupt { + + public static void main(String[] args) throws Exception { + asyncSendDiagnosticInterrupt(); + } + + public static void asyncSendDiagnosticInterrupt() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SendDiagnosticInterruptInstanceRequest request = + SendDiagnosticInterruptInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.sendDiagnosticInterruptCallable().futureCall(request); + // Do something. + SendDiagnosticInterruptInstanceResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SendDiagnosticInterrupt_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/SyncSendDiagnosticInterrupt.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/SyncSendDiagnosticInterrupt.java new file mode 100644 index 000000000000..506a013872bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/SyncSendDiagnosticInterrupt.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SendDiagnosticInterrupt_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest; +import com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse; + +public class SyncSendDiagnosticInterrupt { + + public static void main(String[] args) throws Exception { + syncSendDiagnosticInterrupt(); + } + + public static void syncSendDiagnosticInterrupt() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SendDiagnosticInterruptInstanceRequest request = + SendDiagnosticInterruptInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + SendDiagnosticInterruptInstanceResponse response = + instancesClient.sendDiagnosticInterrupt(request); + } + } +} +// [END compute_v1_generated_Instances_SendDiagnosticInterrupt_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/SyncSendDiagnosticInterruptStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/SyncSendDiagnosticInterruptStringStringString.java new file mode 100644 index 000000000000..7ee407876afe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/senddiagnosticinterrupt/SyncSendDiagnosticInterruptStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SendDiagnosticInterrupt_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse; + +public class SyncSendDiagnosticInterruptStringStringString { + + public static void main(String[] args) throws Exception { + syncSendDiagnosticInterruptStringStringString(); + } + + public static void syncSendDiagnosticInterruptStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + SendDiagnosticInterruptInstanceResponse response = + instancesClient.sendDiagnosticInterrupt(project, zone, instance); + } + } +} +// [END compute_v1_generated_Instances_SendDiagnosticInterrupt_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/AsyncSetDeletionProtection.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/AsyncSetDeletionProtection.java new file mode 100644 index 000000000000..ac1fb611f1a1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/AsyncSetDeletionProtection.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetDeletionProtection_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetDeletionProtection { + + public static void main(String[] args) throws Exception { + asyncSetDeletionProtection(); + } + + public static void asyncSetDeletionProtection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetDeletionProtectionInstanceRequest request = + SetDeletionProtectionInstanceRequest.newBuilder() + .setDeletionProtection(true) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.setDeletionProtectionCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetDeletionProtection_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/AsyncSetDeletionProtectionLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/AsyncSetDeletionProtectionLRO.java new file mode 100644 index 000000000000..bdf60ced94bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/AsyncSetDeletionProtectionLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetDeletionProtection_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest; + +public class AsyncSetDeletionProtectionLRO { + + public static void main(String[] args) throws Exception { + asyncSetDeletionProtectionLRO(); + } + + public static void asyncSetDeletionProtectionLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetDeletionProtectionInstanceRequest request = + SetDeletionProtectionInstanceRequest.newBuilder() + .setDeletionProtection(true) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setDeletionProtectionOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetDeletionProtection_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/SyncSetDeletionProtection.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/SyncSetDeletionProtection.java new file mode 100644 index 000000000000..aac8443cda8a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/SyncSetDeletionProtection.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetDeletionProtection_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest; + +public class SyncSetDeletionProtection { + + public static void main(String[] args) throws Exception { + syncSetDeletionProtection(); + } + + public static void syncSetDeletionProtection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetDeletionProtectionInstanceRequest request = + SetDeletionProtectionInstanceRequest.newBuilder() + .setDeletionProtection(true) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setDeletionProtectionAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetDeletionProtection_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/SyncSetDeletionProtectionStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/SyncSetDeletionProtectionStringStringString.java new file mode 100644 index 000000000000..2d800aebeb43 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdeletionprotection/SyncSetDeletionProtectionStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetDeletionProtection_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetDeletionProtectionStringStringString { + + public static void main(String[] args) throws Exception { + syncSetDeletionProtectionStringStringString(); + } + + public static void syncSetDeletionProtectionStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + Operation response = + instancesClient.setDeletionProtectionAsync(project, zone, resource).get(); + } + } +} +// [END compute_v1_generated_Instances_SetDeletionProtection_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/AsyncSetDiskAutoDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/AsyncSetDiskAutoDelete.java new file mode 100644 index 000000000000..ae94604ef74e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/AsyncSetDiskAutoDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetDiskAutoDelete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetDiskAutoDelete { + + public static void main(String[] args) throws Exception { + asyncSetDiskAutoDelete(); + } + + public static void asyncSetDiskAutoDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetDiskAutoDeleteInstanceRequest request = + SetDiskAutoDeleteInstanceRequest.newBuilder() + .setAutoDelete(true) + .setDeviceName("deviceName780988929") + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setDiskAutoDeleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetDiskAutoDelete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/AsyncSetDiskAutoDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/AsyncSetDiskAutoDeleteLRO.java new file mode 100644 index 000000000000..1bd4e58f9191 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/AsyncSetDiskAutoDeleteLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetDiskAutoDelete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest; + +public class AsyncSetDiskAutoDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncSetDiskAutoDeleteLRO(); + } + + public static void asyncSetDiskAutoDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetDiskAutoDeleteInstanceRequest request = + SetDiskAutoDeleteInstanceRequest.newBuilder() + .setAutoDelete(true) + .setDeviceName("deviceName780988929") + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setDiskAutoDeleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetDiskAutoDelete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/SyncSetDiskAutoDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/SyncSetDiskAutoDelete.java new file mode 100644 index 000000000000..8efdddcbfbb1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/SyncSetDiskAutoDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetDiskAutoDelete_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest; + +public class SyncSetDiskAutoDelete { + + public static void main(String[] args) throws Exception { + syncSetDiskAutoDelete(); + } + + public static void syncSetDiskAutoDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetDiskAutoDeleteInstanceRequest request = + SetDiskAutoDeleteInstanceRequest.newBuilder() + .setAutoDelete(true) + .setDeviceName("deviceName780988929") + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setDiskAutoDeleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetDiskAutoDelete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/SyncSetDiskAutoDeleteStringStringStringBooleanString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/SyncSetDiskAutoDeleteStringStringStringBooleanString.java new file mode 100644 index 000000000000..0283c22f2951 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setdiskautodelete/SyncSetDiskAutoDeleteStringStringStringBooleanString.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetDiskAutoDelete_StringStringStringBooleanString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetDiskAutoDeleteStringStringStringBooleanString { + + public static void main(String[] args) throws Exception { + syncSetDiskAutoDeleteStringStringStringBooleanString(); + } + + public static void syncSetDiskAutoDeleteStringStringStringBooleanString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + boolean autoDelete = true; + String deviceName = "deviceName780988929"; + Operation response = + instancesClient + .setDiskAutoDeleteAsync(project, zone, instance, autoDelete, deviceName) + .get(); + } + } +} +// [END compute_v1_generated_Instances_SetDiskAutoDelete_StringStringStringBooleanString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..bcba5dd8f943 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyInstanceRequest; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetIamPolicyInstanceRequest request = + SetIamPolicyInstanceRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build()) + .build(); + ApiFuture future = instancesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..a4736f3b35e6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetIamPolicy_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyInstanceRequest; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetIamPolicyInstanceRequest request = + SetIamPolicyInstanceRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build()) + .build(); + Policy response = instancesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_Instances_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java new file mode 100644 index 000000000000..7fad43299b80 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetIamPolicy_StringStringStringZonesetpolicyrequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringZonesetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringZonesetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringZonesetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build(); + Policy response = + instancesClient.setIamPolicy(project, zone, resource, zoneSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_Instances_SetIamPolicy_StringStringStringZonesetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..de9143d04490 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetLabelsInstanceRequest request = + SetLabelsInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetLabelsRequestResource(InstancesSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..162a3e82f166 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsInstanceRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetLabelsInstanceRequest request = + SetLabelsInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetLabelsRequestResource(InstancesSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..4d752e55818c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetLabels_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsInstanceRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetLabelsInstanceRequest request = + SetLabelsInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetLabelsRequestResource(InstancesSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/SyncSetLabelsStringStringStringInstancessetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/SyncSetLabelsStringStringStringInstancessetlabelsrequest.java new file mode 100644 index 000000000000..479d61a95fe9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setlabels/SyncSetLabelsStringStringStringInstancessetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetLabels_StringStringStringInstancessetlabelsrequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetLabelsStringStringStringInstancessetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringInstancessetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringInstancessetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesSetLabelsRequest instancesSetLabelsRequestResource = + InstancesSetLabelsRequest.newBuilder().build(); + Operation response = + instancesClient + .setLabelsAsync(project, zone, instance, instancesSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_SetLabels_StringStringStringInstancessetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/AsyncSetMachineResources.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/AsyncSetMachineResources.java new file mode 100644 index 000000000000..09925a7316c1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/AsyncSetMachineResources.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMachineResources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest; +import com.google.cloud.compute.v1.SetMachineResourcesInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetMachineResources { + + public static void main(String[] args) throws Exception { + asyncSetMachineResources(); + } + + public static void asyncSetMachineResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMachineResourcesInstanceRequest request = + SetMachineResourcesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMachineResourcesRequestResource( + InstancesSetMachineResourcesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.setMachineResourcesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetMachineResources_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/AsyncSetMachineResourcesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/AsyncSetMachineResourcesLRO.java new file mode 100644 index 000000000000..ac1dea8dfd15 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/AsyncSetMachineResourcesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMachineResources_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetMachineResourcesInstanceRequest; + +public class AsyncSetMachineResourcesLRO { + + public static void main(String[] args) throws Exception { + asyncSetMachineResourcesLRO(); + } + + public static void asyncSetMachineResourcesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMachineResourcesInstanceRequest request = + SetMachineResourcesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMachineResourcesRequestResource( + InstancesSetMachineResourcesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setMachineResourcesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetMachineResources_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/SyncSetMachineResources.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/SyncSetMachineResources.java new file mode 100644 index 000000000000..12c910e77120 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/SyncSetMachineResources.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMachineResources_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetMachineResourcesInstanceRequest; + +public class SyncSetMachineResources { + + public static void main(String[] args) throws Exception { + syncSetMachineResources(); + } + + public static void syncSetMachineResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMachineResourcesInstanceRequest request = + SetMachineResourcesInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMachineResourcesRequestResource( + InstancesSetMachineResourcesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setMachineResourcesAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetMachineResources_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/SyncSetMachineResourcesStringStringStringInstancessetmachineresourcesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/SyncSetMachineResourcesStringStringStringInstancessetmachineresourcesrequest.java new file mode 100644 index 000000000000..213531c0bf8b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachineresources/SyncSetMachineResourcesStringStringStringInstancessetmachineresourcesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMachineResources_StringStringStringInstancessetmachineresourcesrequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetMachineResourcesStringStringStringInstancessetmachineresourcesrequest { + + public static void main(String[] args) throws Exception { + syncSetMachineResourcesStringStringStringInstancessetmachineresourcesrequest(); + } + + public static void syncSetMachineResourcesStringStringStringInstancessetmachineresourcesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource = + InstancesSetMachineResourcesRequest.newBuilder().build(); + Operation response = + instancesClient + .setMachineResourcesAsync( + project, zone, instance, instancesSetMachineResourcesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_SetMachineResources_StringStringStringInstancessetmachineresourcesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/AsyncSetMachineType.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/AsyncSetMachineType.java new file mode 100644 index 000000000000..1ffdc8df9249 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/AsyncSetMachineType.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMachineType_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMachineTypeRequest; +import com.google.cloud.compute.v1.SetMachineTypeInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetMachineType { + + public static void main(String[] args) throws Exception { + asyncSetMachineType(); + } + + public static void asyncSetMachineType() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMachineTypeInstanceRequest request = + SetMachineTypeInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMachineTypeRequestResource( + InstancesSetMachineTypeRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setMachineTypeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetMachineType_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/AsyncSetMachineTypeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/AsyncSetMachineTypeLRO.java new file mode 100644 index 000000000000..9a9c2a533865 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/AsyncSetMachineTypeLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMachineType_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMachineTypeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetMachineTypeInstanceRequest; + +public class AsyncSetMachineTypeLRO { + + public static void main(String[] args) throws Exception { + asyncSetMachineTypeLRO(); + } + + public static void asyncSetMachineTypeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMachineTypeInstanceRequest request = + SetMachineTypeInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMachineTypeRequestResource( + InstancesSetMachineTypeRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setMachineTypeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetMachineType_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/SyncSetMachineType.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/SyncSetMachineType.java new file mode 100644 index 000000000000..727265e7163a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/SyncSetMachineType.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMachineType_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMachineTypeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetMachineTypeInstanceRequest; + +public class SyncSetMachineType { + + public static void main(String[] args) throws Exception { + syncSetMachineType(); + } + + public static void syncSetMachineType() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMachineTypeInstanceRequest request = + SetMachineTypeInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMachineTypeRequestResource( + InstancesSetMachineTypeRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setMachineTypeAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetMachineType_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/SyncSetMachineTypeStringStringStringInstancessetmachinetyperequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/SyncSetMachineTypeStringStringStringInstancessetmachinetyperequest.java new file mode 100644 index 000000000000..83a6db94ed88 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmachinetype/SyncSetMachineTypeStringStringStringInstancessetmachinetyperequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMachineType_StringStringStringInstancessetmachinetyperequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMachineTypeRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetMachineTypeStringStringStringInstancessetmachinetyperequest { + + public static void main(String[] args) throws Exception { + syncSetMachineTypeStringStringStringInstancessetmachinetyperequest(); + } + + public static void syncSetMachineTypeStringStringStringInstancessetmachinetyperequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource = + InstancesSetMachineTypeRequest.newBuilder().build(); + Operation response = + instancesClient + .setMachineTypeAsync(project, zone, instance, instancesSetMachineTypeRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_SetMachineType_StringStringStringInstancessetmachinetyperequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/AsyncSetMetadata.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/AsyncSetMetadata.java new file mode 100644 index 000000000000..9b62f6ec8a8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/AsyncSetMetadata.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMetadata_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Metadata; +import com.google.cloud.compute.v1.SetMetadataInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetMetadata { + + public static void main(String[] args) throws Exception { + asyncSetMetadata(); + } + + public static void asyncSetMetadata() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMetadataInstanceRequest request = + SetMetadataInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setMetadataResource(Metadata.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setMetadataCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetMetadata_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/AsyncSetMetadataLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/AsyncSetMetadataLRO.java new file mode 100644 index 000000000000..45a89208b7ea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/AsyncSetMetadataLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMetadata_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Metadata; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetMetadataInstanceRequest; + +public class AsyncSetMetadataLRO { + + public static void main(String[] args) throws Exception { + asyncSetMetadataLRO(); + } + + public static void asyncSetMetadataLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMetadataInstanceRequest request = + SetMetadataInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setMetadataResource(Metadata.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setMetadataOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetMetadata_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/SyncSetMetadata.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/SyncSetMetadata.java new file mode 100644 index 000000000000..3c9262e364eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/SyncSetMetadata.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMetadata_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Metadata; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetMetadataInstanceRequest; + +public class SyncSetMetadata { + + public static void main(String[] args) throws Exception { + syncSetMetadata(); + } + + public static void syncSetMetadata() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMetadataInstanceRequest request = + SetMetadataInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setMetadataResource(Metadata.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setMetadataAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetMetadata_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/SyncSetMetadataStringStringStringMetadata.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/SyncSetMetadataStringStringStringMetadata.java new file mode 100644 index 000000000000..9f473288a8f9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmetadata/SyncSetMetadataStringStringStringMetadata.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMetadata_StringStringStringMetadata_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Metadata; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetMetadataStringStringStringMetadata { + + public static void main(String[] args) throws Exception { + syncSetMetadataStringStringStringMetadata(); + } + + public static void syncSetMetadataStringStringStringMetadata() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Metadata metadataResource = Metadata.newBuilder().build(); + Operation response = + instancesClient.setMetadataAsync(project, zone, instance, metadataResource).get(); + } + } +} +// [END compute_v1_generated_Instances_SetMetadata_StringStringStringMetadata_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/AsyncSetMinCpuPlatform.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/AsyncSetMinCpuPlatform.java new file mode 100644 index 000000000000..f9b9d8ab9729 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/AsyncSetMinCpuPlatform.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMinCpuPlatform_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMinCpuPlatformRequest; +import com.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetMinCpuPlatform { + + public static void main(String[] args) throws Exception { + asyncSetMinCpuPlatform(); + } + + public static void asyncSetMinCpuPlatform() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMinCpuPlatformInstanceRequest request = + SetMinCpuPlatformInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMinCpuPlatformRequestResource( + InstancesSetMinCpuPlatformRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setMinCpuPlatformCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetMinCpuPlatform_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/AsyncSetMinCpuPlatformLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/AsyncSetMinCpuPlatformLRO.java new file mode 100644 index 000000000000..05b1a444bfe7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/AsyncSetMinCpuPlatformLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMinCpuPlatform_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMinCpuPlatformRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest; + +public class AsyncSetMinCpuPlatformLRO { + + public static void main(String[] args) throws Exception { + asyncSetMinCpuPlatformLRO(); + } + + public static void asyncSetMinCpuPlatformLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMinCpuPlatformInstanceRequest request = + SetMinCpuPlatformInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMinCpuPlatformRequestResource( + InstancesSetMinCpuPlatformRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setMinCpuPlatformOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetMinCpuPlatform_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/SyncSetMinCpuPlatform.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/SyncSetMinCpuPlatform.java new file mode 100644 index 000000000000..4365bfa9e510 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/SyncSetMinCpuPlatform.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMinCpuPlatform_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMinCpuPlatformRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest; + +public class SyncSetMinCpuPlatform { + + public static void main(String[] args) throws Exception { + syncSetMinCpuPlatform(); + } + + public static void syncSetMinCpuPlatform() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetMinCpuPlatformInstanceRequest request = + SetMinCpuPlatformInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetMinCpuPlatformRequestResource( + InstancesSetMinCpuPlatformRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setMinCpuPlatformAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetMinCpuPlatform_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/SyncSetMinCpuPlatformStringStringStringInstancessetmincpuplatformrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/SyncSetMinCpuPlatformStringStringStringInstancessetmincpuplatformrequest.java new file mode 100644 index 000000000000..dd64a7828e8a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setmincpuplatform/SyncSetMinCpuPlatformStringStringStringInstancessetmincpuplatformrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetMinCpuPlatform_StringStringStringInstancessetmincpuplatformrequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetMinCpuPlatformRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetMinCpuPlatformStringStringStringInstancessetmincpuplatformrequest { + + public static void main(String[] args) throws Exception { + syncSetMinCpuPlatformStringStringStringInstancessetmincpuplatformrequest(); + } + + public static void syncSetMinCpuPlatformStringStringStringInstancessetmincpuplatformrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource = + InstancesSetMinCpuPlatformRequest.newBuilder().build(); + Operation response = + instancesClient + .setMinCpuPlatformAsync( + project, zone, instance, instancesSetMinCpuPlatformRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_SetMinCpuPlatform_StringStringStringInstancessetmincpuplatformrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/AsyncSetName.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/AsyncSetName.java new file mode 100644 index 000000000000..3836fddff941 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/AsyncSetName.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetName_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetNameRequest; +import com.google.cloud.compute.v1.SetNameInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetName { + + public static void main(String[] args) throws Exception { + asyncSetName(); + } + + public static void asyncSetName() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetNameInstanceRequest request = + SetNameInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetNameRequestResource(InstancesSetNameRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setNameCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetName_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/AsyncSetNameLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/AsyncSetNameLRO.java new file mode 100644 index 000000000000..3f3431b18866 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/AsyncSetNameLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetName_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetNameRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetNameInstanceRequest; + +public class AsyncSetNameLRO { + + public static void main(String[] args) throws Exception { + asyncSetNameLRO(); + } + + public static void asyncSetNameLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetNameInstanceRequest request = + SetNameInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetNameRequestResource(InstancesSetNameRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setNameOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetName_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/SyncSetName.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/SyncSetName.java new file mode 100644 index 000000000000..4356b6a3ef29 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/SyncSetName.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetName_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetNameRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetNameInstanceRequest; + +public class SyncSetName { + + public static void main(String[] args) throws Exception { + syncSetName(); + } + + public static void syncSetName() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetNameInstanceRequest request = + SetNameInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetNameRequestResource(InstancesSetNameRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setNameAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetName_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/SyncSetNameStringStringStringInstancessetnamerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/SyncSetNameStringStringStringInstancessetnamerequest.java new file mode 100644 index 000000000000..32b459952f92 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setname/SyncSetNameStringStringStringInstancessetnamerequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetName_StringStringStringInstancessetnamerequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetNameRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetNameStringStringStringInstancessetnamerequest { + + public static void main(String[] args) throws Exception { + syncSetNameStringStringStringInstancessetnamerequest(); + } + + public static void syncSetNameStringStringStringInstancessetnamerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesSetNameRequest instancesSetNameRequestResource = + InstancesSetNameRequest.newBuilder().build(); + Operation response = + instancesClient + .setNameAsync(project, zone, instance, instancesSetNameRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_SetName_StringStringStringInstancessetnamerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/AsyncSetScheduling.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/AsyncSetScheduling.java new file mode 100644 index 000000000000..e2abb80098fa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/AsyncSetScheduling.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetScheduling_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Scheduling; +import com.google.cloud.compute.v1.SetSchedulingInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetScheduling { + + public static void main(String[] args) throws Exception { + asyncSetScheduling(); + } + + public static void asyncSetScheduling() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetSchedulingInstanceRequest request = + SetSchedulingInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSchedulingResource(Scheduling.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setSchedulingCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetScheduling_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/AsyncSetSchedulingLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/AsyncSetSchedulingLRO.java new file mode 100644 index 000000000000..3837cb42270f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/AsyncSetSchedulingLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetScheduling_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Scheduling; +import com.google.cloud.compute.v1.SetSchedulingInstanceRequest; + +public class AsyncSetSchedulingLRO { + + public static void main(String[] args) throws Exception { + asyncSetSchedulingLRO(); + } + + public static void asyncSetSchedulingLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetSchedulingInstanceRequest request = + SetSchedulingInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSchedulingResource(Scheduling.newBuilder().build()) + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setSchedulingOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetScheduling_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/SyncSetScheduling.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/SyncSetScheduling.java new file mode 100644 index 000000000000..9a461ce2e023 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/SyncSetScheduling.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetScheduling_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Scheduling; +import com.google.cloud.compute.v1.SetSchedulingInstanceRequest; + +public class SyncSetScheduling { + + public static void main(String[] args) throws Exception { + syncSetScheduling(); + } + + public static void syncSetScheduling() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetSchedulingInstanceRequest request = + SetSchedulingInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSchedulingResource(Scheduling.newBuilder().build()) + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setSchedulingAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetScheduling_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/SyncSetSchedulingStringStringStringScheduling.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/SyncSetSchedulingStringStringStringScheduling.java new file mode 100644 index 000000000000..6db289486d59 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setscheduling/SyncSetSchedulingStringStringStringScheduling.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetScheduling_StringStringStringScheduling_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Scheduling; + +public class SyncSetSchedulingStringStringStringScheduling { + + public static void main(String[] args) throws Exception { + syncSetSchedulingStringStringStringScheduling(); + } + + public static void syncSetSchedulingStringStringStringScheduling() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Scheduling schedulingResource = Scheduling.newBuilder().build(); + Operation response = + instancesClient.setSchedulingAsync(project, zone, instance, schedulingResource).get(); + } + } +} +// [END compute_v1_generated_Instances_SetScheduling_StringStringStringScheduling_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/AsyncSetServiceAccount.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/AsyncSetServiceAccount.java new file mode 100644 index 000000000000..f3720080fcf4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/AsyncSetServiceAccount.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetServiceAccount_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetServiceAccountRequest; +import com.google.cloud.compute.v1.SetServiceAccountInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetServiceAccount { + + public static void main(String[] args) throws Exception { + asyncSetServiceAccount(); + } + + public static void asyncSetServiceAccount() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetServiceAccountInstanceRequest request = + SetServiceAccountInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetServiceAccountRequestResource( + InstancesSetServiceAccountRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setServiceAccountCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetServiceAccount_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/AsyncSetServiceAccountLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/AsyncSetServiceAccountLRO.java new file mode 100644 index 000000000000..f5d2730c4769 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/AsyncSetServiceAccountLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetServiceAccount_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetServiceAccountRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetServiceAccountInstanceRequest; + +public class AsyncSetServiceAccountLRO { + + public static void main(String[] args) throws Exception { + asyncSetServiceAccountLRO(); + } + + public static void asyncSetServiceAccountLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetServiceAccountInstanceRequest request = + SetServiceAccountInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetServiceAccountRequestResource( + InstancesSetServiceAccountRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setServiceAccountOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetServiceAccount_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/SyncSetServiceAccount.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/SyncSetServiceAccount.java new file mode 100644 index 000000000000..d876cc32041d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/SyncSetServiceAccount.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetServiceAccount_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetServiceAccountRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetServiceAccountInstanceRequest; + +public class SyncSetServiceAccount { + + public static void main(String[] args) throws Exception { + syncSetServiceAccount(); + } + + public static void syncSetServiceAccount() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetServiceAccountInstanceRequest request = + SetServiceAccountInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesSetServiceAccountRequestResource( + InstancesSetServiceAccountRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setServiceAccountAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetServiceAccount_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/SyncSetServiceAccountStringStringStringInstancessetserviceaccountrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/SyncSetServiceAccountStringStringStringInstancessetserviceaccountrequest.java new file mode 100644 index 000000000000..e2012373a4b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setserviceaccount/SyncSetServiceAccountStringStringStringInstancessetserviceaccountrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetServiceAccount_StringStringStringInstancessetserviceaccountrequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesSetServiceAccountRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetServiceAccountStringStringStringInstancessetserviceaccountrequest { + + public static void main(String[] args) throws Exception { + syncSetServiceAccountStringStringStringInstancessetserviceaccountrequest(); + } + + public static void syncSetServiceAccountStringStringStringInstancessetserviceaccountrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource = + InstancesSetServiceAccountRequest.newBuilder().build(); + Operation response = + instancesClient + .setServiceAccountAsync( + project, zone, instance, instancesSetServiceAccountRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_SetServiceAccount_StringStringStringInstancessetserviceaccountrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/AsyncSetShieldedInstanceIntegrityPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/AsyncSetShieldedInstanceIntegrityPolicy.java new file mode 100644 index 000000000000..8006b0476fc6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/AsyncSetShieldedInstanceIntegrityPolicy.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetShieldedInstanceIntegrityPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest; +import com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy; +import com.google.longrunning.Operation; + +public class AsyncSetShieldedInstanceIntegrityPolicy { + + public static void main(String[] args) throws Exception { + asyncSetShieldedInstanceIntegrityPolicy(); + } + + public static void asyncSetShieldedInstanceIntegrityPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetShieldedInstanceIntegrityPolicyInstanceRequest request = + SetShieldedInstanceIntegrityPolicyInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setShieldedInstanceIntegrityPolicyResource( + ShieldedInstanceIntegrityPolicy.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.setShieldedInstanceIntegrityPolicyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetShieldedInstanceIntegrityPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/AsyncSetShieldedInstanceIntegrityPolicyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/AsyncSetShieldedInstanceIntegrityPolicyLRO.java new file mode 100644 index 000000000000..c599fc3c93cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/AsyncSetShieldedInstanceIntegrityPolicyLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetShieldedInstanceIntegrityPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest; +import com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy; + +public class AsyncSetShieldedInstanceIntegrityPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncSetShieldedInstanceIntegrityPolicyLRO(); + } + + public static void asyncSetShieldedInstanceIntegrityPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetShieldedInstanceIntegrityPolicyInstanceRequest request = + SetShieldedInstanceIntegrityPolicyInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setShieldedInstanceIntegrityPolicyResource( + ShieldedInstanceIntegrityPolicy.newBuilder().build()) + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setShieldedInstanceIntegrityPolicyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetShieldedInstanceIntegrityPolicy_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/SyncSetShieldedInstanceIntegrityPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/SyncSetShieldedInstanceIntegrityPolicy.java new file mode 100644 index 000000000000..6078d104e0c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/SyncSetShieldedInstanceIntegrityPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetShieldedInstanceIntegrityPolicy_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest; +import com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy; + +public class SyncSetShieldedInstanceIntegrityPolicy { + + public static void main(String[] args) throws Exception { + syncSetShieldedInstanceIntegrityPolicy(); + } + + public static void syncSetShieldedInstanceIntegrityPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetShieldedInstanceIntegrityPolicyInstanceRequest request = + SetShieldedInstanceIntegrityPolicyInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setShieldedInstanceIntegrityPolicyResource( + ShieldedInstanceIntegrityPolicy.newBuilder().build()) + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setShieldedInstanceIntegrityPolicyAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetShieldedInstanceIntegrityPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/SyncSetShieldedInstanceIntegrityPolicyStringStringStringShieldedinstanceintegritypolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/SyncSetShieldedInstanceIntegrityPolicyStringStringStringShieldedinstanceintegritypolicy.java new file mode 100644 index 000000000000..c5fa0325a06b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/setshieldedinstanceintegritypolicy/SyncSetShieldedInstanceIntegrityPolicyStringStringStringShieldedinstanceintegritypolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetShieldedInstanceIntegrityPolicy_StringStringStringShieldedinstanceintegritypolicy_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy; + +public +class SyncSetShieldedInstanceIntegrityPolicyStringStringStringShieldedinstanceintegritypolicy { + + public static void main(String[] args) throws Exception { + syncSetShieldedInstanceIntegrityPolicyStringStringStringShieldedinstanceintegritypolicy(); + } + + public static void + syncSetShieldedInstanceIntegrityPolicyStringStringStringShieldedinstanceintegritypolicy() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = + ShieldedInstanceIntegrityPolicy.newBuilder().build(); + Operation response = + instancesClient + .setShieldedInstanceIntegrityPolicyAsync( + project, zone, instance, shieldedInstanceIntegrityPolicyResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_SetShieldedInstanceIntegrityPolicy_StringStringStringShieldedinstanceintegritypolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/AsyncSetTags.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/AsyncSetTags.java new file mode 100644 index 000000000000..a50f18b42639 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/AsyncSetTags.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetTags_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SetTagsInstanceRequest; +import com.google.cloud.compute.v1.Tags; +import com.google.longrunning.Operation; + +public class AsyncSetTags { + + public static void main(String[] args) throws Exception { + asyncSetTags(); + } + + public static void asyncSetTags() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetTagsInstanceRequest request = + SetTagsInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTagsResource(Tags.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.setTagsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetTags_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/AsyncSetTagsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/AsyncSetTagsLRO.java new file mode 100644 index 000000000000..d0acb0291331 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/AsyncSetTagsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetTags_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetTagsInstanceRequest; +import com.google.cloud.compute.v1.Tags; + +public class AsyncSetTagsLRO { + + public static void main(String[] args) throws Exception { + asyncSetTagsLRO(); + } + + public static void asyncSetTagsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetTagsInstanceRequest request = + SetTagsInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTagsResource(Tags.newBuilder().build()) + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.setTagsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SetTags_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/SyncSetTags.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/SyncSetTags.java new file mode 100644 index 000000000000..02756a1992be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/SyncSetTags.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetTags_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetTagsInstanceRequest; +import com.google.cloud.compute.v1.Tags; + +public class SyncSetTags { + + public static void main(String[] args) throws Exception { + syncSetTags(); + } + + public static void syncSetTags() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SetTagsInstanceRequest request = + SetTagsInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTagsResource(Tags.newBuilder().build()) + .setZone("zone3744684") + .build(); + Operation response = instancesClient.setTagsAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SetTags_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/SyncSetTagsStringStringStringTags.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/SyncSetTagsStringStringStringTags.java new file mode 100644 index 000000000000..ee31c8c968ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/settags/SyncSetTagsStringStringStringTags.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SetTags_StringStringStringTags_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Tags; + +public class SyncSetTagsStringStringStringTags { + + public static void main(String[] args) throws Exception { + syncSetTagsStringStringStringTags(); + } + + public static void syncSetTagsStringStringStringTags() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Tags tagsResource = Tags.newBuilder().build(); + Operation response = + instancesClient.setTagsAsync(project, zone, instance, tagsResource).get(); + } + } +} +// [END compute_v1_generated_Instances_SetTags_StringStringStringTags_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java new file mode 100644 index 000000000000..cde70c40da21 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SimulateMaintenanceEvent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSimulateMaintenanceEvent { + + public static void main(String[] args) throws Exception { + asyncSimulateMaintenanceEvent(); + } + + public static void asyncSimulateMaintenanceEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SimulateMaintenanceEventInstanceRequest request = + SimulateMaintenanceEventInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.simulateMaintenanceEventCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SimulateMaintenanceEvent_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java new file mode 100644 index 000000000000..f6592c2aca0b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SimulateMaintenanceEvent_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest; + +public class AsyncSimulateMaintenanceEventLRO { + + public static void main(String[] args) throws Exception { + asyncSimulateMaintenanceEventLRO(); + } + + public static void asyncSimulateMaintenanceEventLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SimulateMaintenanceEventInstanceRequest request = + SimulateMaintenanceEventInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.simulateMaintenanceEventOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_SimulateMaintenanceEvent_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java new file mode 100644 index 000000000000..515644a990ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SimulateMaintenanceEvent_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest; + +public class SyncSimulateMaintenanceEvent { + + public static void main(String[] args) throws Exception { + syncSimulateMaintenanceEvent(); + } + + public static void syncSimulateMaintenanceEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SimulateMaintenanceEventInstanceRequest request = + SimulateMaintenanceEventInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.simulateMaintenanceEventAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_SimulateMaintenanceEvent_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/SyncSimulateMaintenanceEventStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/SyncSimulateMaintenanceEventStringStringString.java new file mode 100644 index 000000000000..4d9cf1278891 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/simulatemaintenanceevent/SyncSimulateMaintenanceEventStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_SimulateMaintenanceEvent_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncSimulateMaintenanceEventStringStringString { + + public static void main(String[] args) throws Exception { + syncSimulateMaintenanceEventStringStringString(); + } + + public static void syncSimulateMaintenanceEventStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Operation response = + instancesClient.simulateMaintenanceEventAsync(project, zone, instance).get(); + } + } +} +// [END compute_v1_generated_Instances_SimulateMaintenanceEvent_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/AsyncStart.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/AsyncStart.java new file mode 100644 index 000000000000..39af655069b8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/AsyncStart.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Start_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.StartInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncStart { + + public static void main(String[] args) throws Exception { + asyncStart(); + } + + public static void asyncStart() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.startCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Start_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/AsyncStartLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/AsyncStartLRO.java new file mode 100644 index 000000000000..ead4cd537a86 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/AsyncStartLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Start_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.StartInstanceRequest; + +public class AsyncStartLRO { + + public static void main(String[] args) throws Exception { + asyncStartLRO(); + } + + public static void asyncStartLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.startOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Start_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/SyncStart.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/SyncStart.java new file mode 100644 index 000000000000..216d698ccf69 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/SyncStart.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Start_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.StartInstanceRequest; + +public class SyncStart { + + public static void main(String[] args) throws Exception { + syncStart(); + } + + public static void syncStart() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StartInstanceRequest request = + StartInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.startAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_Start_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/SyncStartStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/SyncStartStringStringString.java new file mode 100644 index 000000000000..7a8de8fe98b8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/start/SyncStartStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Start_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncStartStringStringString { + + public static void main(String[] args) throws Exception { + syncStartStringStringString(); + } + + public static void syncStartStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Operation response = instancesClient.startAsync(project, zone, instance).get(); + } + } +} +// [END compute_v1_generated_Instances_Start_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/AsyncStartWithEncryptionKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/AsyncStartWithEncryptionKey.java new file mode 100644 index 000000000000..19b2c5ac3b0f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/AsyncStartWithEncryptionKey.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_StartWithEncryptionKey_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest; +import com.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncStartWithEncryptionKey { + + public static void main(String[] args) throws Exception { + asyncStartWithEncryptionKey(); + } + + public static void asyncStartWithEncryptionKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StartWithEncryptionKeyInstanceRequest request = + StartWithEncryptionKeyInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesStartWithEncryptionKeyRequestResource( + InstancesStartWithEncryptionKeyRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.startWithEncryptionKeyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_StartWithEncryptionKey_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/AsyncStartWithEncryptionKeyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/AsyncStartWithEncryptionKeyLRO.java new file mode 100644 index 000000000000..fd834b927ed6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/AsyncStartWithEncryptionKeyLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_StartWithEncryptionKey_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest; + +public class AsyncStartWithEncryptionKeyLRO { + + public static void main(String[] args) throws Exception { + asyncStartWithEncryptionKeyLRO(); + } + + public static void asyncStartWithEncryptionKeyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StartWithEncryptionKeyInstanceRequest request = + StartWithEncryptionKeyInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesStartWithEncryptionKeyRequestResource( + InstancesStartWithEncryptionKeyRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.startWithEncryptionKeyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_StartWithEncryptionKey_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/SyncStartWithEncryptionKey.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/SyncStartWithEncryptionKey.java new file mode 100644 index 000000000000..621ddcaefbdc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/SyncStartWithEncryptionKey.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_StartWithEncryptionKey_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest; + +public class SyncStartWithEncryptionKey { + + public static void main(String[] args) throws Exception { + syncStartWithEncryptionKey(); + } + + public static void syncStartWithEncryptionKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StartWithEncryptionKeyInstanceRequest request = + StartWithEncryptionKeyInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstancesStartWithEncryptionKeyRequestResource( + InstancesStartWithEncryptionKeyRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.startWithEncryptionKeyAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_StartWithEncryptionKey_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/SyncStartWithEncryptionKeyStringStringStringInstancesstartwithencryptionkeyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/SyncStartWithEncryptionKeyStringStringStringInstancesstartwithencryptionkeyrequest.java new file mode 100644 index 000000000000..b90ec464c560 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/startwithencryptionkey/SyncStartWithEncryptionKeyStringStringStringInstancesstartwithencryptionkeyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_StartWithEncryptionKey_StringStringStringInstancesstartwithencryptionkeyrequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncStartWithEncryptionKeyStringStringStringInstancesstartwithencryptionkeyrequest { + + public static void main(String[] args) throws Exception { + syncStartWithEncryptionKeyStringStringStringInstancesstartwithencryptionkeyrequest(); + } + + public static void + syncStartWithEncryptionKeyStringStringStringInstancesstartwithencryptionkeyrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource = + InstancesStartWithEncryptionKeyRequest.newBuilder().build(); + Operation response = + instancesClient + .startWithEncryptionKeyAsync( + project, zone, instance, instancesStartWithEncryptionKeyRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_StartWithEncryptionKey_StringStringStringInstancesstartwithencryptionkeyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/AsyncStop.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/AsyncStop.java new file mode 100644 index 000000000000..a2bb30eceeb6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/AsyncStop.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Stop_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.StopInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncStop { + + public static void main(String[] args) throws Exception { + asyncStop(); + } + + public static void asyncStop() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setDiscardLocalSsd(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.stopCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Stop_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/AsyncStopLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/AsyncStopLRO.java new file mode 100644 index 000000000000..e12567972ed7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/AsyncStopLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Stop_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.StopInstanceRequest; + +public class AsyncStopLRO { + + public static void main(String[] args) throws Exception { + asyncStopLRO(); + } + + public static void asyncStopLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setDiscardLocalSsd(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.stopOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Stop_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/SyncStop.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/SyncStop.java new file mode 100644 index 000000000000..e37d0a085f31 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/SyncStop.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Stop_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.StopInstanceRequest; + +public class SyncStop { + + public static void main(String[] args) throws Exception { + syncStop(); + } + + public static void syncStop() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + StopInstanceRequest request = + StopInstanceRequest.newBuilder() + .setDiscardLocalSsd(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.stopAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_Stop_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/SyncStopStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/SyncStopStringStringString.java new file mode 100644 index 000000000000..c24af468d1c1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/stop/SyncStopStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Stop_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncStopStringStringString { + + public static void main(String[] args) throws Exception { + syncStopStringStringString(); + } + + public static void syncStopStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Operation response = instancesClient.stopAsync(project, zone, instance).get(); + } + } +} +// [END compute_v1_generated_Instances_Stop_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/AsyncSuspend.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/AsyncSuspend.java new file mode 100644 index 000000000000..e765ccfca93a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/AsyncSuspend.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Suspend_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.SuspendInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncSuspend { + + public static void main(String[] args) throws Exception { + asyncSuspend(); + } + + public static void asyncSuspend() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SuspendInstanceRequest request = + SuspendInstanceRequest.newBuilder() + .setDiscardLocalSsd(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.suspendCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Suspend_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/AsyncSuspendLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/AsyncSuspendLRO.java new file mode 100644 index 000000000000..8552f75b1411 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/AsyncSuspendLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Suspend_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SuspendInstanceRequest; + +public class AsyncSuspendLRO { + + public static void main(String[] args) throws Exception { + asyncSuspendLRO(); + } + + public static void asyncSuspendLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SuspendInstanceRequest request = + SuspendInstanceRequest.newBuilder() + .setDiscardLocalSsd(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.suspendOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Suspend_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/SyncSuspend.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/SyncSuspend.java new file mode 100644 index 000000000000..aaa40abbf92b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/SyncSuspend.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Suspend_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SuspendInstanceRequest; + +public class SyncSuspend { + + public static void main(String[] args) throws Exception { + syncSuspend(); + } + + public static void syncSuspend() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + SuspendInstanceRequest request = + SuspendInstanceRequest.newBuilder() + .setDiscardLocalSsd(true) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.suspendAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_Suspend_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/SyncSuspendStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/SyncSuspendStringStringString.java new file mode 100644 index 000000000000..4ebb87a1d924 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/suspend/SyncSuspendStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Suspend_StringStringString_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncSuspendStringStringString { + + public static void main(String[] args) throws Exception { + syncSuspendStringStringString(); + } + + public static void syncSuspendStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Operation response = instancesClient.suspendAsync(project, zone, instance).get(); + } + } +} +// [END compute_v1_generated_Instances_Suspend_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..8dbb9a3c47ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.TestIamPermissionsInstanceRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + TestIamPermissionsInstanceRequest request = + TestIamPermissionsInstanceRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..9f1db0cb66ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_TestIamPermissions_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.TestIamPermissionsInstanceRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + TestIamPermissionsInstanceRequest request = + TestIamPermissionsInstanceRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + TestPermissionsResponse response = instancesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_Instances_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..e98fb564a2d5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + instancesClient.testIamPermissions( + project, zone, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_Instances_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/AsyncUpdate.java new file mode 100644 index 000000000000..09cb962104dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/AsyncUpdate.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.UpdateInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateInstanceRequest request = + UpdateInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstanceResource(Instance.newBuilder().build()) + .setMinimalAction("minimalAction624261943") + .setMostDisruptiveAllowedAction("mostDisruptiveAllowedAction-1597376488") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = instancesClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..4a4f2fc9f00f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/AsyncUpdateLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateInstanceRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateInstanceRequest request = + UpdateInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstanceResource(Instance.newBuilder().build()) + .setMinimalAction("minimalAction624261943") + .setMostDisruptiveAllowedAction("mostDisruptiveAllowedAction-1597376488") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/SyncUpdate.java new file mode 100644 index 000000000000..80ac347c6833 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Update_sync] +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateInstanceRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateInstanceRequest request = + UpdateInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setInstanceResource(Instance.newBuilder().build()) + .setMinimalAction("minimalAction624261943") + .setMostDisruptiveAllowedAction("mostDisruptiveAllowedAction-1597376488") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/SyncUpdateStringStringStringInstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/SyncUpdateStringStringStringInstance.java new file mode 100644 index 000000000000..69f63326bfcd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/update/SyncUpdateStringStringStringInstance.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_Update_StringStringStringInstance_sync] +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateStringStringStringInstance { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringInstance(); + } + + public static void syncUpdateStringStringStringInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + Instance instanceResource = Instance.newBuilder().build(); + Operation response = + instancesClient.updateAsync(project, zone, instance, instanceResource).get(); + } + } +} +// [END compute_v1_generated_Instances_Update_StringStringStringInstance_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/AsyncUpdateAccessConfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/AsyncUpdateAccessConfig.java new file mode 100644 index 000000000000..da0a7f919a19 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/AsyncUpdateAccessConfig.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateAccessConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AccessConfig; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdateAccessConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateAccessConfig(); + } + + public static void asyncUpdateAccessConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateAccessConfigInstanceRequest request = + UpdateAccessConfigInstanceRequest.newBuilder() + .setAccessConfigResource(AccessConfig.newBuilder().build()) + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.updateAccessConfigCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateAccessConfig_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/AsyncUpdateAccessConfigLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/AsyncUpdateAccessConfigLRO.java new file mode 100644 index 000000000000..f607c18ea62c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/AsyncUpdateAccessConfigLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateAccessConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AccessConfig; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest; + +public class AsyncUpdateAccessConfigLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateAccessConfigLRO(); + } + + public static void asyncUpdateAccessConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateAccessConfigInstanceRequest request = + UpdateAccessConfigInstanceRequest.newBuilder() + .setAccessConfigResource(AccessConfig.newBuilder().build()) + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.updateAccessConfigOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateAccessConfig_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/SyncUpdateAccessConfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/SyncUpdateAccessConfig.java new file mode 100644 index 000000000000..dbc1bb2ff02f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/SyncUpdateAccessConfig.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateAccessConfig_sync] +import com.google.cloud.compute.v1.AccessConfig; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest; + +public class SyncUpdateAccessConfig { + + public static void main(String[] args) throws Exception { + syncUpdateAccessConfig(); + } + + public static void syncUpdateAccessConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateAccessConfigInstanceRequest request = + UpdateAccessConfigInstanceRequest.newBuilder() + .setAccessConfigResource(AccessConfig.newBuilder().build()) + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.updateAccessConfigAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateAccessConfig_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/SyncUpdateAccessConfigStringStringStringStringAccessconfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/SyncUpdateAccessConfigStringStringStringStringAccessconfig.java new file mode 100644 index 000000000000..c6ccb906184c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateaccessconfig/SyncUpdateAccessConfigStringStringStringStringAccessconfig.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateAccessConfig_StringStringStringStringAccessconfig_sync] +import com.google.cloud.compute.v1.AccessConfig; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateAccessConfigStringStringStringStringAccessconfig { + + public static void main(String[] args) throws Exception { + syncUpdateAccessConfigStringStringStringStringAccessconfig(); + } + + public static void syncUpdateAccessConfigStringStringStringStringAccessconfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + String networkInterface = "networkInterface-341981525"; + AccessConfig accessConfigResource = AccessConfig.newBuilder().build(); + Operation response = + instancesClient + .updateAccessConfigAsync( + project, zone, instance, networkInterface, accessConfigResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateAccessConfig_StringStringStringStringAccessconfig_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/AsyncUpdateDisplayDevice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/AsyncUpdateDisplayDevice.java new file mode 100644 index 000000000000..995f9c7aed18 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/AsyncUpdateDisplayDevice.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateDisplayDevice_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisplayDevice; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdateDisplayDevice { + + public static void main(String[] args) throws Exception { + asyncUpdateDisplayDevice(); + } + + public static void asyncUpdateDisplayDevice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateDisplayDeviceInstanceRequest request = + UpdateDisplayDeviceInstanceRequest.newBuilder() + .setDisplayDeviceResource(DisplayDevice.newBuilder().build()) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.updateDisplayDeviceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateDisplayDevice_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/AsyncUpdateDisplayDeviceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/AsyncUpdateDisplayDeviceLRO.java new file mode 100644 index 000000000000..9291ce63e1a2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/AsyncUpdateDisplayDeviceLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateDisplayDevice_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DisplayDevice; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest; + +public class AsyncUpdateDisplayDeviceLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDisplayDeviceLRO(); + } + + public static void asyncUpdateDisplayDeviceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateDisplayDeviceInstanceRequest request = + UpdateDisplayDeviceInstanceRequest.newBuilder() + .setDisplayDeviceResource(DisplayDevice.newBuilder().build()) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.updateDisplayDeviceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateDisplayDevice_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/SyncUpdateDisplayDevice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/SyncUpdateDisplayDevice.java new file mode 100644 index 000000000000..fe3a01d9ed91 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/SyncUpdateDisplayDevice.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateDisplayDevice_sync] +import com.google.cloud.compute.v1.DisplayDevice; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest; + +public class SyncUpdateDisplayDevice { + + public static void main(String[] args) throws Exception { + syncUpdateDisplayDevice(); + } + + public static void syncUpdateDisplayDevice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateDisplayDeviceInstanceRequest request = + UpdateDisplayDeviceInstanceRequest.newBuilder() + .setDisplayDeviceResource(DisplayDevice.newBuilder().build()) + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.updateDisplayDeviceAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateDisplayDevice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/SyncUpdateDisplayDeviceStringStringStringDisplaydevice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/SyncUpdateDisplayDeviceStringStringStringDisplaydevice.java new file mode 100644 index 000000000000..ecc8b125acd2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatedisplaydevice/SyncUpdateDisplayDeviceStringStringStringDisplaydevice.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateDisplayDevice_StringStringStringDisplaydevice_sync] +import com.google.cloud.compute.v1.DisplayDevice; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateDisplayDeviceStringStringStringDisplaydevice { + + public static void main(String[] args) throws Exception { + syncUpdateDisplayDeviceStringStringStringDisplaydevice(); + } + + public static void syncUpdateDisplayDeviceStringStringStringDisplaydevice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + DisplayDevice displayDeviceResource = DisplayDevice.newBuilder().build(); + Operation response = + instancesClient + .updateDisplayDeviceAsync(project, zone, instance, displayDeviceResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateDisplayDevice_StringStringStringDisplaydevice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/AsyncUpdateNetworkInterface.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/AsyncUpdateNetworkInterface.java new file mode 100644 index 000000000000..fc9488e8c208 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/AsyncUpdateNetworkInterface.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateNetworkInterface_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.NetworkInterface; +import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdateNetworkInterface { + + public static void main(String[] args) throws Exception { + asyncUpdateNetworkInterface(); + } + + public static void asyncUpdateNetworkInterface() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateNetworkInterfaceInstanceRequest request = + UpdateNetworkInterfaceInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setNetworkInterfaceResource(NetworkInterface.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.updateNetworkInterfaceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateNetworkInterface_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/AsyncUpdateNetworkInterfaceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/AsyncUpdateNetworkInterfaceLRO.java new file mode 100644 index 000000000000..faf9ca1ab5b3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/AsyncUpdateNetworkInterfaceLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateNetworkInterface_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.NetworkInterface; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest; + +public class AsyncUpdateNetworkInterfaceLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateNetworkInterfaceLRO(); + } + + public static void asyncUpdateNetworkInterfaceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateNetworkInterfaceInstanceRequest request = + UpdateNetworkInterfaceInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setNetworkInterfaceResource(NetworkInterface.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.updateNetworkInterfaceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateNetworkInterface_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/SyncUpdateNetworkInterface.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/SyncUpdateNetworkInterface.java new file mode 100644 index 000000000000..65be5ff2f52a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/SyncUpdateNetworkInterface.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateNetworkInterface_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.NetworkInterface; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest; + +public class SyncUpdateNetworkInterface { + + public static void main(String[] args) throws Exception { + syncUpdateNetworkInterface(); + } + + public static void syncUpdateNetworkInterface() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateNetworkInterfaceInstanceRequest request = + UpdateNetworkInterfaceInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setNetworkInterface("networkInterface-341981525") + .setNetworkInterfaceResource(NetworkInterface.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = instancesClient.updateNetworkInterfaceAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateNetworkInterface_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/SyncUpdateNetworkInterfaceStringStringStringStringNetworkinterface.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/SyncUpdateNetworkInterfaceStringStringStringStringNetworkinterface.java new file mode 100644 index 000000000000..ed438b73c722 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updatenetworkinterface/SyncUpdateNetworkInterfaceStringStringStringStringNetworkinterface.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateNetworkInterface_StringStringStringStringNetworkinterface_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.NetworkInterface; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdateNetworkInterfaceStringStringStringStringNetworkinterface { + + public static void main(String[] args) throws Exception { + syncUpdateNetworkInterfaceStringStringStringStringNetworkinterface(); + } + + public static void syncUpdateNetworkInterfaceStringStringStringStringNetworkinterface() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + String networkInterface = "networkInterface-341981525"; + NetworkInterface networkInterfaceResource = NetworkInterface.newBuilder().build(); + Operation response = + instancesClient + .updateNetworkInterfaceAsync( + project, zone, instance, networkInterface, networkInterfaceResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateNetworkInterface_StringStringStringStringNetworkinterface_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/AsyncUpdateShieldedInstanceConfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/AsyncUpdateShieldedInstanceConfig.java new file mode 100644 index 000000000000..ccd69f522ade --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/AsyncUpdateShieldedInstanceConfig.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateShieldedInstanceConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.ShieldedInstanceConfig; +import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdateShieldedInstanceConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateShieldedInstanceConfig(); + } + + public static void asyncUpdateShieldedInstanceConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateShieldedInstanceConfigInstanceRequest request = + UpdateShieldedInstanceConfigInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setShieldedInstanceConfigResource(ShieldedInstanceConfig.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = + instancesClient.updateShieldedInstanceConfigCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateShieldedInstanceConfig_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/AsyncUpdateShieldedInstanceConfigLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/AsyncUpdateShieldedInstanceConfigLRO.java new file mode 100644 index 000000000000..668e0b14dfc7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/AsyncUpdateShieldedInstanceConfigLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateShieldedInstanceConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ShieldedInstanceConfig; +import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest; + +public class AsyncUpdateShieldedInstanceConfigLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateShieldedInstanceConfigLRO(); + } + + public static void asyncUpdateShieldedInstanceConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateShieldedInstanceConfigInstanceRequest request = + UpdateShieldedInstanceConfigInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setShieldedInstanceConfigResource(ShieldedInstanceConfig.newBuilder().build()) + .setZone("zone3744684") + .build(); + OperationFuture future = + instancesClient.updateShieldedInstanceConfigOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateShieldedInstanceConfig_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/SyncUpdateShieldedInstanceConfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/SyncUpdateShieldedInstanceConfig.java new file mode 100644 index 000000000000..12811291b5aa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/SyncUpdateShieldedInstanceConfig.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateShieldedInstanceConfig_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ShieldedInstanceConfig; +import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest; + +public class SyncUpdateShieldedInstanceConfig { + + public static void main(String[] args) throws Exception { + syncUpdateShieldedInstanceConfig(); + } + + public static void syncUpdateShieldedInstanceConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + UpdateShieldedInstanceConfigInstanceRequest request = + UpdateShieldedInstanceConfigInstanceRequest.newBuilder() + .setInstance("instance555127957") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setShieldedInstanceConfigResource(ShieldedInstanceConfig.newBuilder().build()) + .setZone("zone3744684") + .build(); + Operation response = instancesClient.updateShieldedInstanceConfigAsync(request).get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateShieldedInstanceConfig_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/SyncUpdateShieldedInstanceConfigStringStringStringShieldedinstanceconfig.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/SyncUpdateShieldedInstanceConfigStringStringStringShieldedinstanceconfig.java new file mode 100644 index 000000000000..a4958204e06c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/updateshieldedinstanceconfig/SyncUpdateShieldedInstanceConfigStringStringStringShieldedinstanceconfig.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.compute.v1.samples; + +// [START compute_v1_generated_Instances_UpdateShieldedInstanceConfig_StringStringStringShieldedinstanceconfig_sync] +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ShieldedInstanceConfig; + +public class SyncUpdateShieldedInstanceConfigStringStringStringShieldedinstanceconfig { + + public static void main(String[] args) throws Exception { + syncUpdateShieldedInstanceConfigStringStringStringShieldedinstanceconfig(); + } + + public static void syncUpdateShieldedInstanceConfigStringStringStringShieldedinstanceconfig() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstancesClient instancesClient = InstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String instance = "instance555127957"; + ShieldedInstanceConfig shieldedInstanceConfigResource = + ShieldedInstanceConfig.newBuilder().build(); + Operation response = + instancesClient + .updateShieldedInstanceConfigAsync( + project, zone, instance, shieldedInstanceConfigResource) + .get(); + } + } +} +// [END compute_v1_generated_Instances_UpdateShieldedInstanceConfig_StringStringStringShieldedinstanceconfig_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancessettings/get/SyncGet.java new file mode 100644 index 000000000000..e92a88b562a9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstancesSettings_Get_sync] +import com.google.cloud.compute.v1.InstancesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstancesSettings.Builder instancesSettingsBuilder = InstancesSettings.newBuilder(); + instancesSettingsBuilder + .getSettings() + .setRetrySettings( + instancesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InstancesSettings instancesSettings = instancesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InstancesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..7fccbb09cb0e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListInstanceTemplatesRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.InstanceTemplatesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + AggregatedListInstanceTemplatesRequest request = + AggregatedListInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + instanceTemplatesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceTemplates_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..3f26c9507276 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListInstanceTemplatesRequest; +import com.google.cloud.compute.v1.InstanceTemplateAggregatedList; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.InstanceTemplatesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + AggregatedListInstanceTemplatesRequest request = + AggregatedListInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InstanceTemplateAggregatedList response = + instanceTemplatesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceTemplates_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..2260afa33eb7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListInstanceTemplatesRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.InstanceTemplatesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + AggregatedListInstanceTemplatesRequest request = + AggregatedListInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + instanceTemplatesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceTemplates_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..286303357ae5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_AggregatedList_String_sync] +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.InstanceTemplatesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + instanceTemplatesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceTemplates_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..76127c7d0e2b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.InstanceTemplatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceTemplatesSettings instanceTemplatesSettings = + InstanceTemplatesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InstanceTemplatesClient instanceTemplatesClient = + InstanceTemplatesClient.create(instanceTemplatesSettings); + } +} +// [END compute_v1_generated_InstanceTemplates_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..ead07f8563ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.InstanceTemplatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceTemplatesSettings instanceTemplatesSettings = + InstanceTemplatesSettings.newBuilder().setEndpoint(myEndpoint).build(); + InstanceTemplatesClient instanceTemplatesClient = + InstanceTemplatesClient.create(instanceTemplatesSettings); + } +} +// [END compute_v1_generated_InstanceTemplates_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/AsyncDelete.java new file mode 100644 index 000000000000..95ddd5c63c84 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + DeleteInstanceTemplateRequest request = + DeleteInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = instanceTemplatesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..e716137d01e8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + DeleteInstanceTemplateRequest request = + DeleteInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + instanceTemplatesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/SyncDelete.java new file mode 100644 index 000000000000..f0c32105094a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Delete_sync] +import com.google.cloud.compute.v1.DeleteInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + DeleteInstanceTemplateRequest request = + DeleteInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = instanceTemplatesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..7f880c836620 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Delete_StringString_sync] +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + String project = "project-309310695"; + String instanceTemplate = "instanceTemplate1009541167"; + Operation response = instanceTemplatesClient.deleteAsync(project, instanceTemplate).get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/AsyncGet.java new file mode 100644 index 000000000000..77c8ed4c8d23 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + GetInstanceTemplateRequest request = + GetInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .build(); + ApiFuture future = + instanceTemplatesClient.getCallable().futureCall(request); + // Do something. + InstanceTemplate response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/SyncGet.java new file mode 100644 index 000000000000..9aa585aed37d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Get_sync] +import com.google.cloud.compute.v1.GetInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + GetInstanceTemplateRequest request = + GetInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .build(); + InstanceTemplate response = instanceTemplatesClient.get(request); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/SyncGetStringString.java new file mode 100644 index 000000000000..92fee62c3bc0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Get_StringString_sync] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + String project = "project-309310695"; + String instanceTemplate = "instanceTemplate1009541167"; + InstanceTemplate response = instanceTemplatesClient.get(project, instanceTemplate); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..e5ea1c3fe38d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + GetIamPolicyInstanceTemplateRequest request = + GetIamPolicyInstanceTemplateRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = instanceTemplatesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..e41ecd1a0d91 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + GetIamPolicyInstanceTemplateRequest request = + GetIamPolicyInstanceTemplateRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = instanceTemplatesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_InstanceTemplates_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/SyncGetIamPolicyStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/SyncGetIamPolicyStringString.java new file mode 100644 index 000000000000..795c8b458eeb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/getiampolicy/SyncGetIamPolicyStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_GetIamPolicy_StringString_sync] +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringString(); + } + + public static void syncGetIamPolicyStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + Policy response = instanceTemplatesClient.getIamPolicy(project, resource); + } + } +} +// [END compute_v1_generated_InstanceTemplates_GetIamPolicy_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/AsyncInsert.java new file mode 100644 index 000000000000..8b5ceecd58c1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + InsertInstanceTemplateRequest request = + InsertInstanceTemplateRequest.newBuilder() + .setInstanceTemplateResource(InstanceTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = instanceTemplatesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..dca8f13977c5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + InsertInstanceTemplateRequest request = + InsertInstanceTemplateRequest.newBuilder() + .setInstanceTemplateResource(InstanceTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + instanceTemplatesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/SyncInsert.java new file mode 100644 index 000000000000..c618c7e460c1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Insert_sync] +import com.google.cloud.compute.v1.InsertInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + InsertInstanceTemplateRequest request = + InsertInstanceTemplateRequest.newBuilder() + .setInstanceTemplateResource(InstanceTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = instanceTemplatesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/SyncInsertStringInstancetemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/SyncInsertStringInstancetemplate.java new file mode 100644 index 000000000000..9262c514859b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/insert/SyncInsertStringInstancetemplate.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_Insert_StringInstancetemplate_sync] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringInstancetemplate { + + public static void main(String[] args) throws Exception { + syncInsertStringInstancetemplate(); + } + + public static void syncInsertStringInstancetemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + String project = "project-309310695"; + InstanceTemplate instanceTemplateResource = InstanceTemplate.newBuilder().build(); + Operation response = + instanceTemplatesClient.insertAsync(project, instanceTemplateResource).get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_Insert_StringInstancetemplate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/AsyncList.java new file mode 100644 index 000000000000..b4ecb14bc6f9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.ListInstanceTemplatesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + ListInstanceTemplatesRequest request = + ListInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + instanceTemplatesClient.listPagedCallable().futureCall(request); + // Do something. + for (InstanceTemplate element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceTemplates_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/AsyncListPaged.java new file mode 100644 index 000000000000..58438bbfec40 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_List_Paged_async] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplateList; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.ListInstanceTemplatesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + ListInstanceTemplatesRequest request = + ListInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InstanceTemplateList response = instanceTemplatesClient.listCallable().call(request); + for (InstanceTemplate element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InstanceTemplates_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/SyncList.java new file mode 100644 index 000000000000..93f3e2d4b544 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_List_sync] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.ListInstanceTemplatesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + ListInstanceTemplatesRequest request = + ListInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (InstanceTemplate element : instanceTemplatesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceTemplates_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/SyncListString.java new file mode 100644 index 000000000000..aaf738962dbb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_List_String_sync] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplatesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + String project = "project-309310695"; + for (InstanceTemplate element : instanceTemplatesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InstanceTemplates_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..e8b07e3ef657 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + SetIamPolicyInstanceTemplateRequest request = + SetIamPolicyInstanceTemplateRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = instanceTemplatesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..8b017f2b4a90 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_SetIamPolicy_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + SetIamPolicyInstanceTemplateRequest request = + SetIamPolicyInstanceTemplateRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = instanceTemplatesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_InstanceTemplates_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java new file mode 100644 index 000000000000..60284ac9d91e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncSetIamPolicyStringStringGlobalsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringGlobalsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringGlobalsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetPolicyRequest globalSetPolicyRequestResource = + GlobalSetPolicyRequest.newBuilder().build(); + Policy response = + instanceTemplatesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_InstanceTemplates_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..85e4324c3d4e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/AsyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + TestIamPermissionsInstanceTemplateRequest request = + TestIamPermissionsInstanceTemplateRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + instanceTemplatesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_InstanceTemplates_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..9af89713dd4b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_TestIamPermissions_sync] +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + TestIamPermissionsInstanceTemplateRequest request = + TestIamPermissionsInstanceTemplateRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = instanceTemplatesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_InstanceTemplates_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..2e2582548eaa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplates/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplates_TestIamPermissions_StringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.InstanceTemplatesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + instanceTemplatesClient.testIamPermissions( + project, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_InstanceTemplates_TestIamPermissions_StringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplatessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplatessettings/get/SyncGet.java new file mode 100644 index 000000000000..d38e5b8c35bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancetemplatessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InstanceTemplatesSettings_Get_sync] +import com.google.cloud.compute.v1.InstanceTemplatesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceTemplatesSettings.Builder instanceTemplatesSettingsBuilder = + InstanceTemplatesSettings.newBuilder(); + instanceTemplatesSettingsBuilder + .getSettings() + .setRetrySettings( + instanceTemplatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InstanceTemplatesSettings instanceTemplatesSettings = instanceTemplatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InstanceTemplatesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..2cfb6019a474 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/AsyncAggregatedList.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListInterconnectAttachmentsRequest; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.InterconnectAttachmentsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + AggregatedListInterconnectAttachmentsRequest request = + AggregatedListInterconnectAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + interconnectAttachmentsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : + future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectAttachments_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..5f178cf8b81d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,68 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListInterconnectAttachmentsRequest; +import com.google.cloud.compute.v1.InterconnectAttachmentAggregatedList; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.InterconnectAttachmentsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + AggregatedListInterconnectAttachmentsRequest request = + AggregatedListInterconnectAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InterconnectAttachmentAggregatedList response = + interconnectAttachmentsClient.aggregatedListCallable().call(request); + for (Map.Entry element : + response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InterconnectAttachments_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..5709d2d88f2d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListInterconnectAttachmentsRequest; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.InterconnectAttachmentsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + AggregatedListInterconnectAttachmentsRequest request = + AggregatedListInterconnectAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + interconnectAttachmentsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectAttachments_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..14fa8b54aa78 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_AggregatedList_String_sync] +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.InterconnectAttachmentsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + interconnectAttachmentsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectAttachments_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d5a7cfb20066 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.InterconnectAttachmentsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectAttachmentsSettings interconnectAttachmentsSettings = + InterconnectAttachmentsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create(interconnectAttachmentsSettings); + } +} +// [END compute_v1_generated_InterconnectAttachments_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..11ae92bef969 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.InterconnectAttachmentsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectAttachmentsSettings interconnectAttachmentsSettings = + InterconnectAttachmentsSettings.newBuilder().setEndpoint(myEndpoint).build(); + InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create(interconnectAttachmentsSettings); + } +} +// [END compute_v1_generated_InterconnectAttachments_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/AsyncDelete.java new file mode 100644 index 000000000000..9e8f94e0ccdb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + DeleteInterconnectAttachmentRequest request = + DeleteInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachment("interconnectAttachment1869250641") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + interconnectAttachmentsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..a60e2223516e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + DeleteInterconnectAttachmentRequest request = + DeleteInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachment("interconnectAttachment1869250641") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + interconnectAttachmentsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/SyncDelete.java new file mode 100644 index 000000000000..4e3a816263c2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Delete_sync] +import com.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + DeleteInterconnectAttachmentRequest request = + DeleteInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachment("interconnectAttachment1869250641") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = interconnectAttachmentsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..e90458a3dfd1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String interconnectAttachment = "interconnectAttachment1869250641"; + Operation response = + interconnectAttachmentsClient.deleteAsync(project, region, interconnectAttachment).get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/AsyncGet.java new file mode 100644 index 000000000000..e08473e19983 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetInterconnectAttachmentRequest; +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + GetInterconnectAttachmentRequest request = + GetInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachment("interconnectAttachment1869250641") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + interconnectAttachmentsClient.getCallable().futureCall(request); + // Do something. + InterconnectAttachment response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/SyncGet.java new file mode 100644 index 000000000000..d2dc9ea9c15b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Get_sync] +import com.google.cloud.compute.v1.GetInterconnectAttachmentRequest; +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + GetInterconnectAttachmentRequest request = + GetInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachment("interconnectAttachment1869250641") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + InterconnectAttachment response = interconnectAttachmentsClient.get(request); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..cd9631990613 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Get_StringStringString_sync] +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String interconnectAttachment = "interconnectAttachment1869250641"; + InterconnectAttachment response = + interconnectAttachmentsClient.get(project, region, interconnectAttachment); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/AsyncInsert.java new file mode 100644 index 000000000000..9a7244772da1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/AsyncInsert.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertInterconnectAttachmentRequest; +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + InsertInterconnectAttachmentRequest request = + InsertInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachmentResource(InterconnectAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + ApiFuture future = + interconnectAttachmentsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..8f19a1db7285 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/AsyncInsertLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertInterconnectAttachmentRequest; +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + InsertInterconnectAttachmentRequest request = + InsertInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachmentResource(InterconnectAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + OperationFuture future = + interconnectAttachmentsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/SyncInsert.java new file mode 100644 index 000000000000..fbebdc45b94b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Insert_sync] +import com.google.cloud.compute.v1.InsertInterconnectAttachmentRequest; +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + InsertInterconnectAttachmentRequest request = + InsertInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachmentResource(InterconnectAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + Operation response = interconnectAttachmentsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/SyncInsertStringStringInterconnectattachment.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/SyncInsertStringStringInterconnectattachment.java new file mode 100644 index 000000000000..7d1411bb1962 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/insert/SyncInsertStringStringInterconnectattachment.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Insert_StringStringInterconnectattachment_sync] +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringInterconnectattachment { + + public static void main(String[] args) throws Exception { + syncInsertStringStringInterconnectattachment(); + } + + public static void syncInsertStringStringInterconnectattachment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + InterconnectAttachment interconnectAttachmentResource = + InterconnectAttachment.newBuilder().build(); + Operation response = + interconnectAttachmentsClient + .insertAsync(project, region, interconnectAttachmentResource) + .get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Insert_StringStringInterconnectattachment_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/AsyncList.java new file mode 100644 index 000000000000..05084782cb28 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.ListInterconnectAttachmentsRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + interconnectAttachmentsClient.listPagedCallable().futureCall(request); + // Do something. + for (InterconnectAttachment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectAttachments_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/AsyncListPaged.java new file mode 100644 index 000000000000..42bc7b89fd7f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_List_Paged_async] +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentList; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.ListInterconnectAttachmentsRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InterconnectAttachmentList response = + interconnectAttachmentsClient.listCallable().call(request); + for (InterconnectAttachment element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InterconnectAttachments_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/SyncList.java new file mode 100644 index 000000000000..b79837b0e6a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/SyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_List_sync] +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.ListInterconnectAttachmentsRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (InterconnectAttachment element : + interconnectAttachmentsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectAttachments_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/SyncListStringString.java new file mode 100644 index 000000000000..51f571959428 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_List_StringString_sync] +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (InterconnectAttachment element : + interconnectAttachmentsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectAttachments_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/AsyncPatch.java new file mode 100644 index 000000000000..199ee84a8692 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/AsyncPatch.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.PatchInterconnectAttachmentRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + PatchInterconnectAttachmentRequest request = + PatchInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachment("interconnectAttachment1869250641") + .setInterconnectAttachmentResource(InterconnectAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + interconnectAttachmentsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..525476409440 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchInterconnectAttachmentRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + PatchInterconnectAttachmentRequest request = + PatchInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachment("interconnectAttachment1869250641") + .setInterconnectAttachmentResource(InterconnectAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + interconnectAttachmentsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/SyncPatch.java new file mode 100644 index 000000000000..35a6b10a5e29 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Patch_sync] +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchInterconnectAttachmentRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + PatchInterconnectAttachmentRequest request = + PatchInterconnectAttachmentRequest.newBuilder() + .setInterconnectAttachment("interconnectAttachment1869250641") + .setInterconnectAttachmentResource(InterconnectAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = interconnectAttachmentsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/SyncPatchStringStringStringInterconnectattachment.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/SyncPatchStringStringStringInterconnectattachment.java new file mode 100644 index 000000000000..fc67d87886ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/patch/SyncPatchStringStringStringInterconnectattachment.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_Patch_StringStringStringInterconnectattachment_sync] +import com.google.cloud.compute.v1.InterconnectAttachment; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringStringInterconnectattachment { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringInterconnectattachment(); + } + + public static void syncPatchStringStringStringInterconnectattachment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String interconnectAttachment = "interconnectAttachment1869250641"; + InterconnectAttachment interconnectAttachmentResource = + InterconnectAttachment.newBuilder().build(); + Operation response = + interconnectAttachmentsClient + .patchAsync(project, region, interconnectAttachment, interconnectAttachmentResource) + .get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_Patch_StringStringStringInterconnectattachment_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..9fefa3f94f3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/AsyncSetLabels.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + SetLabelsInterconnectAttachmentRequest request = + SetLabelsInterconnectAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + ApiFuture future = + interconnectAttachmentsClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..fa6e9200d9ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + SetLabelsInterconnectAttachmentRequest request = + SetLabelsInterconnectAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + OperationFuture future = + interconnectAttachmentsClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..4371c2e30106 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_SetLabels_sync] +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + SetLabelsInterconnectAttachmentRequest request = + SetLabelsInterconnectAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + Operation response = interconnectAttachmentsClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java new file mode 100644 index 000000000000..61ec1f9ae155 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachments/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachments_SetLabels_StringStringStringRegionsetlabelsrequest_sync] +import com.google.cloud.compute.v1.InterconnectAttachmentsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; + +public class SyncSetLabelsStringStringStringRegionsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringRegionsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringRegionsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectAttachmentsClient interconnectAttachmentsClient = + InterconnectAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetLabelsRequest regionSetLabelsRequestResource = + RegionSetLabelsRequest.newBuilder().build(); + Operation response = + interconnectAttachmentsClient + .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_InterconnectAttachments_SetLabels_StringStringStringRegionsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachmentssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachmentssettings/get/SyncGet.java new file mode 100644 index 000000000000..5e6c9935525e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectattachmentssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectAttachmentsSettings_Get_sync] +import com.google.cloud.compute.v1.InterconnectAttachmentsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectAttachmentsSettings.Builder interconnectAttachmentsSettingsBuilder = + InterconnectAttachmentsSettings.newBuilder(); + interconnectAttachmentsSettingsBuilder + .getSettings() + .setRetrySettings( + interconnectAttachmentsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InterconnectAttachmentsSettings interconnectAttachmentsSettings = + interconnectAttachmentsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InterconnectAttachmentsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b386538e7a83 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.InterconnectLocationsClient; +import com.google.cloud.compute.v1.InterconnectLocationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectLocationsSettings interconnectLocationsSettings = + InterconnectLocationsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create(interconnectLocationsSettings); + } +} +// [END compute_v1_generated_InterconnectLocations_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..bbc41b0b2d63 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.InterconnectLocationsClient; +import com.google.cloud.compute.v1.InterconnectLocationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectLocationsSettings interconnectLocationsSettings = + InterconnectLocationsSettings.newBuilder().setEndpoint(myEndpoint).build(); + InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create(interconnectLocationsSettings); + } +} +// [END compute_v1_generated_InterconnectLocations_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/AsyncGet.java new file mode 100644 index 000000000000..4da548a8d470 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetInterconnectLocationRequest; +import com.google.cloud.compute.v1.InterconnectLocation; +import com.google.cloud.compute.v1.InterconnectLocationsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create()) { + GetInterconnectLocationRequest request = + GetInterconnectLocationRequest.newBuilder() + .setInterconnectLocation("interconnectLocation220117603") + .setProject("project-309310695") + .build(); + ApiFuture future = + interconnectLocationsClient.getCallable().futureCall(request); + // Do something. + InterconnectLocation response = future.get(); + } + } +} +// [END compute_v1_generated_InterconnectLocations_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/SyncGet.java new file mode 100644 index 000000000000..40197f79b521 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_Get_sync] +import com.google.cloud.compute.v1.GetInterconnectLocationRequest; +import com.google.cloud.compute.v1.InterconnectLocation; +import com.google.cloud.compute.v1.InterconnectLocationsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create()) { + GetInterconnectLocationRequest request = + GetInterconnectLocationRequest.newBuilder() + .setInterconnectLocation("interconnectLocation220117603") + .setProject("project-309310695") + .build(); + InterconnectLocation response = interconnectLocationsClient.get(request); + } + } +} +// [END compute_v1_generated_InterconnectLocations_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/SyncGetStringString.java new file mode 100644 index 000000000000..9c07e6c48bf5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/get/SyncGetStringString.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_Get_StringString_sync] +import com.google.cloud.compute.v1.InterconnectLocation; +import com.google.cloud.compute.v1.InterconnectLocationsClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create()) { + String project = "project-309310695"; + String interconnectLocation = "interconnectLocation220117603"; + InterconnectLocation response = + interconnectLocationsClient.get(project, interconnectLocation); + } + } +} +// [END compute_v1_generated_InterconnectLocations_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/AsyncList.java new file mode 100644 index 000000000000..da889cad1221 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InterconnectLocation; +import com.google.cloud.compute.v1.InterconnectLocationsClient; +import com.google.cloud.compute.v1.ListInterconnectLocationsRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create()) { + ListInterconnectLocationsRequest request = + ListInterconnectLocationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + interconnectLocationsClient.listPagedCallable().futureCall(request); + // Do something. + for (InterconnectLocation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectLocations_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/AsyncListPaged.java new file mode 100644 index 000000000000..dd3561b61ca3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_List_Paged_async] +import com.google.cloud.compute.v1.InterconnectLocation; +import com.google.cloud.compute.v1.InterconnectLocationList; +import com.google.cloud.compute.v1.InterconnectLocationsClient; +import com.google.cloud.compute.v1.ListInterconnectLocationsRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create()) { + ListInterconnectLocationsRequest request = + ListInterconnectLocationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InterconnectLocationList response = + interconnectLocationsClient.listCallable().call(request); + for (InterconnectLocation element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_InterconnectLocations_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/SyncList.java new file mode 100644 index 000000000000..3b24b4ae02b4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_List_sync] +import com.google.cloud.compute.v1.InterconnectLocation; +import com.google.cloud.compute.v1.InterconnectLocationsClient; +import com.google.cloud.compute.v1.ListInterconnectLocationsRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create()) { + ListInterconnectLocationsRequest request = + ListInterconnectLocationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (InterconnectLocation element : interconnectLocationsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectLocations_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/SyncListString.java new file mode 100644 index 000000000000..2ac703c3713e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocations/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocations_List_String_sync] +import com.google.cloud.compute.v1.InterconnectLocation; +import com.google.cloud.compute.v1.InterconnectLocationsClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectLocationsClient interconnectLocationsClient = + InterconnectLocationsClient.create()) { + String project = "project-309310695"; + for (InterconnectLocation element : interconnectLocationsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_InterconnectLocations_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocationssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocationssettings/get/SyncGet.java new file mode 100644 index 000000000000..3cd13d11927e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectlocationssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectLocationsSettings_Get_sync] +import com.google.cloud.compute.v1.InterconnectLocationsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectLocationsSettings.Builder interconnectLocationsSettingsBuilder = + InterconnectLocationsSettings.newBuilder(); + interconnectLocationsSettingsBuilder + .getSettings() + .setRetrySettings( + interconnectLocationsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InterconnectLocationsSettings interconnectLocationsSettings = + interconnectLocationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InterconnectLocationsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..0f40d3bc2886 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.InterconnectsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectsSettings interconnectsSettings = + InterconnectsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InterconnectsClient interconnectsClient = InterconnectsClient.create(interconnectsSettings); + } +} +// [END compute_v1_generated_Interconnects_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..68e5949e36ca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.InterconnectsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectsSettings interconnectsSettings = + InterconnectsSettings.newBuilder().setEndpoint(myEndpoint).build(); + InterconnectsClient interconnectsClient = InterconnectsClient.create(interconnectsSettings); + } +} +// [END compute_v1_generated_Interconnects_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/AsyncDelete.java new file mode 100644 index 000000000000..2182625ffc39 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteInterconnectRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + DeleteInterconnectRequest request = + DeleteInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = interconnectsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..001a4d60a0cd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteInterconnectRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + DeleteInterconnectRequest request = + DeleteInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + interconnectsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/SyncDelete.java new file mode 100644 index 000000000000..ca94d71fa762 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Delete_sync] +import com.google.cloud.compute.v1.DeleteInterconnectRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + DeleteInterconnectRequest request = + DeleteInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = interconnectsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Interconnects_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..9ce4664eee4a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Delete_StringString_sync] +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + String project = "project-309310695"; + String interconnect = "interconnect-849140594"; + Operation response = interconnectsClient.deleteAsync(project, interconnect).get(); + } + } +} +// [END compute_v1_generated_Interconnects_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/AsyncGet.java new file mode 100644 index 000000000000..88b4385988e9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetInterconnectRequest; +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + GetInterconnectRequest request = + GetInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setProject("project-309310695") + .build(); + ApiFuture future = interconnectsClient.getCallable().futureCall(request); + // Do something. + Interconnect response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/SyncGet.java new file mode 100644 index 000000000000..53a3c23a08a0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Get_sync] +import com.google.cloud.compute.v1.GetInterconnectRequest; +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + GetInterconnectRequest request = + GetInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setProject("project-309310695") + .build(); + Interconnect response = interconnectsClient.get(request); + } + } +} +// [END compute_v1_generated_Interconnects_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/SyncGetStringString.java new file mode 100644 index 000000000000..b01e1032b0f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Get_StringString_sync] +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + String project = "project-309310695"; + String interconnect = "interconnect-849140594"; + Interconnect response = interconnectsClient.get(project, interconnect); + } + } +} +// [END compute_v1_generated_Interconnects_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/AsyncGetDiagnostics.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/AsyncGetDiagnostics.java new file mode 100644 index 000000000000..52dd5d73d6f2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/AsyncGetDiagnostics.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_GetDiagnostics_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.InterconnectsGetDiagnosticsResponse; + +public class AsyncGetDiagnostics { + + public static void main(String[] args) throws Exception { + asyncGetDiagnostics(); + } + + public static void asyncGetDiagnostics() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + GetDiagnosticsInterconnectRequest request = + GetDiagnosticsInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setProject("project-309310695") + .build(); + ApiFuture future = + interconnectsClient.getDiagnosticsCallable().futureCall(request); + // Do something. + InterconnectsGetDiagnosticsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_GetDiagnostics_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/SyncGetDiagnostics.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/SyncGetDiagnostics.java new file mode 100644 index 000000000000..f5df6f861791 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/SyncGetDiagnostics.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_GetDiagnostics_sync] +import com.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.InterconnectsGetDiagnosticsResponse; + +public class SyncGetDiagnostics { + + public static void main(String[] args) throws Exception { + syncGetDiagnostics(); + } + + public static void syncGetDiagnostics() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + GetDiagnosticsInterconnectRequest request = + GetDiagnosticsInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setProject("project-309310695") + .build(); + InterconnectsGetDiagnosticsResponse response = interconnectsClient.getDiagnostics(request); + } + } +} +// [END compute_v1_generated_Interconnects_GetDiagnostics_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/SyncGetDiagnosticsStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/SyncGetDiagnosticsStringString.java new file mode 100644 index 000000000000..8f474d58e94d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/getdiagnostics/SyncGetDiagnosticsStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_GetDiagnostics_StringString_sync] +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.InterconnectsGetDiagnosticsResponse; + +public class SyncGetDiagnosticsStringString { + + public static void main(String[] args) throws Exception { + syncGetDiagnosticsStringString(); + } + + public static void syncGetDiagnosticsStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + String project = "project-309310695"; + String interconnect = "interconnect-849140594"; + InterconnectsGetDiagnosticsResponse response = + interconnectsClient.getDiagnostics(project, interconnect); + } + } +} +// [END compute_v1_generated_Interconnects_GetDiagnostics_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/AsyncInsert.java new file mode 100644 index 000000000000..a7d63d1f7cb2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertInterconnectRequest; +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + InsertInterconnectRequest request = + InsertInterconnectRequest.newBuilder() + .setInterconnectResource(Interconnect.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = interconnectsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..816e7e6a63e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertInterconnectRequest; +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + InsertInterconnectRequest request = + InsertInterconnectRequest.newBuilder() + .setInterconnectResource(Interconnect.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + interconnectsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/SyncInsert.java new file mode 100644 index 000000000000..02d8d6f33c6b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Insert_sync] +import com.google.cloud.compute.v1.InsertInterconnectRequest; +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + InsertInterconnectRequest request = + InsertInterconnectRequest.newBuilder() + .setInterconnectResource(Interconnect.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = interconnectsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Interconnects_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/SyncInsertStringInterconnect.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/SyncInsertStringInterconnect.java new file mode 100644 index 000000000000..b932b95c0002 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/insert/SyncInsertStringInterconnect.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Insert_StringInterconnect_sync] +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringInterconnect { + + public static void main(String[] args) throws Exception { + syncInsertStringInterconnect(); + } + + public static void syncInsertStringInterconnect() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + String project = "project-309310695"; + Interconnect interconnectResource = Interconnect.newBuilder().build(); + Operation response = interconnectsClient.insertAsync(project, interconnectResource).get(); + } + } +} +// [END compute_v1_generated_Interconnects_Insert_StringInterconnect_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/AsyncList.java new file mode 100644 index 000000000000..eb37ca4ad246 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.ListInterconnectsRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = interconnectsClient.listPagedCallable().futureCall(request); + // Do something. + for (Interconnect element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Interconnects_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/AsyncListPaged.java new file mode 100644 index 000000000000..3d8b24ec6cc9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_List_Paged_async] +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectList; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.ListInterconnectsRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InterconnectList response = interconnectsClient.listCallable().call(request); + for (Interconnect element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Interconnects_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/SyncList.java new file mode 100644 index 000000000000..eaefc4703001 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_List_sync] +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.ListInterconnectsRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Interconnect element : interconnectsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Interconnects_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/SyncListString.java new file mode 100644 index 000000000000..7cd1eb2d2654 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_List_String_sync] +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + String project = "project-309310695"; + for (Interconnect element : interconnectsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Interconnects_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/AsyncPatch.java new file mode 100644 index 000000000000..3c1a9d99b79e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.PatchInterconnectRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + PatchInterconnectRequest request = + PatchInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setInterconnectResource(Interconnect.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = interconnectsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..4c3e34b403b7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchInterconnectRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + PatchInterconnectRequest request = + PatchInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setInterconnectResource(Interconnect.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + interconnectsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/SyncPatch.java new file mode 100644 index 000000000000..9f490c9f71e5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Patch_sync] +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchInterconnectRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + PatchInterconnectRequest request = + PatchInterconnectRequest.newBuilder() + .setInterconnect("interconnect-849140594") + .setInterconnectResource(Interconnect.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = interconnectsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_Interconnects_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/SyncPatchStringStringInterconnect.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/SyncPatchStringStringInterconnect.java new file mode 100644 index 000000000000..c0f91ede7dba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/patch/SyncPatchStringStringInterconnect.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_Patch_StringStringInterconnect_sync] +import com.google.cloud.compute.v1.Interconnect; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringInterconnect { + + public static void main(String[] args) throws Exception { + syncPatchStringStringInterconnect(); + } + + public static void syncPatchStringStringInterconnect() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + String project = "project-309310695"; + String interconnect = "interconnect-849140594"; + Interconnect interconnectResource = Interconnect.newBuilder().build(); + Operation response = + interconnectsClient.patchAsync(project, interconnect, interconnectResource).get(); + } + } +} +// [END compute_v1_generated_Interconnects_Patch_StringStringInterconnect_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..152aabb8ca54 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/AsyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.SetLabelsInterconnectRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + SetLabelsInterconnectRequest request = + SetLabelsInterconnectRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = interconnectsClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..d3c23d0d9e52 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/AsyncSetLabelsLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsInterconnectRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + SetLabelsInterconnectRequest request = + SetLabelsInterconnectRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + OperationFuture future = + interconnectsClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Interconnects_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..ca270d577ea8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/SyncSetLabels.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_SetLabels_sync] +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsInterconnectRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + SetLabelsInterconnectRequest request = + SetLabelsInterconnectRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Operation response = interconnectsClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_Interconnects_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java new file mode 100644 index 000000000000..c38b966496de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnects/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Interconnects_SetLabels_StringStringGlobalsetlabelsrequest_sync] +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.InterconnectsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetLabelsStringStringGlobalsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringGlobalsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringGlobalsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetLabelsRequest globalSetLabelsRequestResource = + GlobalSetLabelsRequest.newBuilder().build(); + Operation response = + interconnectsClient + .setLabelsAsync(project, resource, globalSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Interconnects_SetLabels_StringStringGlobalsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectssettings/get/SyncGet.java new file mode 100644 index 000000000000..5b80604fb20b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/interconnectssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_InterconnectsSettings_Get_sync] +import com.google.cloud.compute.v1.InterconnectsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectsSettings.Builder interconnectsSettingsBuilder = InterconnectsSettings.newBuilder(); + interconnectsSettingsBuilder + .getSettings() + .setRetrySettings( + interconnectsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InterconnectsSettings interconnectsSettings = interconnectsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InterconnectsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..724324760e62 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.LicenseCodesClient; +import com.google.cloud.compute.v1.LicenseCodesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicenseCodesSettings licenseCodesSettings = + LicenseCodesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + LicenseCodesClient licenseCodesClient = LicenseCodesClient.create(licenseCodesSettings); + } +} +// [END compute_v1_generated_LicenseCodes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..fedef3f8dab6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.LicenseCodesClient; +import com.google.cloud.compute.v1.LicenseCodesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicenseCodesSettings licenseCodesSettings = + LicenseCodesSettings.newBuilder().setEndpoint(myEndpoint).build(); + LicenseCodesClient licenseCodesClient = LicenseCodesClient.create(licenseCodesSettings); + } +} +// [END compute_v1_generated_LicenseCodes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/AsyncGet.java new file mode 100644 index 000000000000..d46fbc5215dc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetLicenseCodeRequest; +import com.google.cloud.compute.v1.LicenseCode; +import com.google.cloud.compute.v1.LicenseCodesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseCodesClient licenseCodesClient = LicenseCodesClient.create()) { + GetLicenseCodeRequest request = + GetLicenseCodeRequest.newBuilder() + .setLicenseCode("licenseCode-641557042") + .setProject("project-309310695") + .build(); + ApiFuture future = licenseCodesClient.getCallable().futureCall(request); + // Do something. + LicenseCode response = future.get(); + } + } +} +// [END compute_v1_generated_LicenseCodes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/SyncGet.java new file mode 100644 index 000000000000..645e2132ad1d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodes_Get_sync] +import com.google.cloud.compute.v1.GetLicenseCodeRequest; +import com.google.cloud.compute.v1.LicenseCode; +import com.google.cloud.compute.v1.LicenseCodesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseCodesClient licenseCodesClient = LicenseCodesClient.create()) { + GetLicenseCodeRequest request = + GetLicenseCodeRequest.newBuilder() + .setLicenseCode("licenseCode-641557042") + .setProject("project-309310695") + .build(); + LicenseCode response = licenseCodesClient.get(request); + } + } +} +// [END compute_v1_generated_LicenseCodes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/SyncGetStringString.java new file mode 100644 index 000000000000..524f0a167a5c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodes_Get_StringString_sync] +import com.google.cloud.compute.v1.LicenseCode; +import com.google.cloud.compute.v1.LicenseCodesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseCodesClient licenseCodesClient = LicenseCodesClient.create()) { + String project = "project-309310695"; + String licenseCode = "licenseCode-641557042"; + LicenseCode response = licenseCodesClient.get(project, licenseCode); + } + } +} +// [END compute_v1_generated_LicenseCodes_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..77764a4a34d2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/AsyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodes_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.LicenseCodesClient; +import com.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseCodesClient licenseCodesClient = LicenseCodesClient.create()) { + TestIamPermissionsLicenseCodeRequest request = + TestIamPermissionsLicenseCodeRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + licenseCodesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_LicenseCodes_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..58c92324d101 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodes_TestIamPermissions_sync] +import com.google.cloud.compute.v1.LicenseCodesClient; +import com.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseCodesClient licenseCodesClient = LicenseCodesClient.create()) { + TestIamPermissionsLicenseCodeRequest request = + TestIamPermissionsLicenseCodeRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = licenseCodesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_LicenseCodes_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..b4283d1f44a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodes/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodes_TestIamPermissions_StringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.LicenseCodesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseCodesClient licenseCodesClient = LicenseCodesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + licenseCodesClient.testIamPermissions(project, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_LicenseCodes_TestIamPermissions_StringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodessettings/get/SyncGet.java new file mode 100644 index 000000000000..2b9bd462e2ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensecodessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_LicenseCodesSettings_Get_sync] +import com.google.cloud.compute.v1.LicenseCodesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicenseCodesSettings.Builder licenseCodesSettingsBuilder = LicenseCodesSettings.newBuilder(); + licenseCodesSettingsBuilder + .getSettings() + .setRetrySettings( + licenseCodesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LicenseCodesSettings licenseCodesSettings = licenseCodesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_LicenseCodesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a9c9f5f4e03b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.LicensesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicensesSettings licensesSettings = + LicensesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + LicensesClient licensesClient = LicensesClient.create(licensesSettings); + } +} +// [END compute_v1_generated_Licenses_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..6df3cc812ef9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.LicensesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicensesSettings licensesSettings = + LicensesSettings.newBuilder().setEndpoint(myEndpoint).build(); + LicensesClient licensesClient = LicensesClient.create(licensesSettings); + } +} +// [END compute_v1_generated_Licenses_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/AsyncDelete.java new file mode 100644 index 000000000000..abf073702741 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteLicenseRequest; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + DeleteLicenseRequest request = + DeleteLicenseRequest.newBuilder() + .setLicense("license166757441") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = licensesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Licenses_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..1cb59db9e09e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteLicenseRequest; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + DeleteLicenseRequest request = + DeleteLicenseRequest.newBuilder() + .setLicense("license166757441") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + licensesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Licenses_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/SyncDelete.java new file mode 100644 index 000000000000..ebab1c6b5bad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Delete_sync] +import com.google.cloud.compute.v1.DeleteLicenseRequest; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + DeleteLicenseRequest request = + DeleteLicenseRequest.newBuilder() + .setLicense("license166757441") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = licensesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Licenses_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..79636572330c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Delete_StringString_sync] +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + String project = "project-309310695"; + String license = "license166757441"; + Operation response = licensesClient.deleteAsync(project, license).get(); + } + } +} +// [END compute_v1_generated_Licenses_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/AsyncGet.java new file mode 100644 index 000000000000..d759d8278c4d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetLicenseRequest; +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + GetLicenseRequest request = + GetLicenseRequest.newBuilder() + .setLicense("license166757441") + .setProject("project-309310695") + .build(); + ApiFuture future = licensesClient.getCallable().futureCall(request); + // Do something. + License response = future.get(); + } + } +} +// [END compute_v1_generated_Licenses_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/SyncGet.java new file mode 100644 index 000000000000..3b58d5bfd97d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Get_sync] +import com.google.cloud.compute.v1.GetLicenseRequest; +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + GetLicenseRequest request = + GetLicenseRequest.newBuilder() + .setLicense("license166757441") + .setProject("project-309310695") + .build(); + License response = licensesClient.get(request); + } + } +} +// [END compute_v1_generated_Licenses_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/SyncGetStringString.java new file mode 100644 index 000000000000..9dc28a1ebfa0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Get_StringString_sync] +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + String project = "project-309310695"; + String license = "license166757441"; + License response = licensesClient.get(project, license); + } + } +} +// [END compute_v1_generated_Licenses_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..974af1a0392b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyLicenseRequest; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + GetIamPolicyLicenseRequest request = + GetIamPolicyLicenseRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = licensesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Licenses_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..2a61aa1e106c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyLicenseRequest; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + GetIamPolicyLicenseRequest request = + GetIamPolicyLicenseRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = licensesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_Licenses_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/SyncGetIamPolicyStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/SyncGetIamPolicyStringString.java new file mode 100644 index 000000000000..827a5f9bf940 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/getiampolicy/SyncGetIamPolicyStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_GetIamPolicy_StringString_sync] +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringString(); + } + + public static void syncGetIamPolicyStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + Policy response = licensesClient.getIamPolicy(project, resource); + } + } +} +// [END compute_v1_generated_Licenses_GetIamPolicy_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/AsyncInsert.java new file mode 100644 index 000000000000..1149cda658a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertLicenseRequest; +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + InsertLicenseRequest request = + InsertLicenseRequest.newBuilder() + .setLicenseResource(License.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = licensesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Licenses_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..7cd9a492d01c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertLicenseRequest; +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + InsertLicenseRequest request = + InsertLicenseRequest.newBuilder() + .setLicenseResource(License.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + licensesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Licenses_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/SyncInsert.java new file mode 100644 index 000000000000..3fe27e8e86a5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Insert_sync] +import com.google.cloud.compute.v1.InsertLicenseRequest; +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + InsertLicenseRequest request = + InsertLicenseRequest.newBuilder() + .setLicenseResource(License.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = licensesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Licenses_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/SyncInsertStringLicense.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/SyncInsertStringLicense.java new file mode 100644 index 000000000000..946506ea9e26 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/insert/SyncInsertStringLicense.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_Insert_StringLicense_sync] +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringLicense { + + public static void main(String[] args) throws Exception { + syncInsertStringLicense(); + } + + public static void syncInsertStringLicense() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + String project = "project-309310695"; + License licenseResource = License.newBuilder().build(); + Operation response = licensesClient.insertAsync(project, licenseResource).get(); + } + } +} +// [END compute_v1_generated_Licenses_Insert_StringLicense_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/AsyncList.java new file mode 100644 index 000000000000..ef80fe14e873 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.ListLicensesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + ListLicensesRequest request = + ListLicensesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = licensesClient.listPagedCallable().futureCall(request); + // Do something. + for (License element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Licenses_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/AsyncListPaged.java new file mode 100644 index 000000000000..14dd87367ab4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_List_Paged_async] +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.LicensesListResponse; +import com.google.cloud.compute.v1.ListLicensesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + ListLicensesRequest request = + ListLicensesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + LicensesListResponse response = licensesClient.listCallable().call(request); + for (License element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Licenses_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/SyncList.java new file mode 100644 index 000000000000..d30b66740ecd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_List_sync] +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.ListLicensesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + ListLicensesRequest request = + ListLicensesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (License element : licensesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Licenses_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/SyncListString.java new file mode 100644 index 000000000000..bc4fbddb5b1b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_List_String_sync] +import com.google.cloud.compute.v1.License; +import com.google.cloud.compute.v1.LicensesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + String project = "project-309310695"; + for (License element : licensesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Licenses_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..413e6239f5bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyLicenseRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + SetIamPolicyLicenseRequest request = + SetIamPolicyLicenseRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = licensesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Licenses_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..d18075115bc6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_SetIamPolicy_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyLicenseRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + SetIamPolicyLicenseRequest request = + SetIamPolicyLicenseRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = licensesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_Licenses_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java new file mode 100644 index 000000000000..4a5061cbaba8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncSetIamPolicyStringStringGlobalsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringGlobalsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringGlobalsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetPolicyRequest globalSetPolicyRequestResource = + GlobalSetPolicyRequest.newBuilder().build(); + Policy response = + licensesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_Licenses_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..27be4398b6cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/AsyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.TestIamPermissionsLicenseRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + TestIamPermissionsLicenseRequest request = + TestIamPermissionsLicenseRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + licensesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Licenses_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..e07dc5989c82 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_TestIamPermissions_sync] +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.TestIamPermissionsLicenseRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + TestIamPermissionsLicenseRequest request = + TestIamPermissionsLicenseRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = licensesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_Licenses_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..653066f9d0de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licenses/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Licenses_TestIamPermissions_StringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.LicensesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicensesClient licensesClient = LicensesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + licensesClient.testIamPermissions(project, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_Licenses_TestIamPermissions_StringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensessettings/get/SyncGet.java new file mode 100644 index 000000000000..a7d84e603d57 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/licensessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_LicensesSettings_Get_sync] +import com.google.cloud.compute.v1.LicensesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicensesSettings.Builder licensesSettingsBuilder = LicensesSettings.newBuilder(); + licensesSettingsBuilder + .getSettings() + .setRetrySettings( + licensesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LicensesSettings licensesSettings = licensesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_LicensesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..1306c1998e05 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.MachineImagesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MachineImagesSettings machineImagesSettings = + MachineImagesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + MachineImagesClient machineImagesClient = MachineImagesClient.create(machineImagesSettings); + } +} +// [END compute_v1_generated_MachineImages_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..44ab1bb2d007 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.MachineImagesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MachineImagesSettings machineImagesSettings = + MachineImagesSettings.newBuilder().setEndpoint(myEndpoint).build(); + MachineImagesClient machineImagesClient = MachineImagesClient.create(machineImagesSettings); + } +} +// [END compute_v1_generated_MachineImages_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/AsyncDelete.java new file mode 100644 index 000000000000..b877a93b2c71 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteMachineImageRequest; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + DeleteMachineImageRequest request = + DeleteMachineImageRequest.newBuilder() + .setMachineImage("machineImage1817774420") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = machineImagesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_MachineImages_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..43e0d3226033 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteMachineImageRequest; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + DeleteMachineImageRequest request = + DeleteMachineImageRequest.newBuilder() + .setMachineImage("machineImage1817774420") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + machineImagesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_MachineImages_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/SyncDelete.java new file mode 100644 index 000000000000..fad407bc7fad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Delete_sync] +import com.google.cloud.compute.v1.DeleteMachineImageRequest; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + DeleteMachineImageRequest request = + DeleteMachineImageRequest.newBuilder() + .setMachineImage("machineImage1817774420") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = machineImagesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_MachineImages_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..6da363d42e45 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Delete_StringString_sync] +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + String project = "project-309310695"; + String machineImage = "machineImage1817774420"; + Operation response = machineImagesClient.deleteAsync(project, machineImage).get(); + } + } +} +// [END compute_v1_generated_MachineImages_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/AsyncGet.java new file mode 100644 index 000000000000..bf0141543558 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetMachineImageRequest; +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + GetMachineImageRequest request = + GetMachineImageRequest.newBuilder() + .setMachineImage("machineImage1817774420") + .setProject("project-309310695") + .build(); + ApiFuture future = machineImagesClient.getCallable().futureCall(request); + // Do something. + MachineImage response = future.get(); + } + } +} +// [END compute_v1_generated_MachineImages_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/SyncGet.java new file mode 100644 index 000000000000..38918de0e628 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Get_sync] +import com.google.cloud.compute.v1.GetMachineImageRequest; +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + GetMachineImageRequest request = + GetMachineImageRequest.newBuilder() + .setMachineImage("machineImage1817774420") + .setProject("project-309310695") + .build(); + MachineImage response = machineImagesClient.get(request); + } + } +} +// [END compute_v1_generated_MachineImages_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/SyncGetStringString.java new file mode 100644 index 000000000000..52ff519481e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Get_StringString_sync] +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + String project = "project-309310695"; + String machineImage = "machineImage1817774420"; + MachineImage response = machineImagesClient.get(project, machineImage); + } + } +} +// [END compute_v1_generated_MachineImages_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..419ed0c0d066 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyMachineImageRequest; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + GetIamPolicyMachineImageRequest request = + GetIamPolicyMachineImageRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = machineImagesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_MachineImages_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..8ef1d312e653 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyMachineImageRequest; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + GetIamPolicyMachineImageRequest request = + GetIamPolicyMachineImageRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = machineImagesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_MachineImages_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/SyncGetIamPolicyStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/SyncGetIamPolicyStringString.java new file mode 100644 index 000000000000..d9b7f58c0e1b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/getiampolicy/SyncGetIamPolicyStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_GetIamPolicy_StringString_sync] +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringString(); + } + + public static void syncGetIamPolicyStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + Policy response = machineImagesClient.getIamPolicy(project, resource); + } + } +} +// [END compute_v1_generated_MachineImages_GetIamPolicy_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/AsyncInsert.java new file mode 100644 index 000000000000..07c719a45308 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertMachineImageRequest; +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + InsertMachineImageRequest request = + InsertMachineImageRequest.newBuilder() + .setMachineImageResource(MachineImage.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceInstance("sourceInstance-808380976") + .build(); + ApiFuture future = machineImagesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_MachineImages_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..17946cc3423c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertMachineImageRequest; +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + InsertMachineImageRequest request = + InsertMachineImageRequest.newBuilder() + .setMachineImageResource(MachineImage.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceInstance("sourceInstance-808380976") + .build(); + OperationFuture future = + machineImagesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_MachineImages_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/SyncInsert.java new file mode 100644 index 000000000000..75ce6e316708 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Insert_sync] +import com.google.cloud.compute.v1.InsertMachineImageRequest; +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + InsertMachineImageRequest request = + InsertMachineImageRequest.newBuilder() + .setMachineImageResource(MachineImage.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceInstance("sourceInstance-808380976") + .build(); + Operation response = machineImagesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_MachineImages_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/SyncInsertStringMachineimage.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/SyncInsertStringMachineimage.java new file mode 100644 index 000000000000..be70cb7c08a0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/insert/SyncInsertStringMachineimage.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_Insert_StringMachineimage_sync] +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringMachineimage { + + public static void main(String[] args) throws Exception { + syncInsertStringMachineimage(); + } + + public static void syncInsertStringMachineimage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + String project = "project-309310695"; + MachineImage machineImageResource = MachineImage.newBuilder().build(); + Operation response = machineImagesClient.insertAsync(project, machineImageResource).get(); + } + } +} +// [END compute_v1_generated_MachineImages_Insert_StringMachineimage_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/AsyncList.java new file mode 100644 index 000000000000..9a87ecb3218b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListMachineImagesRequest; +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + ListMachineImagesRequest request = + ListMachineImagesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = machineImagesClient.listPagedCallable().futureCall(request); + // Do something. + for (MachineImage element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineImages_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/AsyncListPaged.java new file mode 100644 index 000000000000..fcbbba259454 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_List_Paged_async] +import com.google.cloud.compute.v1.ListMachineImagesRequest; +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImageList; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + ListMachineImagesRequest request = + ListMachineImagesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + MachineImageList response = machineImagesClient.listCallable().call(request); + for (MachineImage element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_MachineImages_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/SyncList.java new file mode 100644 index 000000000000..2aec03ac3640 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_List_sync] +import com.google.cloud.compute.v1.ListMachineImagesRequest; +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + ListMachineImagesRequest request = + ListMachineImagesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (MachineImage element : machineImagesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineImages_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/SyncListString.java new file mode 100644 index 000000000000..9b01bdfdfff4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_List_String_sync] +import com.google.cloud.compute.v1.MachineImage; +import com.google.cloud.compute.v1.MachineImagesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + String project = "project-309310695"; + for (MachineImage element : machineImagesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineImages_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..08b80616a591 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyMachineImageRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + SetIamPolicyMachineImageRequest request = + SetIamPolicyMachineImageRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = machineImagesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_MachineImages_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..f5525e8abda4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_SetIamPolicy_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyMachineImageRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + SetIamPolicyMachineImageRequest request = + SetIamPolicyMachineImageRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = machineImagesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_MachineImages_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java new file mode 100644 index 000000000000..0216439fe110 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncSetIamPolicyStringStringGlobalsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringGlobalsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringGlobalsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetPolicyRequest globalSetPolicyRequestResource = + GlobalSetPolicyRequest.newBuilder().build(); + Policy response = + machineImagesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_MachineImages_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..bd9cf9862c96 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/AsyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + TestIamPermissionsMachineImageRequest request = + TestIamPermissionsMachineImageRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + machineImagesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_MachineImages_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..a2c6b3510972 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_TestIamPermissions_sync] +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + TestIamPermissionsMachineImageRequest request = + TestIamPermissionsMachineImageRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = machineImagesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_MachineImages_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..cf18389629df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimages/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_MachineImages_TestIamPermissions_StringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.MachineImagesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineImagesClient machineImagesClient = MachineImagesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + machineImagesClient.testIamPermissions(project, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_MachineImages_TestIamPermissions_StringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimagessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimagessettings/get/SyncGet.java new file mode 100644 index 000000000000..1db86a3377cd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machineimagessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineImagesSettings_Get_sync] +import com.google.cloud.compute.v1.MachineImagesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MachineImagesSettings.Builder machineImagesSettingsBuilder = MachineImagesSettings.newBuilder(); + machineImagesSettingsBuilder + .getSettings() + .setRetrySettings( + machineImagesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + MachineImagesSettings machineImagesSettings = machineImagesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_MachineImagesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..e919e2e43790 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListMachineTypesRequest; +import com.google.cloud.compute.v1.MachineTypesClient; +import com.google.cloud.compute.v1.MachineTypesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + AggregatedListMachineTypesRequest request = + AggregatedListMachineTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + machineTypesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineTypes_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..194afd9b6b1e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListMachineTypesRequest; +import com.google.cloud.compute.v1.MachineTypeAggregatedList; +import com.google.cloud.compute.v1.MachineTypesClient; +import com.google.cloud.compute.v1.MachineTypesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + AggregatedListMachineTypesRequest request = + AggregatedListMachineTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + MachineTypeAggregatedList response = + machineTypesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_MachineTypes_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..3d2968e2cd10 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListMachineTypesRequest; +import com.google.cloud.compute.v1.MachineTypesClient; +import com.google.cloud.compute.v1.MachineTypesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + AggregatedListMachineTypesRequest request = + AggregatedListMachineTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + machineTypesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineTypes_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..e3c3b9276062 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_AggregatedList_String_sync] +import com.google.cloud.compute.v1.MachineTypesClient; +import com.google.cloud.compute.v1.MachineTypesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + machineTypesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineTypes_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..8722aaa28933 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.MachineTypesClient; +import com.google.cloud.compute.v1.MachineTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MachineTypesSettings machineTypesSettings = + MachineTypesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + MachineTypesClient machineTypesClient = MachineTypesClient.create(machineTypesSettings); + } +} +// [END compute_v1_generated_MachineTypes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..f7301a9444f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.MachineTypesClient; +import com.google.cloud.compute.v1.MachineTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MachineTypesSettings machineTypesSettings = + MachineTypesSettings.newBuilder().setEndpoint(myEndpoint).build(); + MachineTypesClient machineTypesClient = MachineTypesClient.create(machineTypesSettings); + } +} +// [END compute_v1_generated_MachineTypes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/AsyncGet.java new file mode 100644 index 000000000000..2c8eb8431922 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetMachineTypeRequest; +import com.google.cloud.compute.v1.MachineType; +import com.google.cloud.compute.v1.MachineTypesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + GetMachineTypeRequest request = + GetMachineTypeRequest.newBuilder() + .setMachineType("machineType-218117087") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = machineTypesClient.getCallable().futureCall(request); + // Do something. + MachineType response = future.get(); + } + } +} +// [END compute_v1_generated_MachineTypes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/SyncGet.java new file mode 100644 index 000000000000..e2be716addf3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_Get_sync] +import com.google.cloud.compute.v1.GetMachineTypeRequest; +import com.google.cloud.compute.v1.MachineType; +import com.google.cloud.compute.v1.MachineTypesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + GetMachineTypeRequest request = + GetMachineTypeRequest.newBuilder() + .setMachineType("machineType-218117087") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + MachineType response = machineTypesClient.get(request); + } + } +} +// [END compute_v1_generated_MachineTypes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..411c01edfc19 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_Get_StringStringString_sync] +import com.google.cloud.compute.v1.MachineType; +import com.google.cloud.compute.v1.MachineTypesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String machineType = "machineType-218117087"; + MachineType response = machineTypesClient.get(project, zone, machineType); + } + } +} +// [END compute_v1_generated_MachineTypes_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/AsyncList.java new file mode 100644 index 000000000000..94587116a3da --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListMachineTypesRequest; +import com.google.cloud.compute.v1.MachineType; +import com.google.cloud.compute.v1.MachineTypesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + ListMachineTypesRequest request = + ListMachineTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = machineTypesClient.listPagedCallable().futureCall(request); + // Do something. + for (MachineType element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineTypes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/AsyncListPaged.java new file mode 100644 index 000000000000..faa461244533 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_List_Paged_async] +import com.google.cloud.compute.v1.ListMachineTypesRequest; +import com.google.cloud.compute.v1.MachineType; +import com.google.cloud.compute.v1.MachineTypeList; +import com.google.cloud.compute.v1.MachineTypesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + ListMachineTypesRequest request = + ListMachineTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + MachineTypeList response = machineTypesClient.listCallable().call(request); + for (MachineType element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_MachineTypes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/SyncList.java new file mode 100644 index 000000000000..034eafe1b9b4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_List_sync] +import com.google.cloud.compute.v1.ListMachineTypesRequest; +import com.google.cloud.compute.v1.MachineType; +import com.google.cloud.compute.v1.MachineTypesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + ListMachineTypesRequest request = + ListMachineTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (MachineType element : machineTypesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineTypes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/SyncListStringString.java new file mode 100644 index 000000000000..587607c2d0be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypes/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypes_List_StringString_sync] +import com.google.cloud.compute.v1.MachineType; +import com.google.cloud.compute.v1.MachineTypesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (MachineTypesClient machineTypesClient = MachineTypesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (MachineType element : machineTypesClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_MachineTypes_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypessettings/get/SyncGet.java new file mode 100644 index 000000000000..bb9f30875572 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/machinetypessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_MachineTypesSettings_Get_sync] +import com.google.cloud.compute.v1.MachineTypesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MachineTypesSettings.Builder machineTypesSettingsBuilder = MachineTypesSettings.newBuilder(); + machineTypesSettingsBuilder + .getSettings() + .setRetrySettings( + machineTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + MachineTypesSettings machineTypesSettings = machineTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_MachineTypesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..6f483c807f2f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListNetworkAttachmentsRequest; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.NetworkAttachmentsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + AggregatedListNetworkAttachmentsRequest request = + AggregatedListNetworkAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + networkAttachmentsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkAttachments_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..23d2941cdcd5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListNetworkAttachmentsRequest; +import com.google.cloud.compute.v1.NetworkAttachmentAggregatedList; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.NetworkAttachmentsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + AggregatedListNetworkAttachmentsRequest request = + AggregatedListNetworkAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NetworkAttachmentAggregatedList response = + networkAttachmentsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NetworkAttachments_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..68d0191ef414 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListNetworkAttachmentsRequest; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.NetworkAttachmentsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + AggregatedListNetworkAttachmentsRequest request = + AggregatedListNetworkAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + networkAttachmentsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkAttachments_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..eea1cf9a21d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_AggregatedList_String_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.NetworkAttachmentsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + networkAttachmentsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkAttachments_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..2ba4fd419bc1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.NetworkAttachmentsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkAttachmentsSettings networkAttachmentsSettings = + NetworkAttachmentsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NetworkAttachmentsClient networkAttachmentsClient = + NetworkAttachmentsClient.create(networkAttachmentsSettings); + } +} +// [END compute_v1_generated_NetworkAttachments_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..969fcc297df1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.NetworkAttachmentsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkAttachmentsSettings networkAttachmentsSettings = + NetworkAttachmentsSettings.newBuilder().setEndpoint(myEndpoint).build(); + NetworkAttachmentsClient networkAttachmentsClient = + NetworkAttachmentsClient.create(networkAttachmentsSettings); + } +} +// [END compute_v1_generated_NetworkAttachments_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/AsyncDelete.java new file mode 100644 index 000000000000..5b8ee244f1f5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + DeleteNetworkAttachmentRequest request = + DeleteNetworkAttachmentRequest.newBuilder() + .setNetworkAttachment("networkAttachment1918512625") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networkAttachmentsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..ca65d229cc85 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + DeleteNetworkAttachmentRequest request = + DeleteNetworkAttachmentRequest.newBuilder() + .setNetworkAttachment("networkAttachment1918512625") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkAttachmentsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/SyncDelete.java new file mode 100644 index 000000000000..b37989a4cc85 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Delete_sync] +import com.google.cloud.compute.v1.DeleteNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + DeleteNetworkAttachmentRequest request = + DeleteNetworkAttachmentRequest.newBuilder() + .setNetworkAttachment("networkAttachment1918512625") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = networkAttachmentsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..85a479836255 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String networkAttachment = "networkAttachment1918512625"; + Operation response = + networkAttachmentsClient.deleteAsync(project, region, networkAttachment).get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/AsyncGet.java new file mode 100644 index 000000000000..92b32e5bf932 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + GetNetworkAttachmentRequest request = + GetNetworkAttachmentRequest.newBuilder() + .setNetworkAttachment("networkAttachment1918512625") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + networkAttachmentsClient.getCallable().futureCall(request); + // Do something. + NetworkAttachment response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/SyncGet.java new file mode 100644 index 000000000000..375c66d2053b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Get_sync] +import com.google.cloud.compute.v1.GetNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + GetNetworkAttachmentRequest request = + GetNetworkAttachmentRequest.newBuilder() + .setNetworkAttachment("networkAttachment1918512625") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + NetworkAttachment response = networkAttachmentsClient.get(request); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..3a7a5061c55d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Get_StringStringString_sync] +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String networkAttachment = "networkAttachment1918512625"; + NetworkAttachment response = networkAttachmentsClient.get(project, region, networkAttachment); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..9c2bbc2d6dcb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + GetIamPolicyNetworkAttachmentRequest request = + GetIamPolicyNetworkAttachmentRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + ApiFuture future = + networkAttachmentsClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..64205fd9c850 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + GetIamPolicyNetworkAttachmentRequest request = + GetIamPolicyNetworkAttachmentRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + Policy response = networkAttachmentsClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_NetworkAttachments_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..c4f690bddb45 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + Policy response = networkAttachmentsClient.getIamPolicy(project, region, resource); + } + } +} +// [END compute_v1_generated_NetworkAttachments_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/AsyncInsert.java new file mode 100644 index 000000000000..265556a671a8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + InsertNetworkAttachmentRequest request = + InsertNetworkAttachmentRequest.newBuilder() + .setNetworkAttachmentResource(NetworkAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networkAttachmentsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..1967e3c8422e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + InsertNetworkAttachmentRequest request = + InsertNetworkAttachmentRequest.newBuilder() + .setNetworkAttachmentResource(NetworkAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkAttachmentsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/SyncInsert.java new file mode 100644 index 000000000000..0a450b9c17a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Insert_sync] +import com.google.cloud.compute.v1.InsertNetworkAttachmentRequest; +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + InsertNetworkAttachmentRequest request = + InsertNetworkAttachmentRequest.newBuilder() + .setNetworkAttachmentResource(NetworkAttachment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = networkAttachmentsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/SyncInsertStringStringNetworkattachment.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/SyncInsertStringStringNetworkattachment.java new file mode 100644 index 000000000000..4f31b01e0e6d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/insert/SyncInsertStringStringNetworkattachment.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_Insert_StringStringNetworkattachment_sync] +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringNetworkattachment { + + public static void main(String[] args) throws Exception { + syncInsertStringStringNetworkattachment(); + } + + public static void syncInsertStringStringNetworkattachment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + NetworkAttachment networkAttachmentResource = NetworkAttachment.newBuilder().build(); + Operation response = + networkAttachmentsClient.insertAsync(project, region, networkAttachmentResource).get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_Insert_StringStringNetworkattachment_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/AsyncList.java new file mode 100644 index 000000000000..cbe633736412 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListNetworkAttachmentsRequest; +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + ListNetworkAttachmentsRequest request = + ListNetworkAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + networkAttachmentsClient.listPagedCallable().futureCall(request); + // Do something. + for (NetworkAttachment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkAttachments_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/AsyncListPaged.java new file mode 100644 index 000000000000..56ab8e329478 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_List_Paged_async] +import com.google.cloud.compute.v1.ListNetworkAttachmentsRequest; +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentList; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + ListNetworkAttachmentsRequest request = + ListNetworkAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NetworkAttachmentList response = networkAttachmentsClient.listCallable().call(request); + for (NetworkAttachment element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NetworkAttachments_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/SyncList.java new file mode 100644 index 000000000000..77c9c6c34542 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_List_sync] +import com.google.cloud.compute.v1.ListNetworkAttachmentsRequest; +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + ListNetworkAttachmentsRequest request = + ListNetworkAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (NetworkAttachment element : networkAttachmentsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkAttachments_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/SyncListStringString.java new file mode 100644 index 000000000000..eaef95752d07 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_List_StringString_sync] +import com.google.cloud.compute.v1.NetworkAttachment; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (NetworkAttachment element : + networkAttachmentsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkAttachments_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..fca33b54aa56 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyNetworkAttachmentRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + SetIamPolicyNetworkAttachmentRequest request = + SetIamPolicyNetworkAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = + networkAttachmentsClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..b7974e7a28aa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_SetIamPolicy_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyNetworkAttachmentRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + SetIamPolicyNetworkAttachmentRequest request = + SetIamPolicyNetworkAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = networkAttachmentsClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_NetworkAttachments_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java new file mode 100644 index 000000000000..e5a88057e414 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringRegionsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringRegionsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringRegionsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetPolicyRequest regionSetPolicyRequestResource = + RegionSetPolicyRequest.newBuilder().build(); + Policy response = + networkAttachmentsClient.setIamPolicy( + project, region, resource, regionSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_NetworkAttachments_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..ead970bd81a1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkAttachmentRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + TestIamPermissionsNetworkAttachmentRequest request = + TestIamPermissionsNetworkAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + networkAttachmentsClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkAttachments_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..71f2acb82513 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_TestIamPermissions_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkAttachmentRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + TestIamPermissionsNetworkAttachmentRequest request = + TestIamPermissionsNetworkAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = networkAttachmentsClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_NetworkAttachments_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..2723587d2345 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachments/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachments_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkAttachmentsClient networkAttachmentsClient = NetworkAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + networkAttachmentsClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_NetworkAttachments_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachmentssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachmentssettings/get/SyncGet.java new file mode 100644 index 000000000000..60f1e068de12 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkattachmentssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkAttachmentsSettings_Get_sync] +import com.google.cloud.compute.v1.NetworkAttachmentsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkAttachmentsSettings.Builder networkAttachmentsSettingsBuilder = + NetworkAttachmentsSettings.newBuilder(); + networkAttachmentsSettingsBuilder + .getSettings() + .setRetrySettings( + networkAttachmentsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworkAttachmentsSettings networkAttachmentsSettings = + networkAttachmentsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworkAttachmentsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..5515733327e6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/AsyncAggregatedList.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListNetworkEdgeSecurityServicesRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + AggregatedListNetworkEdgeSecurityServicesRequest request = + AggregatedListNetworkEdgeSecurityServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + networkEdgeSecurityServicesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : + future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..78d61f5ec355 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,68 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListNetworkEdgeSecurityServicesRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServiceAggregatedList; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + AggregatedListNetworkEdgeSecurityServicesRequest request = + AggregatedListNetworkEdgeSecurityServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NetworkEdgeSecurityServiceAggregatedList response = + networkEdgeSecurityServicesClient.aggregatedListCallable().call(request); + for (Map.Entry element : + response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..f83a8bd3277f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListNetworkEdgeSecurityServicesRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + AggregatedListNetworkEdgeSecurityServicesRequest request = + AggregatedListNetworkEdgeSecurityServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + networkEdgeSecurityServicesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..3e4450edd334 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_AggregatedList_String_sync] +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + networkEdgeSecurityServicesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..6984058910f3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkEdgeSecurityServicesSettings networkEdgeSecurityServicesSettings = + NetworkEdgeSecurityServicesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create(networkEdgeSecurityServicesSettings); + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..ce92520f77d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkEdgeSecurityServicesSettings networkEdgeSecurityServicesSettings = + NetworkEdgeSecurityServicesSettings.newBuilder().setEndpoint(myEndpoint).build(); + NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create(networkEdgeSecurityServicesSettings); + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/AsyncDelete.java new file mode 100644 index 000000000000..bc160cbf5549 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + DeleteNetworkEdgeSecurityServiceRequest request = + DeleteNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityService("networkEdgeSecurityService-1390253366") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkEdgeSecurityServicesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..0a0a65f68d44 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + DeleteNetworkEdgeSecurityServiceRequest request = + DeleteNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityService("networkEdgeSecurityService-1390253366") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkEdgeSecurityServicesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/SyncDelete.java new file mode 100644 index 000000000000..b3735f914ecb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Delete_sync] +import com.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + DeleteNetworkEdgeSecurityServiceRequest request = + DeleteNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityService("networkEdgeSecurityService-1390253366") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = networkEdgeSecurityServicesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..802b0201a29f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String networkEdgeSecurityService = "networkEdgeSecurityService-1390253366"; + Operation response = + networkEdgeSecurityServicesClient + .deleteAsync(project, region, networkEdgeSecurityService) + .get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/AsyncGet.java new file mode 100644 index 000000000000..db762de3f689 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetNetworkEdgeSecurityServiceRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + GetNetworkEdgeSecurityServiceRequest request = + GetNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityService("networkEdgeSecurityService-1390253366") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + networkEdgeSecurityServicesClient.getCallable().futureCall(request); + // Do something. + NetworkEdgeSecurityService response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/SyncGet.java new file mode 100644 index 000000000000..f37f0d87b46a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Get_sync] +import com.google.cloud.compute.v1.GetNetworkEdgeSecurityServiceRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + GetNetworkEdgeSecurityServiceRequest request = + GetNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityService("networkEdgeSecurityService-1390253366") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + NetworkEdgeSecurityService response = networkEdgeSecurityServicesClient.get(request); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..d4a41f60f4b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Get_StringStringString_sync] +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String networkEdgeSecurityService = "networkEdgeSecurityService-1390253366"; + NetworkEdgeSecurityService response = + networkEdgeSecurityServicesClient.get(project, region, networkEdgeSecurityService); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/AsyncInsert.java new file mode 100644 index 000000000000..5961785a869d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/AsyncInsert.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + InsertNetworkEdgeSecurityServiceRequest request = + InsertNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityServiceResource( + NetworkEdgeSecurityService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + ApiFuture future = + networkEdgeSecurityServicesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..c9fa0843e659 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/AsyncInsertLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + InsertNetworkEdgeSecurityServiceRequest request = + InsertNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityServiceResource( + NetworkEdgeSecurityService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + OperationFuture future = + networkEdgeSecurityServicesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/SyncInsert.java new file mode 100644 index 000000000000..a8ac121ab9df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Insert_sync] +import com.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest; +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + InsertNetworkEdgeSecurityServiceRequest request = + InsertNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityServiceResource( + NetworkEdgeSecurityService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + Operation response = networkEdgeSecurityServicesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/SyncInsertStringStringNetworkedgesecurityservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/SyncInsertStringStringNetworkedgesecurityservice.java new file mode 100644 index 000000000000..9a71c2106ac4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/insert/SyncInsertStringStringNetworkedgesecurityservice.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Insert_StringStringNetworkedgesecurityservice_sync] +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringNetworkedgesecurityservice { + + public static void main(String[] args) throws Exception { + syncInsertStringStringNetworkedgesecurityservice(); + } + + public static void syncInsertStringStringNetworkedgesecurityservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + NetworkEdgeSecurityService networkEdgeSecurityServiceResource = + NetworkEdgeSecurityService.newBuilder().build(); + Operation response = + networkEdgeSecurityServicesClient + .insertAsync(project, region, networkEdgeSecurityServiceResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Insert_StringStringNetworkedgesecurityservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/AsyncPatch.java new file mode 100644 index 000000000000..29ad48579702 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/AsyncPatch.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + PatchNetworkEdgeSecurityServiceRequest request = + PatchNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityService("networkEdgeSecurityService-1390253366") + .setNetworkEdgeSecurityServiceResource( + NetworkEdgeSecurityService.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + ApiFuture future = + networkEdgeSecurityServicesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..b39ef094dda1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/AsyncPatchLRO.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + PatchNetworkEdgeSecurityServiceRequest request = + PatchNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityService("networkEdgeSecurityService-1390253366") + .setNetworkEdgeSecurityServiceResource( + NetworkEdgeSecurityService.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + OperationFuture future = + networkEdgeSecurityServicesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/SyncPatch.java new file mode 100644 index 000000000000..10b3d34e7eac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/SyncPatch.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Patch_sync] +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + PatchNetworkEdgeSecurityServiceRequest request = + PatchNetworkEdgeSecurityServiceRequest.newBuilder() + .setNetworkEdgeSecurityService("networkEdgeSecurityService-1390253366") + .setNetworkEdgeSecurityServiceResource( + NetworkEdgeSecurityService.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + Operation response = networkEdgeSecurityServicesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/SyncPatchStringStringStringNetworkedgesecurityservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/SyncPatchStringStringStringNetworkedgesecurityservice.java new file mode 100644 index 000000000000..d04001a4d85c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservices/patch/SyncPatchStringStringStringNetworkedgesecurityservice.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServices_Patch_StringStringStringNetworkedgesecurityservice_sync] +import com.google.cloud.compute.v1.NetworkEdgeSecurityService; +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringStringNetworkedgesecurityservice { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringNetworkedgesecurityservice(); + } + + public static void syncPatchStringStringStringNetworkedgesecurityservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEdgeSecurityServicesClient networkEdgeSecurityServicesClient = + NetworkEdgeSecurityServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String networkEdgeSecurityService = "networkEdgeSecurityService-1390253366"; + NetworkEdgeSecurityService networkEdgeSecurityServiceResource = + NetworkEdgeSecurityService.newBuilder().build(); + Operation response = + networkEdgeSecurityServicesClient + .patchAsync( + project, region, networkEdgeSecurityService, networkEdgeSecurityServiceResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServices_Patch_StringStringStringNetworkedgesecurityservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservicessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservicessettings/get/SyncGet.java new file mode 100644 index 000000000000..38900b38f199 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkedgesecurityservicessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServicesSettings_Get_sync] +import com.google.cloud.compute.v1.NetworkEdgeSecurityServicesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkEdgeSecurityServicesSettings.Builder networkEdgeSecurityServicesSettingsBuilder = + NetworkEdgeSecurityServicesSettings.newBuilder(); + networkEdgeSecurityServicesSettingsBuilder + .getSettings() + .setRetrySettings( + networkEdgeSecurityServicesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworkEdgeSecurityServicesSettings networkEdgeSecurityServicesSettings = + networkEdgeSecurityServicesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServicesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..0462b37cd9ca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + AggregatedListNetworkEndpointGroupsRequest request = + AggregatedListNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + networkEndpointGroupsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..bb23a724ba8c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupAggregatedList; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + AggregatedListNetworkEndpointGroupsRequest request = + AggregatedListNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NetworkEndpointGroupAggregatedList response = + networkEndpointGroupsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..b8d64fcd0978 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + AggregatedListNetworkEndpointGroupsRequest request = + AggregatedListNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + networkEndpointGroupsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..f25b25fcf989 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_AggregatedList_String_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + networkEndpointGroupsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpoints.java new file mode 100644 index 000000000000..4d924edcf5c4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpoints.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_AttachNetworkEndpoints_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncAttachNetworkEndpoints { + + public static void main(String[] args) throws Exception { + asyncAttachNetworkEndpoints(); + } + + public static void asyncAttachNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + AttachNetworkEndpointsNetworkEndpointGroupRequest request = + AttachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsAttachEndpointsRequestResource( + NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + networkEndpointGroupsClient.attachNetworkEndpointsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_AttachNetworkEndpoints_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpointsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpointsLRO.java new file mode 100644 index 000000000000..c18136873cb1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/AsyncAttachNetworkEndpointsLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_AttachNetworkEndpoints_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAttachNetworkEndpointsLRO { + + public static void main(String[] args) throws Exception { + asyncAttachNetworkEndpointsLRO(); + } + + public static void asyncAttachNetworkEndpointsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + AttachNetworkEndpointsNetworkEndpointGroupRequest request = + AttachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsAttachEndpointsRequestResource( + NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + networkEndpointGroupsClient.attachNetworkEndpointsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_AttachNetworkEndpoints_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpoints.java new file mode 100644 index 000000000000..58aabfd6be87 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpoints.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_AttachNetworkEndpoints_sync] +import com.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAttachNetworkEndpoints { + + public static void main(String[] args) throws Exception { + syncAttachNetworkEndpoints(); + } + + public static void syncAttachNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + AttachNetworkEndpointsNetworkEndpointGroupRequest request = + AttachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsAttachEndpointsRequestResource( + NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = networkEndpointGroupsClient.attachNetworkEndpointsAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_AttachNetworkEndpoints_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpointsStringStringStringNetworkendpointgroupsattachendpointsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpointsStringStringStringNetworkendpointgroupsattachendpointsrequest.java new file mode 100644 index 000000000000..1d7759056f7b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/attachnetworkendpoints/SyncAttachNetworkEndpointsStringStringStringNetworkendpointgroupsattachendpointsrequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_AttachNetworkEndpoints_StringStringStringNetworkendpointgroupsattachendpointsrequest_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public +class SyncAttachNetworkEndpointsStringStringStringNetworkendpointgroupsattachendpointsrequest { + + public static void main(String[] args) throws Exception { + syncAttachNetworkEndpointsStringStringStringNetworkendpointgroupsattachendpointsrequest(); + } + + public static void + syncAttachNetworkEndpointsStringStringStringNetworkendpointgroupsattachendpointsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource = + NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build(); + Operation response = + networkEndpointGroupsClient + .attachNetworkEndpointsAsync( + project, + zone, + networkEndpointGroup, + networkEndpointGroupsAttachEndpointsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_AttachNetworkEndpoints_StringStringStringNetworkendpointgroupsattachendpointsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..e6993e6a6a12 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkEndpointGroupsSettings networkEndpointGroupsSettings = + NetworkEndpointGroupsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create(networkEndpointGroupsSettings); + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..b9a4331ee4c6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkEndpointGroupsSettings networkEndpointGroupsSettings = + NetworkEndpointGroupsSettings.newBuilder().setEndpoint(myEndpoint).build(); + NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create(networkEndpointGroupsSettings); + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/AsyncDelete.java new file mode 100644 index 000000000000..c09c5f4ba408 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + DeleteNetworkEndpointGroupRequest request = + DeleteNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + networkEndpointGroupsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..261e05eabc32 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + DeleteNetworkEndpointGroupRequest request = + DeleteNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + networkEndpointGroupsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/SyncDelete.java new file mode 100644 index 000000000000..4753c2ddc9df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Delete_sync] +import com.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + DeleteNetworkEndpointGroupRequest request = + DeleteNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = networkEndpointGroupsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..a2e4ebad0898 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + Operation response = + networkEndpointGroupsClient.deleteAsync(project, zone, networkEndpointGroup).get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpoints.java new file mode 100644 index 000000000000..a2020ecb6b2c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpoints.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_DetachNetworkEndpoints_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest; +import com.google.longrunning.Operation; + +public class AsyncDetachNetworkEndpoints { + + public static void main(String[] args) throws Exception { + asyncDetachNetworkEndpoints(); + } + + public static void asyncDetachNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + DetachNetworkEndpointsNetworkEndpointGroupRequest request = + DetachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsDetachEndpointsRequestResource( + NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + networkEndpointGroupsClient.detachNetworkEndpointsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_DetachNetworkEndpoints_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpointsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpointsLRO.java new file mode 100644 index 000000000000..eb151f7709d2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/AsyncDetachNetworkEndpointsLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_DetachNetworkEndpoints_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDetachNetworkEndpointsLRO { + + public static void main(String[] args) throws Exception { + asyncDetachNetworkEndpointsLRO(); + } + + public static void asyncDetachNetworkEndpointsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + DetachNetworkEndpointsNetworkEndpointGroupRequest request = + DetachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsDetachEndpointsRequestResource( + NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + networkEndpointGroupsClient.detachNetworkEndpointsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_DetachNetworkEndpoints_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpoints.java new file mode 100644 index 000000000000..462488719840 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpoints.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_DetachNetworkEndpoints_sync] +import com.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDetachNetworkEndpoints { + + public static void main(String[] args) throws Exception { + syncDetachNetworkEndpoints(); + } + + public static void syncDetachNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + DetachNetworkEndpointsNetworkEndpointGroupRequest request = + DetachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsDetachEndpointsRequestResource( + NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = networkEndpointGroupsClient.detachNetworkEndpointsAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_DetachNetworkEndpoints_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpointsStringStringStringNetworkendpointgroupsdetachendpointsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpointsStringStringStringNetworkendpointgroupsdetachendpointsrequest.java new file mode 100644 index 000000000000..353b3638acfd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/detachnetworkendpoints/SyncDetachNetworkEndpointsStringStringStringNetworkendpointgroupsdetachendpointsrequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_DetachNetworkEndpoints_StringStringStringNetworkendpointgroupsdetachendpointsrequest_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest; +import com.google.cloud.compute.v1.Operation; + +public +class SyncDetachNetworkEndpointsStringStringStringNetworkendpointgroupsdetachendpointsrequest { + + public static void main(String[] args) throws Exception { + syncDetachNetworkEndpointsStringStringStringNetworkendpointgroupsdetachendpointsrequest(); + } + + public static void + syncDetachNetworkEndpointsStringStringStringNetworkendpointgroupsdetachendpointsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource = + NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build(); + Operation response = + networkEndpointGroupsClient + .detachNetworkEndpointsAsync( + project, + zone, + networkEndpointGroup, + networkEndpointGroupsDetachEndpointsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_DetachNetworkEndpoints_StringStringStringNetworkendpointgroupsdetachendpointsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/AsyncGet.java new file mode 100644 index 000000000000..d37905ff7a59 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + GetNetworkEndpointGroupRequest request = + GetNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + networkEndpointGroupsClient.getCallable().futureCall(request); + // Do something. + NetworkEndpointGroup response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/SyncGet.java new file mode 100644 index 000000000000..ceebefe3fb2b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Get_sync] +import com.google.cloud.compute.v1.GetNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + GetNetworkEndpointGroupRequest request = + GetNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + NetworkEndpointGroup response = networkEndpointGroupsClient.get(request); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..03957e37cbca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Get_StringStringString_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + NetworkEndpointGroup response = + networkEndpointGroupsClient.get(project, zone, networkEndpointGroup); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/AsyncInsert.java new file mode 100644 index 000000000000..d8395835087c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + InsertNetworkEndpointGroupRequest request = + InsertNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + networkEndpointGroupsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..87ecb5384c9c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + InsertNetworkEndpointGroupRequest request = + InsertNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + networkEndpointGroupsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/SyncInsert.java new file mode 100644 index 000000000000..aeb23f6dcf5e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Insert_sync] +import com.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + InsertNetworkEndpointGroupRequest request = + InsertNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = networkEndpointGroupsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/SyncInsertStringStringNetworkendpointgroup.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/SyncInsertStringStringNetworkendpointgroup.java new file mode 100644 index 000000000000..8616debea60a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/insert/SyncInsertStringStringNetworkendpointgroup.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_Insert_StringStringNetworkendpointgroup_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringNetworkendpointgroup { + + public static void main(String[] args) throws Exception { + syncInsertStringStringNetworkendpointgroup(); + } + + public static void syncInsertStringStringNetworkendpointgroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build(); + Operation response = + networkEndpointGroupsClient + .insertAsync(project, zone, networkEndpointGroupResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_Insert_StringStringNetworkendpointgroup_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/AsyncList.java new file mode 100644 index 000000000000..e3939b00fb39 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + ListNetworkEndpointGroupsRequest request = + ListNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + networkEndpointGroupsClient.listPagedCallable().futureCall(request); + // Do something. + for (NetworkEndpointGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/AsyncListPaged.java new file mode 100644 index 000000000000..ae51fbde89ab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_List_Paged_async] +import com.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + ListNetworkEndpointGroupsRequest request = + ListNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + NetworkEndpointGroupList response = + networkEndpointGroupsClient.listCallable().call(request); + for (NetworkEndpointGroup element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/SyncList.java new file mode 100644 index 000000000000..bd16128c059a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_List_sync] +import com.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + ListNetworkEndpointGroupsRequest request = + ListNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (NetworkEndpointGroup element : networkEndpointGroupsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/SyncListStringString.java new file mode 100644 index 000000000000..668e06fb754b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_List_StringString_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (NetworkEndpointGroup element : + networkEndpointGroupsClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpoints.java new file mode 100644 index 000000000000..4f199e058466 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpoints.java @@ -0,0 +1,62 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_ListNetworkEndpoints_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequest; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; + +public class AsyncListNetworkEndpoints { + + public static void main(String[] args) throws Exception { + asyncListNetworkEndpoints(); + } + + public static void asyncListNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + ListNetworkEndpointsNetworkEndpointGroupsRequest request = + ListNetworkEndpointsNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsListEndpointsRequestResource( + NetworkEndpointGroupsListEndpointsRequest.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + networkEndpointGroupsClient.listNetworkEndpointsPagedCallable().futureCall(request); + // Do something. + for (NetworkEndpointWithHealthStatus element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_ListNetworkEndpoints_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpointsPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpointsPaged.java new file mode 100644 index 000000000000..34b3358f2cdc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/AsyncListNetworkEndpointsPaged.java @@ -0,0 +1,70 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_ListNetworkEndpoints_Paged_async] +import com.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; +import com.google.common.base.Strings; + +public class AsyncListNetworkEndpointsPaged { + + public static void main(String[] args) throws Exception { + asyncListNetworkEndpointsPaged(); + } + + public static void asyncListNetworkEndpointsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + ListNetworkEndpointsNetworkEndpointGroupsRequest request = + ListNetworkEndpointsNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsListEndpointsRequestResource( + NetworkEndpointGroupsListEndpointsRequest.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + NetworkEndpointGroupsListNetworkEndpoints response = + networkEndpointGroupsClient.listNetworkEndpointsCallable().call(request); + for (NetworkEndpointWithHealthStatus element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_ListNetworkEndpoints_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/SyncListNetworkEndpoints.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/SyncListNetworkEndpoints.java new file mode 100644 index 000000000000..ca31b13c861a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/SyncListNetworkEndpoints.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_ListNetworkEndpoints_sync] +import com.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequest; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; + +public class SyncListNetworkEndpoints { + + public static void main(String[] args) throws Exception { + syncListNetworkEndpoints(); + } + + public static void syncListNetworkEndpoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + ListNetworkEndpointsNetworkEndpointGroupsRequest request = + ListNetworkEndpointsNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setNetworkEndpointGroupsListEndpointsRequestResource( + NetworkEndpointGroupsListEndpointsRequest.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (NetworkEndpointWithHealthStatus element : + networkEndpointGroupsClient.listNetworkEndpoints(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_ListNetworkEndpoints_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/SyncListNetworkEndpointsStringStringStringNetworkendpointgroupslistendpointsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/SyncListNetworkEndpointsStringStringStringNetworkendpointgroupslistendpointsrequest.java new file mode 100644 index 000000000000..85107c5d4a2a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/listnetworkendpoints/SyncListNetworkEndpointsStringStringStringNetworkendpointgroupslistendpointsrequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_ListNetworkEndpoints_StringStringStringNetworkendpointgroupslistendpointsrequest_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequest; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; + +public class SyncListNetworkEndpointsStringStringStringNetworkendpointgroupslistendpointsrequest { + + public static void main(String[] args) throws Exception { + syncListNetworkEndpointsStringStringStringNetworkendpointgroupslistendpointsrequest(); + } + + public static void + syncListNetworkEndpointsStringStringStringNetworkendpointgroupslistendpointsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource = + NetworkEndpointGroupsListEndpointsRequest.newBuilder().build(); + for (NetworkEndpointWithHealthStatus element : + networkEndpointGroupsClient + .listNetworkEndpoints( + project, + zone, + networkEndpointGroup, + networkEndpointGroupsListEndpointsRequestResource) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_ListNetworkEndpoints_StringStringStringNetworkendpointgroupslistendpointsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..c4c784c7bf72 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + TestIamPermissionsNetworkEndpointGroupRequest request = + TestIamPermissionsNetworkEndpointGroupRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = + networkEndpointGroupsClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..f0535221ef94 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_TestIamPermissions_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + TestIamPermissionsNetworkEndpointGroupRequest request = + TestIamPermissionsNetworkEndpointGroupRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + TestPermissionsResponse response = networkEndpointGroupsClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..418c6a3e45b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroups_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkEndpointGroupsClient networkEndpointGroupsClient = + NetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + networkEndpointGroupsClient.testIamPermissions( + project, zone, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_NetworkEndpointGroups_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroupssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroupssettings/get/SyncGet.java new file mode 100644 index 000000000000..e242c74eac1d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkendpointgroupssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkEndpointGroupsSettings_Get_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroupsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkEndpointGroupsSettings.Builder networkEndpointGroupsSettingsBuilder = + NetworkEndpointGroupsSettings.newBuilder(); + networkEndpointGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + networkEndpointGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworkEndpointGroupsSettings networkEndpointGroupsSettings = + networkEndpointGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworkEndpointGroupsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/AsyncAddAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/AsyncAddAssociation.java new file mode 100644 index 000000000000..eb17932ecb57 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/AsyncAddAssociation.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_AddAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncAddAssociation { + + public static void main(String[] args) throws Exception { + asyncAddAssociation(); + } + + public static void asyncAddAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + AddAssociationNetworkFirewallPolicyRequest request = + AddAssociationNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setProject("project-309310695") + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.addAssociationCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_AddAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/AsyncAddAssociationLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/AsyncAddAssociationLRO.java new file mode 100644 index 000000000000..afc4be91dd20 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/AsyncAddAssociationLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_AddAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncAddAssociationLRO(); + } + + public static void asyncAddAssociationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + AddAssociationNetworkFirewallPolicyRequest request = + AddAssociationNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setProject("project-309310695") + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.addAssociationOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_AddAssociation_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/SyncAddAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/SyncAddAssociation.java new file mode 100644 index 000000000000..47290a3fc867 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/SyncAddAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_AddAssociation_sync] +import com.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddAssociation { + + public static void main(String[] args) throws Exception { + syncAddAssociation(); + } + + public static void syncAddAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + AddAssociationNetworkFirewallPolicyRequest request = + AddAssociationNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setProject("project-309310695") + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + Operation response = networkFirewallPoliciesClient.addAssociationAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_AddAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/SyncAddAssociationStringStringFirewallpolicyassociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/SyncAddAssociationStringStringFirewallpolicyassociation.java new file mode 100644 index 000000000000..8fbbfa761ebe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addassociation/SyncAddAssociationStringStringFirewallpolicyassociation.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_AddAssociation_StringStringFirewallpolicyassociation_sync] +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddAssociationStringStringFirewallpolicyassociation { + + public static void main(String[] args) throws Exception { + syncAddAssociationStringStringFirewallpolicyassociation(); + } + + public static void syncAddAssociationStringStringFirewallpolicyassociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyAssociation firewallPolicyAssociationResource = + FirewallPolicyAssociation.newBuilder().build(); + Operation response = + networkFirewallPoliciesClient + .addAssociationAsync(project, firewallPolicy, firewallPolicyAssociationResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_AddAssociation_StringStringFirewallpolicyassociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/AsyncAddRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/AsyncAddRule.java new file mode 100644 index 000000000000..60f717e20703 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/AsyncAddRule.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_AddRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncAddRule { + + public static void main(String[] args) throws Exception { + asyncAddRule(); + } + + public static void asyncAddRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + AddRuleNetworkFirewallPolicyRequest request = + AddRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setMaxPriority(-207235553) + .setMinPriority(267190513) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.addRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_AddRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/AsyncAddRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/AsyncAddRuleLRO.java new file mode 100644 index 000000000000..b9e071326226 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/AsyncAddRuleLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_AddRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddRuleLRO { + + public static void main(String[] args) throws Exception { + asyncAddRuleLRO(); + } + + public static void asyncAddRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + AddRuleNetworkFirewallPolicyRequest request = + AddRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setMaxPriority(-207235553) + .setMinPriority(267190513) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.addRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_AddRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/SyncAddRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/SyncAddRule.java new file mode 100644 index 000000000000..0082e48bc1af --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/SyncAddRule.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_AddRule_sync] +import com.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddRule { + + public static void main(String[] args) throws Exception { + syncAddRule(); + } + + public static void syncAddRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + AddRuleNetworkFirewallPolicyRequest request = + AddRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setMaxPriority(-207235553) + .setMinPriority(267190513) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networkFirewallPoliciesClient.addRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_AddRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/SyncAddRuleStringStringFirewallpolicyrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/SyncAddRuleStringStringFirewallpolicyrule.java new file mode 100644 index 000000000000..4566b56ff869 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/addrule/SyncAddRuleStringStringFirewallpolicyrule.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_AddRule_StringStringFirewallpolicyrule_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddRuleStringStringFirewallpolicyrule { + + public static void main(String[] args) throws Exception { + syncAddRuleStringStringFirewallpolicyrule(); + } + + public static void syncAddRuleStringStringFirewallpolicyrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule firewallPolicyRuleResource = FirewallPolicyRule.newBuilder().build(); + Operation response = + networkFirewallPoliciesClient + .addRuleAsync(project, firewallPolicy, firewallPolicyRuleResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_AddRule_StringStringFirewallpolicyrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/AsyncCloneRules.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/AsyncCloneRules.java new file mode 100644 index 000000000000..604514b35b2c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/AsyncCloneRules.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_CloneRules_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncCloneRules { + + public static void main(String[] args) throws Exception { + asyncCloneRules(); + } + + public static void asyncCloneRules() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + CloneRulesNetworkFirewallPolicyRequest request = + CloneRulesNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.cloneRulesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_CloneRules_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/AsyncCloneRulesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/AsyncCloneRulesLRO.java new file mode 100644 index 000000000000..c14ded17788a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/AsyncCloneRulesLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_CloneRules_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncCloneRulesLRO { + + public static void main(String[] args) throws Exception { + asyncCloneRulesLRO(); + } + + public static void asyncCloneRulesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + CloneRulesNetworkFirewallPolicyRequest request = + CloneRulesNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.cloneRulesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_CloneRules_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/SyncCloneRules.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/SyncCloneRules.java new file mode 100644 index 000000000000..8fc24e7d3fc2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/SyncCloneRules.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_CloneRules_sync] +import com.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncCloneRules { + + public static void main(String[] args) throws Exception { + syncCloneRules(); + } + + public static void syncCloneRules() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + CloneRulesNetworkFirewallPolicyRequest request = + CloneRulesNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + Operation response = networkFirewallPoliciesClient.cloneRulesAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_CloneRules_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/SyncCloneRulesStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/SyncCloneRulesStringString.java new file mode 100644 index 000000000000..8ad6e4c17fa3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/clonerules/SyncCloneRulesStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_CloneRules_StringString_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncCloneRulesStringString { + + public static void main(String[] args) throws Exception { + syncCloneRulesStringString(); + } + + public static void syncCloneRulesStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = + networkFirewallPoliciesClient.cloneRulesAsync(project, firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_CloneRules_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..26a8268fce93 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkFirewallPoliciesSettings networkFirewallPoliciesSettings = + NetworkFirewallPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create(networkFirewallPoliciesSettings); + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..67c4c6f34726 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkFirewallPoliciesSettings networkFirewallPoliciesSettings = + NetworkFirewallPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create(networkFirewallPoliciesSettings); + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/AsyncDelete.java new file mode 100644 index 000000000000..8ea7416dc5d1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + DeleteNetworkFirewallPolicyRequest request = + DeleteNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..31aee10caa0f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + DeleteNetworkFirewallPolicyRequest request = + DeleteNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/SyncDelete.java new file mode 100644 index 000000000000..bcc5481e4aeb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Delete_sync] +import com.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + DeleteNetworkFirewallPolicyRequest request = + DeleteNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networkFirewallPoliciesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..8d3e48f73dc9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/delete/SyncDeleteStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Delete_StringString_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = networkFirewallPoliciesClient.deleteAsync(project, firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/AsyncGet.java new file mode 100644 index 000000000000..554ff130be62 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.GetNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + GetNetworkFirewallPolicyRequest request = + GetNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.getCallable().futureCall(request); + // Do something. + FirewallPolicy response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/SyncGet.java new file mode 100644 index 000000000000..99f17606a568 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Get_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.GetNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + GetNetworkFirewallPolicyRequest request = + GetNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .build(); + FirewallPolicy response = networkFirewallPoliciesClient.get(request); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/SyncGetStringString.java new file mode 100644 index 000000000000..89400081df99 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/get/SyncGetStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Get_StringString_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicy response = networkFirewallPoliciesClient.get(project, firewallPolicy); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/AsyncGetAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/AsyncGetAssociation.java new file mode 100644 index 000000000000..71e3198a175f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/AsyncGetAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.GetAssociationNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class AsyncGetAssociation { + + public static void main(String[] args) throws Exception { + asyncGetAssociation(); + } + + public static void asyncGetAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + GetAssociationNetworkFirewallPolicyRequest request = + GetAssociationNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.getAssociationCallable().futureCall(request); + // Do something. + FirewallPolicyAssociation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/SyncGetAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/SyncGetAssociation.java new file mode 100644 index 000000000000..93157a9f27b5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/SyncGetAssociation.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetAssociation_sync] +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.GetAssociationNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class SyncGetAssociation { + + public static void main(String[] args) throws Exception { + syncGetAssociation(); + } + + public static void syncGetAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + GetAssociationNetworkFirewallPolicyRequest request = + GetAssociationNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .build(); + FirewallPolicyAssociation response = networkFirewallPoliciesClient.getAssociation(request); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/SyncGetAssociationStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/SyncGetAssociationStringString.java new file mode 100644 index 000000000000..b1f5c21e286c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getassociation/SyncGetAssociationStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetAssociation_StringString_sync] +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class SyncGetAssociationStringString { + + public static void main(String[] args) throws Exception { + syncGetAssociationStringString(); + } + + public static void syncGetAssociationStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyAssociation response = + networkFirewallPoliciesClient.getAssociation(project, firewallPolicy); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetAssociation_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..c2e054a346d8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + GetIamPolicyNetworkFirewallPolicyRequest request = + GetIamPolicyNetworkFirewallPolicyRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..1068e4334f54 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + GetIamPolicyNetworkFirewallPolicyRequest request = + GetIamPolicyNetworkFirewallPolicyRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = networkFirewallPoliciesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/SyncGetIamPolicyStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/SyncGetIamPolicyStringString.java new file mode 100644 index 000000000000..6cfaa11179c8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getiampolicy/SyncGetIamPolicyStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetIamPolicy_StringString_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringString(); + } + + public static void syncGetIamPolicyStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + Policy response = networkFirewallPoliciesClient.getIamPolicy(project, resource); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetIamPolicy_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/AsyncGetRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/AsyncGetRule.java new file mode 100644 index 000000000000..9a441f2e7141 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/AsyncGetRule.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.GetRuleNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class AsyncGetRule { + + public static void main(String[] args) throws Exception { + asyncGetRule(); + } + + public static void asyncGetRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + GetRuleNetworkFirewallPolicyRequest request = + GetRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.getRuleCallable().futureCall(request); + // Do something. + FirewallPolicyRule response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/SyncGetRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/SyncGetRule.java new file mode 100644 index 000000000000..b6e3c3bc4c08 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/SyncGetRule.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetRule_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.GetRuleNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class SyncGetRule { + + public static void main(String[] args) throws Exception { + syncGetRule(); + } + + public static void syncGetRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + GetRuleNetworkFirewallPolicyRequest request = + GetRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .build(); + FirewallPolicyRule response = networkFirewallPoliciesClient.getRule(request); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/SyncGetRuleStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/SyncGetRuleStringString.java new file mode 100644 index 000000000000..d3bc883b962b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/getrule/SyncGetRuleStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_GetRule_StringString_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class SyncGetRuleStringString { + + public static void main(String[] args) throws Exception { + syncGetRuleStringString(); + } + + public static void syncGetRuleStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule response = networkFirewallPoliciesClient.getRule(project, firewallPolicy); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_GetRule_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/AsyncInsert.java new file mode 100644 index 000000000000..bf23df973ea2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/AsyncInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + InsertNetworkFirewallPolicyRequest request = + InsertNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..bcae8706c022 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + InsertNetworkFirewallPolicyRequest request = + InsertNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/SyncInsert.java new file mode 100644 index 000000000000..17746142975c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Insert_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + InsertNetworkFirewallPolicyRequest request = + InsertNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networkFirewallPoliciesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/SyncInsertStringFirewallpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/SyncInsertStringFirewallpolicy.java new file mode 100644 index 000000000000..18b4860d5508 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/insert/SyncInsertStringFirewallpolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Insert_StringFirewallpolicy_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringFirewallpolicy { + + public static void main(String[] args) throws Exception { + syncInsertStringFirewallpolicy(); + } + + public static void syncInsertStringFirewallpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + FirewallPolicy firewallPolicyResource = FirewallPolicy.newBuilder().build(); + Operation response = + networkFirewallPoliciesClient.insertAsync(project, firewallPolicyResource).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Insert_StringFirewallpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/AsyncList.java new file mode 100644 index 000000000000..d8a95fc1705a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + ListNetworkFirewallPoliciesRequest request = + ListNetworkFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + networkFirewallPoliciesClient.listPagedCallable().futureCall(request); + // Do something. + for (FirewallPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/AsyncListPaged.java new file mode 100644 index 000000000000..0497d25d4ef6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_List_Paged_async] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.FirewallPolicyList; +import com.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + ListNetworkFirewallPoliciesRequest request = + ListNetworkFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + FirewallPolicyList response = networkFirewallPoliciesClient.listCallable().call(request); + for (FirewallPolicy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/SyncList.java new file mode 100644 index 000000000000..e1c6ecf63eaa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_List_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + ListNetworkFirewallPoliciesRequest request = + ListNetworkFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (FirewallPolicy element : networkFirewallPoliciesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/SyncListString.java new file mode 100644 index 000000000000..ce500df694d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_List_String_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + for (FirewallPolicy element : networkFirewallPoliciesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/AsyncPatch.java new file mode 100644 index 000000000000..c5c86b580a7f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/AsyncPatch.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + PatchNetworkFirewallPolicyRequest request = + PatchNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..cc870c91c538 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + PatchNetworkFirewallPolicyRequest request = + PatchNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/SyncPatch.java new file mode 100644 index 000000000000..fdb00cf7a1c8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Patch_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + PatchNetworkFirewallPolicyRequest request = + PatchNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networkFirewallPoliciesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/SyncPatchStringStringFirewallpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/SyncPatchStringStringFirewallpolicy.java new file mode 100644 index 000000000000..c506a77181e3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patch/SyncPatchStringStringFirewallpolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_Patch_StringStringFirewallpolicy_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringFirewallpolicy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringFirewallpolicy(); + } + + public static void syncPatchStringStringFirewallpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicy firewallPolicyResource = FirewallPolicy.newBuilder().build(); + Operation response = + networkFirewallPoliciesClient + .patchAsync(project, firewallPolicy, firewallPolicyResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_Patch_StringStringFirewallpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/AsyncPatchRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/AsyncPatchRule.java new file mode 100644 index 000000000000..bf06d5c5bb7f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/AsyncPatchRule.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_PatchRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncPatchRule { + + public static void main(String[] args) throws Exception { + asyncPatchRule(); + } + + public static void asyncPatchRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + PatchRuleNetworkFirewallPolicyRequest request = + PatchRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.patchRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_PatchRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/AsyncPatchRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/AsyncPatchRuleLRO.java new file mode 100644 index 000000000000..352165d71eab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/AsyncPatchRuleLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_PatchRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest; + +public class AsyncPatchRuleLRO { + + public static void main(String[] args) throws Exception { + asyncPatchRuleLRO(); + } + + public static void asyncPatchRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + PatchRuleNetworkFirewallPolicyRequest request = + PatchRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.patchRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_PatchRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/SyncPatchRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/SyncPatchRule.java new file mode 100644 index 000000000000..267917dd1098 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/SyncPatchRule.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_PatchRule_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest; + +public class SyncPatchRule { + + public static void main(String[] args) throws Exception { + syncPatchRule(); + } + + public static void syncPatchRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + PatchRuleNetworkFirewallPolicyRequest request = + PatchRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networkFirewallPoliciesClient.patchRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_PatchRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/SyncPatchRuleStringStringFirewallpolicyrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/SyncPatchRuleStringStringFirewallpolicyrule.java new file mode 100644 index 000000000000..5f5dc36993cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/patchrule/SyncPatchRuleStringStringFirewallpolicyrule.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_PatchRule_StringStringFirewallpolicyrule_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchRuleStringStringFirewallpolicyrule { + + public static void main(String[] args) throws Exception { + syncPatchRuleStringStringFirewallpolicyrule(); + } + + public static void syncPatchRuleStringStringFirewallpolicyrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule firewallPolicyRuleResource = FirewallPolicyRule.newBuilder().build(); + Operation response = + networkFirewallPoliciesClient + .patchRuleAsync(project, firewallPolicy, firewallPolicyRuleResource) + .get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_PatchRule_StringStringFirewallpolicyrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/AsyncRemoveAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/AsyncRemoveAssociation.java new file mode 100644 index 000000000000..0bc84484a0b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/AsyncRemoveAssociation.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_RemoveAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveAssociation { + + public static void main(String[] args) throws Exception { + asyncRemoveAssociation(); + } + + public static void asyncRemoveAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + RemoveAssociationNetworkFirewallPolicyRequest request = + RemoveAssociationNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.removeAssociationCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_RemoveAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java new file mode 100644 index 000000000000..2453a49806a9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_RemoveAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest; + +public class AsyncRemoveAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveAssociationLRO(); + } + + public static void asyncRemoveAssociationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + RemoveAssociationNetworkFirewallPolicyRequest request = + RemoveAssociationNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.removeAssociationOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_RemoveAssociation_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/SyncRemoveAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/SyncRemoveAssociation.java new file mode 100644 index 000000000000..03394cecb03a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/SyncRemoveAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_RemoveAssociation_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest; + +public class SyncRemoveAssociation { + + public static void main(String[] args) throws Exception { + syncRemoveAssociation(); + } + + public static void syncRemoveAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + RemoveAssociationNetworkFirewallPolicyRequest request = + RemoveAssociationNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networkFirewallPoliciesClient.removeAssociationAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_RemoveAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/SyncRemoveAssociationStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/SyncRemoveAssociationStringString.java new file mode 100644 index 000000000000..18d052c1fad6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removeassociation/SyncRemoveAssociationStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_RemoveAssociation_StringString_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncRemoveAssociationStringString { + + public static void main(String[] args) throws Exception { + syncRemoveAssociationStringString(); + } + + public static void syncRemoveAssociationStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = + networkFirewallPoliciesClient.removeAssociationAsync(project, firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_RemoveAssociation_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/AsyncRemoveRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/AsyncRemoveRule.java new file mode 100644 index 000000000000..70e6ea0146df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/AsyncRemoveRule.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_RemoveRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveRule { + + public static void main(String[] args) throws Exception { + asyncRemoveRule(); + } + + public static void asyncRemoveRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + RemoveRuleNetworkFirewallPolicyRequest request = + RemoveRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.removeRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_RemoveRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/AsyncRemoveRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/AsyncRemoveRuleLRO.java new file mode 100644 index 000000000000..37fc2ea8ce1d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/AsyncRemoveRuleLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_RemoveRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest; + +public class AsyncRemoveRuleLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveRuleLRO(); + } + + public static void asyncRemoveRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + RemoveRuleNetworkFirewallPolicyRequest request = + RemoveRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networkFirewallPoliciesClient.removeRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_RemoveRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/SyncRemoveRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/SyncRemoveRule.java new file mode 100644 index 000000000000..6d46a48d9cac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/SyncRemoveRule.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_RemoveRule_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest; + +public class SyncRemoveRule { + + public static void main(String[] args) throws Exception { + syncRemoveRule(); + } + + public static void syncRemoveRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + RemoveRuleNetworkFirewallPolicyRequest request = + RemoveRuleNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networkFirewallPoliciesClient.removeRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_RemoveRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/SyncRemoveRuleStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/SyncRemoveRuleStringString.java new file mode 100644 index 000000000000..3651db8a194e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/removerule/SyncRemoveRuleStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_RemoveRule_StringString_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncRemoveRuleStringString { + + public static void main(String[] args) throws Exception { + syncRemoveRuleStringString(); + } + + public static void syncRemoveRuleStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = + networkFirewallPoliciesClient.removeRuleAsync(project, firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_RemoveRule_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..01f0d6f0bbd9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + SetIamPolicyNetworkFirewallPolicyRequest request = + SetIamPolicyNetworkFirewallPolicyRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = + networkFirewallPoliciesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..af053158a057 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_SetIamPolicy_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + SetIamPolicyNetworkFirewallPolicyRequest request = + SetIamPolicyNetworkFirewallPolicyRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = networkFirewallPoliciesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java new file mode 100644 index 000000000000..51488d4e9ee3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncSetIamPolicyStringStringGlobalsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringGlobalsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringGlobalsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetPolicyRequest globalSetPolicyRequestResource = + GlobalSetPolicyRequest.newBuilder().build(); + Policy response = + networkFirewallPoliciesClient.setIamPolicy( + project, resource, globalSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..2f3b32607fea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + TestIamPermissionsNetworkFirewallPolicyRequest request = + TestIamPermissionsNetworkFirewallPolicyRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + networkFirewallPoliciesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..e8ce269ed19f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_TestIamPermissions_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + TestIamPermissionsNetworkFirewallPolicyRequest request = + TestIamPermissionsNetworkFirewallPolicyRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = networkFirewallPoliciesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..28bbcd56604e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpolicies/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPolicies_TestIamPermissions_StringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworkFirewallPoliciesClient networkFirewallPoliciesClient = + NetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + networkFirewallPoliciesClient.testIamPermissions( + project, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_NetworkFirewallPolicies_TestIamPermissions_StringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpoliciessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpoliciessettings/get/SyncGet.java new file mode 100644 index 000000000000..426991d45f58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkfirewallpoliciessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NetworkFirewallPoliciesSettings_Get_sync] +import com.google.cloud.compute.v1.NetworkFirewallPoliciesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkFirewallPoliciesSettings.Builder networkFirewallPoliciesSettingsBuilder = + NetworkFirewallPoliciesSettings.newBuilder(); + networkFirewallPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + networkFirewallPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworkFirewallPoliciesSettings networkFirewallPoliciesSettings = + networkFirewallPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworkFirewallPoliciesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/AsyncAddPeering.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/AsyncAddPeering.java new file mode 100644 index 000000000000..cc71e22a2f1c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/AsyncAddPeering.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_AddPeering_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddPeeringNetworkRequest; +import com.google.cloud.compute.v1.NetworksAddPeeringRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.longrunning.Operation; + +public class AsyncAddPeering { + + public static void main(String[] args) throws Exception { + asyncAddPeering(); + } + + public static void asyncAddPeering() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + AddPeeringNetworkRequest request = + AddPeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksAddPeeringRequestResource(NetworksAddPeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networksClient.addPeeringCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_AddPeering_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/AsyncAddPeeringLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/AsyncAddPeeringLRO.java new file mode 100644 index 000000000000..70408cf8fd03 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/AsyncAddPeeringLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_AddPeering_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddPeeringNetworkRequest; +import com.google.cloud.compute.v1.NetworksAddPeeringRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddPeeringLRO { + + public static void main(String[] args) throws Exception { + asyncAddPeeringLRO(); + } + + public static void asyncAddPeeringLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + AddPeeringNetworkRequest request = + AddPeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksAddPeeringRequestResource(NetworksAddPeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networksClient.addPeeringOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_AddPeering_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/SyncAddPeering.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/SyncAddPeering.java new file mode 100644 index 000000000000..7cb9cfa6d829 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/SyncAddPeering.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_AddPeering_sync] +import com.google.cloud.compute.v1.AddPeeringNetworkRequest; +import com.google.cloud.compute.v1.NetworksAddPeeringRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddPeering { + + public static void main(String[] args) throws Exception { + syncAddPeering(); + } + + public static void syncAddPeering() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + AddPeeringNetworkRequest request = + AddPeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksAddPeeringRequestResource(NetworksAddPeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networksClient.addPeeringAsync(request).get(); + } + } +} +// [END compute_v1_generated_Networks_AddPeering_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/SyncAddPeeringStringStringNetworksaddpeeringrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/SyncAddPeeringStringStringNetworksaddpeeringrequest.java new file mode 100644 index 000000000000..bf230725a82f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/addpeering/SyncAddPeeringStringStringNetworksaddpeeringrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_AddPeering_StringStringNetworksaddpeeringrequest_sync] +import com.google.cloud.compute.v1.NetworksAddPeeringRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddPeeringStringStringNetworksaddpeeringrequest { + + public static void main(String[] args) throws Exception { + syncAddPeeringStringStringNetworksaddpeeringrequest(); + } + + public static void syncAddPeeringStringStringNetworksaddpeeringrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + NetworksAddPeeringRequest networksAddPeeringRequestResource = + NetworksAddPeeringRequest.newBuilder().build(); + Operation response = + networksClient.addPeeringAsync(project, network, networksAddPeeringRequestResource).get(); + } + } +} +// [END compute_v1_generated_Networks_AddPeering_StringStringNetworksaddpeeringrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d3d9d442819d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworksSettings networksSettings = + NetworksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NetworksClient networksClient = NetworksClient.create(networksSettings); + } +} +// [END compute_v1_generated_Networks_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7168ca38f984 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworksSettings networksSettings = + NetworksSettings.newBuilder().setEndpoint(myEndpoint).build(); + NetworksClient networksClient = NetworksClient.create(networksSettings); + } +} +// [END compute_v1_generated_Networks_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/AsyncDelete.java new file mode 100644 index 000000000000..b5773e473c9d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteNetworkRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + DeleteNetworkRequest request = + DeleteNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networksClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..b81f4c843e03 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteNetworkRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + DeleteNetworkRequest request = + DeleteNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networksClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/SyncDelete.java new file mode 100644 index 000000000000..20234c1a81df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Delete_sync] +import com.google.cloud.compute.v1.DeleteNetworkRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + DeleteNetworkRequest request = + DeleteNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networksClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Networks_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..ae1e54fb1f9f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Delete_StringString_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + Operation response = networksClient.deleteAsync(project, network).get(); + } + } +} +// [END compute_v1_generated_Networks_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/AsyncGet.java new file mode 100644 index 000000000000..80ffef02b354 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetNetworkRequest; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + GetNetworkRequest request = + GetNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .build(); + ApiFuture future = networksClient.getCallable().futureCall(request); + // Do something. + Network response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/SyncGet.java new file mode 100644 index 000000000000..fb4f1ab55534 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Get_sync] +import com.google.cloud.compute.v1.GetNetworkRequest; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + GetNetworkRequest request = + GetNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .build(); + Network response = networksClient.get(request); + } + } +} +// [END compute_v1_generated_Networks_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/SyncGetStringString.java new file mode 100644 index 000000000000..202dc4faf3ca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Get_StringString_sync] +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + Network response = networksClient.get(project, network); + } + } +} +// [END compute_v1_generated_Networks_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java new file mode 100644 index 000000000000..d2dfe17ee1d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/AsyncGetEffectiveFirewalls.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_GetEffectiveFirewalls_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponse; + +public class AsyncGetEffectiveFirewalls { + + public static void main(String[] args) throws Exception { + asyncGetEffectiveFirewalls(); + } + + public static void asyncGetEffectiveFirewalls() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + GetEffectiveFirewallsNetworkRequest request = + GetEffectiveFirewallsNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .build(); + ApiFuture future = + networksClient.getEffectiveFirewallsCallable().futureCall(request); + // Do something. + NetworksGetEffectiveFirewallsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_GetEffectiveFirewalls_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/SyncGetEffectiveFirewalls.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/SyncGetEffectiveFirewalls.java new file mode 100644 index 000000000000..260cf861d916 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/SyncGetEffectiveFirewalls.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_GetEffectiveFirewalls_sync] +import com.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponse; + +public class SyncGetEffectiveFirewalls { + + public static void main(String[] args) throws Exception { + syncGetEffectiveFirewalls(); + } + + public static void syncGetEffectiveFirewalls() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + GetEffectiveFirewallsNetworkRequest request = + GetEffectiveFirewallsNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .build(); + NetworksGetEffectiveFirewallsResponse response = + networksClient.getEffectiveFirewalls(request); + } + } +} +// [END compute_v1_generated_Networks_GetEffectiveFirewalls_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/SyncGetEffectiveFirewallsStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/SyncGetEffectiveFirewallsStringString.java new file mode 100644 index 000000000000..375ca006650a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/geteffectivefirewalls/SyncGetEffectiveFirewallsStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_GetEffectiveFirewalls_StringString_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponse; + +public class SyncGetEffectiveFirewallsStringString { + + public static void main(String[] args) throws Exception { + syncGetEffectiveFirewallsStringString(); + } + + public static void syncGetEffectiveFirewallsStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + NetworksGetEffectiveFirewallsResponse response = + networksClient.getEffectiveFirewalls(project, network); + } + } +} +// [END compute_v1_generated_Networks_GetEffectiveFirewalls_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/AsyncInsert.java new file mode 100644 index 000000000000..cc59eb56f568 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertNetworkRequest; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + InsertNetworkRequest request = + InsertNetworkRequest.newBuilder() + .setNetworkResource(Network.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networksClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..0e6407cbb8bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertNetworkRequest; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + InsertNetworkRequest request = + InsertNetworkRequest.newBuilder() + .setNetworkResource(Network.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networksClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/SyncInsert.java new file mode 100644 index 000000000000..3311f85960a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Insert_sync] +import com.google.cloud.compute.v1.InsertNetworkRequest; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + InsertNetworkRequest request = + InsertNetworkRequest.newBuilder() + .setNetworkResource(Network.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networksClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Networks_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/SyncInsertStringNetwork.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/SyncInsertStringNetwork.java new file mode 100644 index 000000000000..a367cc018e3d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/insert/SyncInsertStringNetwork.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Insert_StringNetwork_sync] +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringNetwork { + + public static void main(String[] args) throws Exception { + syncInsertStringNetwork(); + } + + public static void syncInsertStringNetwork() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + Network networkResource = Network.newBuilder().build(); + Operation response = networksClient.insertAsync(project, networkResource).get(); + } + } +} +// [END compute_v1_generated_Networks_Insert_StringNetwork_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/AsyncList.java new file mode 100644 index 000000000000..d7ec1f6baf84 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListNetworksRequest; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + ListNetworksRequest request = + ListNetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = networksClient.listPagedCallable().futureCall(request); + // Do something. + for (Network element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Networks_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/AsyncListPaged.java new file mode 100644 index 000000000000..80cfe0966884 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_List_Paged_async] +import com.google.cloud.compute.v1.ListNetworksRequest; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworkList; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + ListNetworksRequest request = + ListNetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NetworkList response = networksClient.listCallable().call(request); + for (Network element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Networks_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/SyncList.java new file mode 100644 index 000000000000..9fdc7ab037bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_List_sync] +import com.google.cloud.compute.v1.ListNetworksRequest; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + ListNetworksRequest request = + ListNetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Network element : networksClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Networks_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/SyncListString.java new file mode 100644 index 000000000000..fb986ce6e5d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_List_String_sync] +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + for (Network element : networksClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Networks_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/AsyncListPeeringRoutes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/AsyncListPeeringRoutes.java new file mode 100644 index 000000000000..216f8d393d3c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/AsyncListPeeringRoutes.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_ListPeeringRoutes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ExchangedPeeringRoute; +import com.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest; +import com.google.cloud.compute.v1.NetworksClient; + +public class AsyncListPeeringRoutes { + + public static void main(String[] args) throws Exception { + asyncListPeeringRoutes(); + } + + public static void asyncListPeeringRoutes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + ListPeeringRoutesNetworksRequest request = + ListPeeringRoutesNetworksRequest.newBuilder() + .setDirection("direction-962590849") + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetwork("network1843485230") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setPeeringName("peeringName-1170120213") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + networksClient.listPeeringRoutesPagedCallable().futureCall(request); + // Do something. + for (ExchangedPeeringRoute element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Networks_ListPeeringRoutes_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/AsyncListPeeringRoutesPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/AsyncListPeeringRoutesPaged.java new file mode 100644 index 000000000000..5716bb98153f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/AsyncListPeeringRoutesPaged.java @@ -0,0 +1,68 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_ListPeeringRoutes_Paged_async] +import com.google.cloud.compute.v1.ExchangedPeeringRoute; +import com.google.cloud.compute.v1.ExchangedPeeringRoutesList; +import com.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.common.base.Strings; + +public class AsyncListPeeringRoutesPaged { + + public static void main(String[] args) throws Exception { + asyncListPeeringRoutesPaged(); + } + + public static void asyncListPeeringRoutesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + ListPeeringRoutesNetworksRequest request = + ListPeeringRoutesNetworksRequest.newBuilder() + .setDirection("direction-962590849") + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetwork("network1843485230") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setPeeringName("peeringName-1170120213") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ExchangedPeeringRoutesList response = + networksClient.listPeeringRoutesCallable().call(request); + for (ExchangedPeeringRoute element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Networks_ListPeeringRoutes_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/SyncListPeeringRoutes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/SyncListPeeringRoutes.java new file mode 100644 index 000000000000..f6adc3b8ff46 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/SyncListPeeringRoutes.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_ListPeeringRoutes_sync] +import com.google.cloud.compute.v1.ExchangedPeeringRoute; +import com.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest; +import com.google.cloud.compute.v1.NetworksClient; + +public class SyncListPeeringRoutes { + + public static void main(String[] args) throws Exception { + syncListPeeringRoutes(); + } + + public static void syncListPeeringRoutes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + ListPeeringRoutesNetworksRequest request = + ListPeeringRoutesNetworksRequest.newBuilder() + .setDirection("direction-962590849") + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNetwork("network1843485230") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setPeeringName("peeringName-1170120213") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (ExchangedPeeringRoute element : networksClient.listPeeringRoutes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Networks_ListPeeringRoutes_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/SyncListPeeringRoutesStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/SyncListPeeringRoutesStringString.java new file mode 100644 index 000000000000..75724c6ca892 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/listpeeringroutes/SyncListPeeringRoutesStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_ListPeeringRoutes_StringString_sync] +import com.google.cloud.compute.v1.ExchangedPeeringRoute; +import com.google.cloud.compute.v1.NetworksClient; + +public class SyncListPeeringRoutesStringString { + + public static void main(String[] args) throws Exception { + syncListPeeringRoutesStringString(); + } + + public static void syncListPeeringRoutesStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + for (ExchangedPeeringRoute element : + networksClient.listPeeringRoutes(project, network).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Networks_ListPeeringRoutes_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/AsyncPatch.java new file mode 100644 index 000000000000..9ad87ead7c7a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.PatchNetworkRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + PatchNetworkRequest request = + PatchNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworkResource(Network.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networksClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..5282efb32fb6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNetworkRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + PatchNetworkRequest request = + PatchNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworkResource(Network.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networksClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/SyncPatch.java new file mode 100644 index 000000000000..40ebdc5dab92 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Patch_sync] +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNetworkRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + PatchNetworkRequest request = + PatchNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworkResource(Network.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networksClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_Networks_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/SyncPatchStringStringNetwork.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/SyncPatchStringStringNetwork.java new file mode 100644 index 000000000000..46bccdce99cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/patch/SyncPatchStringStringNetwork.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_Patch_StringStringNetwork_sync] +import com.google.cloud.compute.v1.Network; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringNetwork { + + public static void main(String[] args) throws Exception { + syncPatchStringStringNetwork(); + } + + public static void syncPatchStringStringNetwork() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + Network networkResource = Network.newBuilder().build(); + Operation response = networksClient.patchAsync(project, network, networkResource).get(); + } + } +} +// [END compute_v1_generated_Networks_Patch_StringStringNetwork_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/AsyncRemovePeering.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/AsyncRemovePeering.java new file mode 100644 index 000000000000..7cfdbfa0d4f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/AsyncRemovePeering.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_RemovePeering_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksRemovePeeringRequest; +import com.google.cloud.compute.v1.RemovePeeringNetworkRequest; +import com.google.longrunning.Operation; + +public class AsyncRemovePeering { + + public static void main(String[] args) throws Exception { + asyncRemovePeering(); + } + + public static void asyncRemovePeering() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + RemovePeeringNetworkRequest request = + RemovePeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksRemovePeeringRequestResource( + NetworksRemovePeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networksClient.removePeeringCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_RemovePeering_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/AsyncRemovePeeringLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/AsyncRemovePeeringLRO.java new file mode 100644 index 000000000000..e3f30afd4e62 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/AsyncRemovePeeringLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_RemovePeering_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksRemovePeeringRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemovePeeringNetworkRequest; + +public class AsyncRemovePeeringLRO { + + public static void main(String[] args) throws Exception { + asyncRemovePeeringLRO(); + } + + public static void asyncRemovePeeringLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + RemovePeeringNetworkRequest request = + RemovePeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksRemovePeeringRequestResource( + NetworksRemovePeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networksClient.removePeeringOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_RemovePeering_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/SyncRemovePeering.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/SyncRemovePeering.java new file mode 100644 index 000000000000..8d9421de388b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/SyncRemovePeering.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_RemovePeering_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksRemovePeeringRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemovePeeringNetworkRequest; + +public class SyncRemovePeering { + + public static void main(String[] args) throws Exception { + syncRemovePeering(); + } + + public static void syncRemovePeering() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + RemovePeeringNetworkRequest request = + RemovePeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksRemovePeeringRequestResource( + NetworksRemovePeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networksClient.removePeeringAsync(request).get(); + } + } +} +// [END compute_v1_generated_Networks_RemovePeering_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/SyncRemovePeeringStringStringNetworksremovepeeringrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/SyncRemovePeeringStringStringNetworksremovepeeringrequest.java new file mode 100644 index 000000000000..1596d498bf7a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/removepeering/SyncRemovePeeringStringStringNetworksremovepeeringrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_RemovePeering_StringStringNetworksremovepeeringrequest_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksRemovePeeringRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncRemovePeeringStringStringNetworksremovepeeringrequest { + + public static void main(String[] args) throws Exception { + syncRemovePeeringStringStringNetworksremovepeeringrequest(); + } + + public static void syncRemovePeeringStringStringNetworksremovepeeringrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + NetworksRemovePeeringRequest networksRemovePeeringRequestResource = + NetworksRemovePeeringRequest.newBuilder().build(); + Operation response = + networksClient + .removePeeringAsync(project, network, networksRemovePeeringRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Networks_RemovePeering_StringStringNetworksremovepeeringrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/AsyncSwitchToCustomMode.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/AsyncSwitchToCustomMode.java new file mode 100644 index 000000000000..ff7279c23ff1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/AsyncSwitchToCustomMode.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_SwitchToCustomMode_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest; +import com.google.longrunning.Operation; + +public class AsyncSwitchToCustomMode { + + public static void main(String[] args) throws Exception { + asyncSwitchToCustomMode(); + } + + public static void asyncSwitchToCustomMode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + SwitchToCustomModeNetworkRequest request = + SwitchToCustomModeNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networksClient.switchToCustomModeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_SwitchToCustomMode_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/AsyncSwitchToCustomModeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/AsyncSwitchToCustomModeLRO.java new file mode 100644 index 000000000000..cc2b2f99ecab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/AsyncSwitchToCustomModeLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_SwitchToCustomMode_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest; + +public class AsyncSwitchToCustomModeLRO { + + public static void main(String[] args) throws Exception { + asyncSwitchToCustomModeLRO(); + } + + public static void asyncSwitchToCustomModeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + SwitchToCustomModeNetworkRequest request = + SwitchToCustomModeNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networksClient.switchToCustomModeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_SwitchToCustomMode_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/SyncSwitchToCustomMode.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/SyncSwitchToCustomMode.java new file mode 100644 index 000000000000..4939636bfeaf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/SyncSwitchToCustomMode.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_SwitchToCustomMode_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest; + +public class SyncSwitchToCustomMode { + + public static void main(String[] args) throws Exception { + syncSwitchToCustomMode(); + } + + public static void syncSwitchToCustomMode() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + SwitchToCustomModeNetworkRequest request = + SwitchToCustomModeNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networksClient.switchToCustomModeAsync(request).get(); + } + } +} +// [END compute_v1_generated_Networks_SwitchToCustomMode_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/SyncSwitchToCustomModeStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/SyncSwitchToCustomModeStringString.java new file mode 100644 index 000000000000..3f0724e4dbfd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/switchtocustommode/SyncSwitchToCustomModeStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_SwitchToCustomMode_StringString_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncSwitchToCustomModeStringString { + + public static void main(String[] args) throws Exception { + syncSwitchToCustomModeStringString(); + } + + public static void syncSwitchToCustomModeStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + Operation response = networksClient.switchToCustomModeAsync(project, network).get(); + } + } +} +// [END compute_v1_generated_Networks_SwitchToCustomMode_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/AsyncUpdatePeering.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/AsyncUpdatePeering.java new file mode 100644 index 000000000000..5dbc5f3dce0e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/AsyncUpdatePeering.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_UpdatePeering_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksUpdatePeeringRequest; +import com.google.cloud.compute.v1.UpdatePeeringNetworkRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdatePeering { + + public static void main(String[] args) throws Exception { + asyncUpdatePeering(); + } + + public static void asyncUpdatePeering() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + UpdatePeeringNetworkRequest request = + UpdatePeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksUpdatePeeringRequestResource( + NetworksUpdatePeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = networksClient.updatePeeringCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_UpdatePeering_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/AsyncUpdatePeeringLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/AsyncUpdatePeeringLRO.java new file mode 100644 index 000000000000..565182f8d194 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/AsyncUpdatePeeringLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_UpdatePeering_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksUpdatePeeringRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdatePeeringNetworkRequest; + +public class AsyncUpdatePeeringLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePeeringLRO(); + } + + public static void asyncUpdatePeeringLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + UpdatePeeringNetworkRequest request = + UpdatePeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksUpdatePeeringRequestResource( + NetworksUpdatePeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + networksClient.updatePeeringOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Networks_UpdatePeering_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/SyncUpdatePeering.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/SyncUpdatePeering.java new file mode 100644 index 000000000000..f812e931aa18 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/SyncUpdatePeering.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.compute.v1.samples; + +// [START compute_v1_generated_Networks_UpdatePeering_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksUpdatePeeringRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdatePeeringNetworkRequest; + +public class SyncUpdatePeering { + + public static void main(String[] args) throws Exception { + syncUpdatePeering(); + } + + public static void syncUpdatePeering() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + UpdatePeeringNetworkRequest request = + UpdatePeeringNetworkRequest.newBuilder() + .setNetwork("network1843485230") + .setNetworksUpdatePeeringRequestResource( + NetworksUpdatePeeringRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = networksClient.updatePeeringAsync(request).get(); + } + } +} +// [END compute_v1_generated_Networks_UpdatePeering_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/SyncUpdatePeeringStringStringNetworksupdatepeeringrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/SyncUpdatePeeringStringStringNetworksupdatepeeringrequest.java new file mode 100644 index 000000000000..ef0093ee01e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networks/updatepeering/SyncUpdatePeeringStringStringNetworksupdatepeeringrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Networks_UpdatePeering_StringStringNetworksupdatepeeringrequest_sync] +import com.google.cloud.compute.v1.NetworksClient; +import com.google.cloud.compute.v1.NetworksUpdatePeeringRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncUpdatePeeringStringStringNetworksupdatepeeringrequest { + + public static void main(String[] args) throws Exception { + syncUpdatePeeringStringStringNetworksupdatepeeringrequest(); + } + + public static void syncUpdatePeeringStringStringNetworksupdatepeeringrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NetworksClient networksClient = NetworksClient.create()) { + String project = "project-309310695"; + String network = "network1843485230"; + NetworksUpdatePeeringRequest networksUpdatePeeringRequestResource = + NetworksUpdatePeeringRequest.newBuilder().build(); + Operation response = + networksClient + .updatePeeringAsync(project, network, networksUpdatePeeringRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Networks_UpdatePeering_StringStringNetworksupdatepeeringrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkssettings/get/SyncGet.java new file mode 100644 index 000000000000..0faa5b6a1970 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/networkssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NetworksSettings_Get_sync] +import com.google.cloud.compute.v1.NetworksSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworksSettings.Builder networksSettingsBuilder = NetworksSettings.newBuilder(); + networksSettingsBuilder + .getSettings() + .setRetrySettings( + networksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworksSettings networksSettings = networksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworksSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/AsyncAddNodes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/AsyncAddNodes.java new file mode 100644 index 000000000000..5f6667f6d00c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/AsyncAddNodes.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_AddNodes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddNodesNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsAddNodesRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncAddNodes { + + public static void main(String[] args) throws Exception { + asyncAddNodes(); + } + + public static void asyncAddNodes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + AddNodesNodeGroupRequest request = + AddNodesNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsAddNodesRequestResource(NodeGroupsAddNodesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.addNodesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_AddNodes_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/AsyncAddNodesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/AsyncAddNodesLRO.java new file mode 100644 index 000000000000..3a45ceb0d6a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/AsyncAddNodesLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_AddNodes_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddNodesNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsAddNodesRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncAddNodesLRO { + + public static void main(String[] args) throws Exception { + asyncAddNodesLRO(); + } + + public static void asyncAddNodesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + AddNodesNodeGroupRequest request = + AddNodesNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsAddNodesRequestResource(NodeGroupsAddNodesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + nodeGroupsClient.addNodesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_AddNodes_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/SyncAddNodes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/SyncAddNodes.java new file mode 100644 index 000000000000..ebc76ebacde3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/SyncAddNodes.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_AddNodes_sync] +import com.google.cloud.compute.v1.AddNodesNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsAddNodesRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddNodes { + + public static void main(String[] args) throws Exception { + syncAddNodes(); + } + + public static void syncAddNodes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + AddNodesNodeGroupRequest request = + AddNodesNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsAddNodesRequestResource(NodeGroupsAddNodesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = nodeGroupsClient.addNodesAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_AddNodes_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/SyncAddNodesStringStringStringNodegroupsaddnodesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/SyncAddNodesStringStringStringNodegroupsaddnodesrequest.java new file mode 100644 index 000000000000..939f1b2729eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/addnodes/SyncAddNodesStringStringStringNodegroupsaddnodesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_AddNodes_StringStringStringNodegroupsaddnodesrequest_sync] +import com.google.cloud.compute.v1.NodeGroupsAddNodesRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncAddNodesStringStringStringNodegroupsaddnodesrequest { + + public static void main(String[] args) throws Exception { + syncAddNodesStringStringStringNodegroupsaddnodesrequest(); + } + + public static void syncAddNodesStringStringStringNodegroupsaddnodesrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeGroup = "nodeGroup443599261"; + NodeGroupsAddNodesRequest nodeGroupsAddNodesRequestResource = + NodeGroupsAddNodesRequest.newBuilder().build(); + Operation response = + nodeGroupsClient + .addNodesAsync(project, zone, nodeGroup, nodeGroupsAddNodesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_NodeGroups_AddNodes_StringStringStringNodegroupsaddnodesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..5bac0aa7f5c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + AggregatedListNodeGroupsRequest request = + AggregatedListNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + nodeGroupsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..4fc021b7bef6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroupAggregatedList; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + AggregatedListNodeGroupsRequest request = + AggregatedListNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NodeGroupAggregatedList response = nodeGroupsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NodeGroups_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..141e728a0322 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + AggregatedListNodeGroupsRequest request = + AggregatedListNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + nodeGroupsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..60db25d17598 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_AggregatedList_String_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + nodeGroupsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d177a1f70507 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupsSettings nodeGroupsSettings = + NodeGroupsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create(nodeGroupsSettings); + } +} +// [END compute_v1_generated_NodeGroups_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..4f74f4abefc5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupsSettings nodeGroupsSettings = + NodeGroupsSettings.newBuilder().setEndpoint(myEndpoint).build(); + NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create(nodeGroupsSettings); + } +} +// [END compute_v1_generated_NodeGroups_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/AsyncDelete.java new file mode 100644 index 000000000000..77851db0deb6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + DeleteNodeGroupRequest request = + DeleteNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..818313547266 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + DeleteNodeGroupRequest request = + DeleteNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + nodeGroupsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/SyncDelete.java new file mode 100644 index 000000000000..6e99f79a98f3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Delete_sync] +import com.google.cloud.compute.v1.DeleteNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + DeleteNodeGroupRequest request = + DeleteNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = nodeGroupsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..8bdc2a20c424 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeGroup = "nodeGroup443599261"; + Operation response = nodeGroupsClient.deleteAsync(project, zone, nodeGroup).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/AsyncDeleteNodes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/AsyncDeleteNodes.java new file mode 100644 index 000000000000..b3ec7a952aa9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/AsyncDeleteNodes.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_DeleteNodes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteNodesNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteNodes { + + public static void main(String[] args) throws Exception { + asyncDeleteNodes(); + } + + public static void asyncDeleteNodes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + DeleteNodesNodeGroupRequest request = + DeleteNodesNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsDeleteNodesRequestResource( + NodeGroupsDeleteNodesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.deleteNodesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_DeleteNodes_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/AsyncDeleteNodesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/AsyncDeleteNodesLRO.java new file mode 100644 index 000000000000..4544aa07f514 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/AsyncDeleteNodesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_DeleteNodes_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteNodesNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteNodesLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteNodesLRO(); + } + + public static void asyncDeleteNodesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + DeleteNodesNodeGroupRequest request = + DeleteNodesNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsDeleteNodesRequestResource( + NodeGroupsDeleteNodesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + nodeGroupsClient.deleteNodesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_DeleteNodes_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/SyncDeleteNodes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/SyncDeleteNodes.java new file mode 100644 index 000000000000..7aa9dd8c246d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/SyncDeleteNodes.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_DeleteNodes_sync] +import com.google.cloud.compute.v1.DeleteNodesNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteNodes { + + public static void main(String[] args) throws Exception { + syncDeleteNodes(); + } + + public static void syncDeleteNodes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + DeleteNodesNodeGroupRequest request = + DeleteNodesNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsDeleteNodesRequestResource( + NodeGroupsDeleteNodesRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = nodeGroupsClient.deleteNodesAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_DeleteNodes_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/SyncDeleteNodesStringStringStringNodegroupsdeletenodesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/SyncDeleteNodesStringStringStringNodegroupsdeletenodesrequest.java new file mode 100644 index 000000000000..a5d8898b895b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/deletenodes/SyncDeleteNodesStringStringStringNodegroupsdeletenodesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_DeleteNodes_StringStringStringNodegroupsdeletenodesrequest_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteNodesStringStringStringNodegroupsdeletenodesrequest { + + public static void main(String[] args) throws Exception { + syncDeleteNodesStringStringStringNodegroupsdeletenodesrequest(); + } + + public static void syncDeleteNodesStringStringStringNodegroupsdeletenodesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeGroup = "nodeGroup443599261"; + NodeGroupsDeleteNodesRequest nodeGroupsDeleteNodesRequestResource = + NodeGroupsDeleteNodesRequest.newBuilder().build(); + Operation response = + nodeGroupsClient + .deleteNodesAsync(project, zone, nodeGroup, nodeGroupsDeleteNodesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_NodeGroups_DeleteNodes_StringStringStringNodegroupsdeletenodesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/AsyncGet.java new file mode 100644 index 000000000000..03b245313e2e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + GetNodeGroupRequest request = + GetNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.getCallable().futureCall(request); + // Do something. + NodeGroup response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/SyncGet.java new file mode 100644 index 000000000000..166875c2c2ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Get_sync] +import com.google.cloud.compute.v1.GetNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + GetNodeGroupRequest request = + GetNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + NodeGroup response = nodeGroupsClient.get(request); + } + } +} +// [END compute_v1_generated_NodeGroups_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..09173d0bbd82 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Get_StringStringString_sync] +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeGroup = "nodeGroup443599261"; + NodeGroup response = nodeGroupsClient.get(project, zone, nodeGroup); + } + } +} +// [END compute_v1_generated_NodeGroups_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..0d35877f35f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + GetIamPolicyNodeGroupRequest request = + GetIamPolicyNodeGroupRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..9f872662fa13 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + GetIamPolicyNodeGroupRequest request = + GetIamPolicyNodeGroupRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + Policy response = nodeGroupsClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_NodeGroups_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..df7c3a3d0c1a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + Policy response = nodeGroupsClient.getIamPolicy(project, zone, resource); + } + } +} +// [END compute_v1_generated_NodeGroups_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/AsyncInsert.java new file mode 100644 index 000000000000..b3b03d361d7a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/AsyncInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + InsertNodeGroupRequest request = + InsertNodeGroupRequest.newBuilder() + .setInitialNodeCount(1682564205) + .setNodeGroupResource(NodeGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..a06c9503cf39 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + InsertNodeGroupRequest request = + InsertNodeGroupRequest.newBuilder() + .setInitialNodeCount(1682564205) + .setNodeGroupResource(NodeGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + nodeGroupsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/SyncInsert.java new file mode 100644 index 000000000000..e9934f5f7110 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Insert_sync] +import com.google.cloud.compute.v1.InsertNodeGroupRequest; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + InsertNodeGroupRequest request = + InsertNodeGroupRequest.newBuilder() + .setInitialNodeCount(1682564205) + .setNodeGroupResource(NodeGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = nodeGroupsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/SyncInsertStringStringIntNodegroup.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/SyncInsertStringStringIntNodegroup.java new file mode 100644 index 000000000000..64b0f4674c04 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/insert/SyncInsertStringStringIntNodegroup.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Insert_StringStringIntNodegroup_sync] +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringIntNodegroup { + + public static void main(String[] args) throws Exception { + syncInsertStringStringIntNodegroup(); + } + + public static void syncInsertStringStringIntNodegroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + int initialNodeCount = 1682564205; + NodeGroup nodeGroupResource = NodeGroup.newBuilder().build(); + Operation response = + nodeGroupsClient.insertAsync(project, zone, initialNodeCount, nodeGroupResource).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Insert_StringStringIntNodegroup_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/AsyncList.java new file mode 100644 index 000000000000..f514a18985d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + ListNodeGroupsRequest request = + ListNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.listPagedCallable().futureCall(request); + // Do something. + for (NodeGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/AsyncListPaged.java new file mode 100644 index 000000000000..952183752ead --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_List_Paged_async] +import com.google.cloud.compute.v1.ListNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupList; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + ListNodeGroupsRequest request = + ListNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + NodeGroupList response = nodeGroupsClient.listCallable().call(request); + for (NodeGroup element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NodeGroups_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/SyncList.java new file mode 100644 index 000000000000..4b676d95624d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_List_sync] +import com.google.cloud.compute.v1.ListNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + ListNodeGroupsRequest request = + ListNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (NodeGroup element : nodeGroupsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/SyncListStringString.java new file mode 100644 index 000000000000..09aeb14f1a63 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_List_StringString_sync] +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (NodeGroup element : nodeGroupsClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/AsyncListNodes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/AsyncListNodes.java new file mode 100644 index 000000000000..0c2ef756268c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/AsyncListNodes.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_ListNodes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListNodesNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroupNode; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class AsyncListNodes { + + public static void main(String[] args) throws Exception { + asyncListNodes(); + } + + public static void asyncListNodes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + ListNodesNodeGroupsRequest request = + ListNodesNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNodeGroup("nodeGroup443599261") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + nodeGroupsClient.listNodesPagedCallable().futureCall(request); + // Do something. + for (NodeGroupNode element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_ListNodes_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/AsyncListNodesPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/AsyncListNodesPaged.java new file mode 100644 index 000000000000..b2a4ffa86e00 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/AsyncListNodesPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_ListNodes_Paged_async] +import com.google.cloud.compute.v1.ListNodesNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroupNode; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsListNodes; +import com.google.common.base.Strings; + +public class AsyncListNodesPaged { + + public static void main(String[] args) throws Exception { + asyncListNodesPaged(); + } + + public static void asyncListNodesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + ListNodesNodeGroupsRequest request = + ListNodesNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNodeGroup("nodeGroup443599261") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + NodeGroupsListNodes response = nodeGroupsClient.listNodesCallable().call(request); + for (NodeGroupNode element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NodeGroups_ListNodes_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/SyncListNodes.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/SyncListNodes.java new file mode 100644 index 000000000000..8fca92760ea6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/SyncListNodes.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_ListNodes_sync] +import com.google.cloud.compute.v1.ListNodesNodeGroupsRequest; +import com.google.cloud.compute.v1.NodeGroupNode; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class SyncListNodes { + + public static void main(String[] args) throws Exception { + syncListNodes(); + } + + public static void syncListNodes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + ListNodesNodeGroupsRequest request = + ListNodesNodeGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setNodeGroup("nodeGroup443599261") + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (NodeGroupNode element : nodeGroupsClient.listNodes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_ListNodes_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/SyncListNodesStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/SyncListNodesStringStringString.java new file mode 100644 index 000000000000..b7c2a3e240c6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/listnodes/SyncListNodesStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_ListNodes_StringStringString_sync] +import com.google.cloud.compute.v1.NodeGroupNode; +import com.google.cloud.compute.v1.NodeGroupsClient; + +public class SyncListNodesStringStringString { + + public static void main(String[] args) throws Exception { + syncListNodesStringStringString(); + } + + public static void syncListNodesStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeGroup = "nodeGroup443599261"; + for (NodeGroupNode element : + nodeGroupsClient.listNodes(project, zone, nodeGroup).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeGroups_ListNodes_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/AsyncPatch.java new file mode 100644 index 000000000000..c2ee6c36617f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.PatchNodeGroupRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + PatchNodeGroupRequest request = + PatchNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupResource(NodeGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..1121e1aacd8f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNodeGroupRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + PatchNodeGroupRequest request = + PatchNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupResource(NodeGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + nodeGroupsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/SyncPatch.java new file mode 100644 index 000000000000..cc1ee1014a7a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Patch_sync] +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNodeGroupRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + PatchNodeGroupRequest request = + PatchNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupResource(NodeGroup.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = nodeGroupsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/SyncPatchStringStringStringNodegroup.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/SyncPatchStringStringStringNodegroup.java new file mode 100644 index 000000000000..448a66fc8bb8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/patch/SyncPatchStringStringStringNodegroup.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_Patch_StringStringStringNodegroup_sync] +import com.google.cloud.compute.v1.NodeGroup; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncPatchStringStringStringNodegroup { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringNodegroup(); + } + + public static void syncPatchStringStringStringNodegroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeGroup = "nodeGroup443599261"; + NodeGroup nodeGroupResource = NodeGroup.newBuilder().build(); + Operation response = + nodeGroupsClient.patchAsync(project, zone, nodeGroup, nodeGroupResource).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_Patch_StringStringStringNodegroup_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..18f5b3a68f58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + SetIamPolicyNodeGroupRequest request = + SetIamPolicyNodeGroupRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build()) + .build(); + ApiFuture future = nodeGroupsClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..bf12c0d903bd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SetIamPolicy_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + SetIamPolicyNodeGroupRequest request = + SetIamPolicyNodeGroupRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build()) + .build(); + Policy response = nodeGroupsClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_NodeGroups_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java new file mode 100644 index 000000000000..1c7cbc2e71dc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SetIamPolicy_StringStringStringZonesetpolicyrequest_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringZonesetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringZonesetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringZonesetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build(); + Policy response = + nodeGroupsClient.setIamPolicy(project, zone, resource, zoneSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_NodeGroups_SetIamPolicy_StringStringStringZonesetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/AsyncSetNodeTemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/AsyncSetNodeTemplate.java new file mode 100644 index 000000000000..697cd624e0b1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/AsyncSetNodeTemplate.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SetNodeTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRequest; +import com.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest; +import com.google.longrunning.Operation; + +public class AsyncSetNodeTemplate { + + public static void main(String[] args) throws Exception { + asyncSetNodeTemplate(); + } + + public static void asyncSetNodeTemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + SetNodeTemplateNodeGroupRequest request = + SetNodeTemplateNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsSetNodeTemplateRequestResource( + NodeGroupsSetNodeTemplateRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeGroupsClient.setNodeTemplateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SetNodeTemplate_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/AsyncSetNodeTemplateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/AsyncSetNodeTemplateLRO.java new file mode 100644 index 000000000000..123196c4a314 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/AsyncSetNodeTemplateLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SetNodeTemplate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest; + +public class AsyncSetNodeTemplateLRO { + + public static void main(String[] args) throws Exception { + asyncSetNodeTemplateLRO(); + } + + public static void asyncSetNodeTemplateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + SetNodeTemplateNodeGroupRequest request = + SetNodeTemplateNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsSetNodeTemplateRequestResource( + NodeGroupsSetNodeTemplateRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + nodeGroupsClient.setNodeTemplateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SetNodeTemplate_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/SyncSetNodeTemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/SyncSetNodeTemplate.java new file mode 100644 index 000000000000..60e4ca6f85ce --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/SyncSetNodeTemplate.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SetNodeTemplate_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest; + +public class SyncSetNodeTemplate { + + public static void main(String[] args) throws Exception { + syncSetNodeTemplate(); + } + + public static void syncSetNodeTemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + SetNodeTemplateNodeGroupRequest request = + SetNodeTemplateNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsSetNodeTemplateRequestResource( + NodeGroupsSetNodeTemplateRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = nodeGroupsClient.setNodeTemplateAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SetNodeTemplate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/SyncSetNodeTemplateStringStringStringNodegroupssetnodetemplaterequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/SyncSetNodeTemplateStringStringStringNodegroupssetnodetemplaterequest.java new file mode 100644 index 000000000000..a25401f3ab1c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/setnodetemplate/SyncSetNodeTemplateStringStringStringNodegroupssetnodetemplaterequest.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SetNodeTemplate_StringStringStringNodegroupssetnodetemplaterequest_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRequest; +import com.google.cloud.compute.v1.Operation; + +public class SyncSetNodeTemplateStringStringStringNodegroupssetnodetemplaterequest { + + public static void main(String[] args) throws Exception { + syncSetNodeTemplateStringStringStringNodegroupssetnodetemplaterequest(); + } + + public static void syncSetNodeTemplateStringStringStringNodegroupssetnodetemplaterequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeGroup = "nodeGroup443599261"; + NodeGroupsSetNodeTemplateRequest nodeGroupsSetNodeTemplateRequestResource = + NodeGroupsSetNodeTemplateRequest.newBuilder().build(); + Operation response = + nodeGroupsClient + .setNodeTemplateAsync( + project, zone, nodeGroup, nodeGroupsSetNodeTemplateRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SetNodeTemplate_StringStringStringNodegroupssetnodetemplaterequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java new file mode 100644 index 000000000000..9fe3fc3525d8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/AsyncSimulateMaintenanceEvent.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SimulateMaintenanceEvent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest; +import com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest; +import com.google.longrunning.Operation; + +public class AsyncSimulateMaintenanceEvent { + + public static void main(String[] args) throws Exception { + asyncSimulateMaintenanceEvent(); + } + + public static void asyncSimulateMaintenanceEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + SimulateMaintenanceEventNodeGroupRequest request = + SimulateMaintenanceEventNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsSimulateMaintenanceEventRequestResource( + NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + ApiFuture future = + nodeGroupsClient.simulateMaintenanceEventCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SimulateMaintenanceEvent_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java new file mode 100644 index 000000000000..409742632abf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/AsyncSimulateMaintenanceEventLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SimulateMaintenanceEvent_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest; + +public class AsyncSimulateMaintenanceEventLRO { + + public static void main(String[] args) throws Exception { + asyncSimulateMaintenanceEventLRO(); + } + + public static void asyncSimulateMaintenanceEventLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + SimulateMaintenanceEventNodeGroupRequest request = + SimulateMaintenanceEventNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsSimulateMaintenanceEventRequestResource( + NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + OperationFuture future = + nodeGroupsClient.simulateMaintenanceEventOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SimulateMaintenanceEvent_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.java new file mode 100644 index 000000000000..f874b045e858 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/SyncSimulateMaintenanceEvent.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SimulateMaintenanceEvent_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest; + +public class SyncSimulateMaintenanceEvent { + + public static void main(String[] args) throws Exception { + syncSimulateMaintenanceEvent(); + } + + public static void syncSimulateMaintenanceEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + SimulateMaintenanceEventNodeGroupRequest request = + SimulateMaintenanceEventNodeGroupRequest.newBuilder() + .setNodeGroup("nodeGroup443599261") + .setNodeGroupsSimulateMaintenanceEventRequestResource( + NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setZone("zone3744684") + .build(); + Operation response = nodeGroupsClient.simulateMaintenanceEventAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SimulateMaintenanceEvent_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/SyncSimulateMaintenanceEventStringStringStringNodegroupssimulatemaintenanceeventrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/SyncSimulateMaintenanceEventStringStringStringNodegroupssimulatemaintenanceeventrequest.java new file mode 100644 index 000000000000..3c3c532fcddf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/simulatemaintenanceevent/SyncSimulateMaintenanceEventStringStringStringNodegroupssimulatemaintenanceeventrequest.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_SimulateMaintenanceEvent_StringStringStringNodegroupssimulatemaintenanceeventrequest_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.NodeGroupsSimulateMaintenanceEventRequest; +import com.google.cloud.compute.v1.Operation; + +public +class SyncSimulateMaintenanceEventStringStringStringNodegroupssimulatemaintenanceeventrequest { + + public static void main(String[] args) throws Exception { + syncSimulateMaintenanceEventStringStringStringNodegroupssimulatemaintenanceeventrequest(); + } + + public static void + syncSimulateMaintenanceEventStringStringStringNodegroupssimulatemaintenanceeventrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeGroup = "nodeGroup443599261"; + NodeGroupsSimulateMaintenanceEventRequest nodeGroupsSimulateMaintenanceEventRequestResource = + NodeGroupsSimulateMaintenanceEventRequest.newBuilder().build(); + Operation response = + nodeGroupsClient + .simulateMaintenanceEventAsync( + project, zone, nodeGroup, nodeGroupsSimulateMaintenanceEventRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_NodeGroups_SimulateMaintenanceEvent_StringStringStringNodegroupssimulatemaintenanceeventrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..eee784c3a21a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + TestIamPermissionsNodeGroupRequest request = + TestIamPermissionsNodeGroupRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = + nodeGroupsClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_NodeGroups_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..54606a6d5f93 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_TestIamPermissions_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + TestIamPermissionsNodeGroupRequest request = + TestIamPermissionsNodeGroupRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + TestPermissionsResponse response = nodeGroupsClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_NodeGroups_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..af59ce30b4a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroups_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.NodeGroupsClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeGroupsClient nodeGroupsClient = NodeGroupsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + nodeGroupsClient.testIamPermissions( + project, zone, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_NodeGroups_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroupssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroupssettings/get/SyncGet.java new file mode 100644 index 000000000000..da5e49606709 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodegroupssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeGroupsSettings_Get_sync] +import com.google.cloud.compute.v1.NodeGroupsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupsSettings.Builder nodeGroupsSettingsBuilder = NodeGroupsSettings.newBuilder(); + nodeGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + nodeGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NodeGroupsSettings nodeGroupsSettings = nodeGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NodeGroupsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..aa63966ef641 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.NodeTemplatesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + AggregatedListNodeTemplatesRequest request = + AggregatedListNodeTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + nodeTemplatesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTemplates_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..55100e78ac2f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest; +import com.google.cloud.compute.v1.NodeTemplateAggregatedList; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.NodeTemplatesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + AggregatedListNodeTemplatesRequest request = + AggregatedListNodeTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NodeTemplateAggregatedList response = + nodeTemplatesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NodeTemplates_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..16bac6e9d805 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.NodeTemplatesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + AggregatedListNodeTemplatesRequest request = + AggregatedListNodeTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + nodeTemplatesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTemplates_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..b117958b9a24 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_AggregatedList_String_sync] +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.NodeTemplatesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + nodeTemplatesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTemplates_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..1165f1419ba1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.NodeTemplatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeTemplatesSettings nodeTemplatesSettings = + NodeTemplatesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create(nodeTemplatesSettings); + } +} +// [END compute_v1_generated_NodeTemplates_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..579fe9685f18 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.NodeTemplatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeTemplatesSettings nodeTemplatesSettings = + NodeTemplatesSettings.newBuilder().setEndpoint(myEndpoint).build(); + NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create(nodeTemplatesSettings); + } +} +// [END compute_v1_generated_NodeTemplates_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/AsyncDelete.java new file mode 100644 index 000000000000..a5ef89ed830c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + DeleteNodeTemplateRequest request = + DeleteNodeTemplateRequest.newBuilder() + .setNodeTemplate("nodeTemplate2118368412") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = nodeTemplatesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..bbfbcfe20b30 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + DeleteNodeTemplateRequest request = + DeleteNodeTemplateRequest.newBuilder() + .setNodeTemplate("nodeTemplate2118368412") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + nodeTemplatesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/SyncDelete.java new file mode 100644 index 000000000000..bb603693982c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Delete_sync] +import com.google.cloud.compute.v1.DeleteNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + DeleteNodeTemplateRequest request = + DeleteNodeTemplateRequest.newBuilder() + .setNodeTemplate("nodeTemplate2118368412") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = nodeTemplatesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..9670324ad4e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String nodeTemplate = "nodeTemplate2118368412"; + Operation response = nodeTemplatesClient.deleteAsync(project, region, nodeTemplate).get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/AsyncGet.java new file mode 100644 index 000000000000..efad3e0c7438 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + GetNodeTemplateRequest request = + GetNodeTemplateRequest.newBuilder() + .setNodeTemplate("nodeTemplate2118368412") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = nodeTemplatesClient.getCallable().futureCall(request); + // Do something. + NodeTemplate response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/SyncGet.java new file mode 100644 index 000000000000..687ed3793b36 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Get_sync] +import com.google.cloud.compute.v1.GetNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + GetNodeTemplateRequest request = + GetNodeTemplateRequest.newBuilder() + .setNodeTemplate("nodeTemplate2118368412") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + NodeTemplate response = nodeTemplatesClient.get(request); + } + } +} +// [END compute_v1_generated_NodeTemplates_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..93f94beacbc7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Get_StringStringString_sync] +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String nodeTemplate = "nodeTemplate2118368412"; + NodeTemplate response = nodeTemplatesClient.get(project, region, nodeTemplate); + } + } +} +// [END compute_v1_generated_NodeTemplates_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..349c2beedda0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + GetIamPolicyNodeTemplateRequest request = + GetIamPolicyNodeTemplateRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + ApiFuture future = nodeTemplatesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..723126614970 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + GetIamPolicyNodeTemplateRequest request = + GetIamPolicyNodeTemplateRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + Policy response = nodeTemplatesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_NodeTemplates_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..85efda729435 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Policy; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + Policy response = nodeTemplatesClient.getIamPolicy(project, region, resource); + } + } +} +// [END compute_v1_generated_NodeTemplates_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/AsyncInsert.java new file mode 100644 index 000000000000..5b115a7483dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + InsertNodeTemplateRequest request = + InsertNodeTemplateRequest.newBuilder() + .setNodeTemplateResource(NodeTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = nodeTemplatesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..7dd7c2879888 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + InsertNodeTemplateRequest request = + InsertNodeTemplateRequest.newBuilder() + .setNodeTemplateResource(NodeTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + nodeTemplatesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/SyncInsert.java new file mode 100644 index 000000000000..6c7a8b120e37 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Insert_sync] +import com.google.cloud.compute.v1.InsertNodeTemplateRequest; +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + InsertNodeTemplateRequest request = + InsertNodeTemplateRequest.newBuilder() + .setNodeTemplateResource(NodeTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = nodeTemplatesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/SyncInsertStringStringNodetemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/SyncInsertStringStringNodetemplate.java new file mode 100644 index 000000000000..d2938e028f74 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/insert/SyncInsertStringStringNodetemplate.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_Insert_StringStringNodetemplate_sync] +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Operation; + +public class SyncInsertStringStringNodetemplate { + + public static void main(String[] args) throws Exception { + syncInsertStringStringNodetemplate(); + } + + public static void syncInsertStringStringNodetemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + NodeTemplate nodeTemplateResource = NodeTemplate.newBuilder().build(); + Operation response = + nodeTemplatesClient.insertAsync(project, region, nodeTemplateResource).get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_Insert_StringStringNodetemplate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/AsyncList.java new file mode 100644 index 000000000000..401bf181ba3b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListNodeTemplatesRequest; +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + ListNodeTemplatesRequest request = + ListNodeTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = nodeTemplatesClient.listPagedCallable().futureCall(request); + // Do something. + for (NodeTemplate element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTemplates_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/AsyncListPaged.java new file mode 100644 index 000000000000..ff9a743dccf4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_List_Paged_async] +import com.google.cloud.compute.v1.ListNodeTemplatesRequest; +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplateList; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + ListNodeTemplatesRequest request = + ListNodeTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NodeTemplateList response = nodeTemplatesClient.listCallable().call(request); + for (NodeTemplate element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NodeTemplates_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/SyncList.java new file mode 100644 index 000000000000..ba2c68c3da5e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_List_sync] +import com.google.cloud.compute.v1.ListNodeTemplatesRequest; +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + ListNodeTemplatesRequest request = + ListNodeTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (NodeTemplate element : nodeTemplatesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTemplates_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/SyncListStringString.java new file mode 100644 index 000000000000..db8593ddecad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_List_StringString_sync] +import com.google.cloud.compute.v1.NodeTemplate; +import com.google.cloud.compute.v1.NodeTemplatesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (NodeTemplate element : nodeTemplatesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTemplates_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..2f337aef091d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + SetIamPolicyNodeTemplateRequest request = + SetIamPolicyNodeTemplateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = nodeTemplatesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..fce5c2f2371a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_SetIamPolicy_sync] +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + SetIamPolicyNodeTemplateRequest request = + SetIamPolicyNodeTemplateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = nodeTemplatesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_NodeTemplates_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java new file mode 100644 index 000000000000..75c99f48940d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringRegionsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringRegionsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringRegionsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetPolicyRequest regionSetPolicyRequestResource = + RegionSetPolicyRequest.newBuilder().build(); + Policy response = + nodeTemplatesClient.setIamPolicy( + project, region, resource, regionSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_NodeTemplates_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..5a36ccda302d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + TestIamPermissionsNodeTemplateRequest request = + TestIamPermissionsNodeTemplateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + nodeTemplatesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTemplates_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..abaf26b482ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_TestIamPermissions_sync] +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + TestIamPermissionsNodeTemplateRequest request = + TestIamPermissionsNodeTemplateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = nodeTemplatesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_NodeTemplates_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..3dd686925324 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplates/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplates_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.NodeTemplatesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTemplatesClient nodeTemplatesClient = NodeTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + nodeTemplatesClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_NodeTemplates_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplatessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplatessettings/get/SyncGet.java new file mode 100644 index 000000000000..8e6a05f6dc44 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetemplatessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTemplatesSettings_Get_sync] +import com.google.cloud.compute.v1.NodeTemplatesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeTemplatesSettings.Builder nodeTemplatesSettingsBuilder = NodeTemplatesSettings.newBuilder(); + nodeTemplatesSettingsBuilder + .getSettings() + .setRetrySettings( + nodeTemplatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NodeTemplatesSettings nodeTemplatesSettings = nodeTemplatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NodeTemplatesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..9c2008c504c7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListNodeTypesRequest; +import com.google.cloud.compute.v1.NodeTypesClient; +import com.google.cloud.compute.v1.NodeTypesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + AggregatedListNodeTypesRequest request = + AggregatedListNodeTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + nodeTypesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTypes_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..f76b590a9313 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListNodeTypesRequest; +import com.google.cloud.compute.v1.NodeTypeAggregatedList; +import com.google.cloud.compute.v1.NodeTypesClient; +import com.google.cloud.compute.v1.NodeTypesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + AggregatedListNodeTypesRequest request = + AggregatedListNodeTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NodeTypeAggregatedList response = nodeTypesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NodeTypes_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..ebc0879ebe0d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListNodeTypesRequest; +import com.google.cloud.compute.v1.NodeTypesClient; +import com.google.cloud.compute.v1.NodeTypesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + AggregatedListNodeTypesRequest request = + AggregatedListNodeTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + nodeTypesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTypes_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..c982c6c0e152 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_AggregatedList_String_sync] +import com.google.cloud.compute.v1.NodeTypesClient; +import com.google.cloud.compute.v1.NodeTypesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + nodeTypesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTypes_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..df95195850ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.NodeTypesClient; +import com.google.cloud.compute.v1.NodeTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeTypesSettings nodeTypesSettings = + NodeTypesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NodeTypesClient nodeTypesClient = NodeTypesClient.create(nodeTypesSettings); + } +} +// [END compute_v1_generated_NodeTypes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..aefe7d3e5c3d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.NodeTypesClient; +import com.google.cloud.compute.v1.NodeTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeTypesSettings nodeTypesSettings = + NodeTypesSettings.newBuilder().setEndpoint(myEndpoint).build(); + NodeTypesClient nodeTypesClient = NodeTypesClient.create(nodeTypesSettings); + } +} +// [END compute_v1_generated_NodeTypes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/AsyncGet.java new file mode 100644 index 000000000000..49f1da6a5661 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetNodeTypeRequest; +import com.google.cloud.compute.v1.NodeType; +import com.google.cloud.compute.v1.NodeTypesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + GetNodeTypeRequest request = + GetNodeTypeRequest.newBuilder() + .setNodeType("nodeType1123082332") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = nodeTypesClient.getCallable().futureCall(request); + // Do something. + NodeType response = future.get(); + } + } +} +// [END compute_v1_generated_NodeTypes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/SyncGet.java new file mode 100644 index 000000000000..48a82368a932 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_Get_sync] +import com.google.cloud.compute.v1.GetNodeTypeRequest; +import com.google.cloud.compute.v1.NodeType; +import com.google.cloud.compute.v1.NodeTypesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + GetNodeTypeRequest request = + GetNodeTypeRequest.newBuilder() + .setNodeType("nodeType1123082332") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + NodeType response = nodeTypesClient.get(request); + } + } +} +// [END compute_v1_generated_NodeTypes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..674a111452cd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_Get_StringStringString_sync] +import com.google.cloud.compute.v1.NodeType; +import com.google.cloud.compute.v1.NodeTypesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String nodeType = "nodeType1123082332"; + NodeType response = nodeTypesClient.get(project, zone, nodeType); + } + } +} +// [END compute_v1_generated_NodeTypes_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/AsyncList.java new file mode 100644 index 000000000000..6ce9f5758b4b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListNodeTypesRequest; +import com.google.cloud.compute.v1.NodeType; +import com.google.cloud.compute.v1.NodeTypesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + ListNodeTypesRequest request = + ListNodeTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = nodeTypesClient.listPagedCallable().futureCall(request); + // Do something. + for (NodeType element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTypes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/AsyncListPaged.java new file mode 100644 index 000000000000..e7d4f59e6ba7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_List_Paged_async] +import com.google.cloud.compute.v1.ListNodeTypesRequest; +import com.google.cloud.compute.v1.NodeType; +import com.google.cloud.compute.v1.NodeTypeList; +import com.google.cloud.compute.v1.NodeTypesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + ListNodeTypesRequest request = + ListNodeTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + NodeTypeList response = nodeTypesClient.listCallable().call(request); + for (NodeType element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_NodeTypes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/SyncList.java new file mode 100644 index 000000000000..bfac97217933 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_List_sync] +import com.google.cloud.compute.v1.ListNodeTypesRequest; +import com.google.cloud.compute.v1.NodeType; +import com.google.cloud.compute.v1.NodeTypesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + ListNodeTypesRequest request = + ListNodeTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (NodeType element : nodeTypesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTypes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/SyncListStringString.java new file mode 100644 index 000000000000..ee4f9bd8d529 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypes/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypes_List_StringString_sync] +import com.google.cloud.compute.v1.NodeType; +import com.google.cloud.compute.v1.NodeTypesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (NodeTypesClient nodeTypesClient = NodeTypesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (NodeType element : nodeTypesClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_NodeTypes_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypessettings/get/SyncGet.java new file mode 100644 index 000000000000..1c692b5ac91f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/nodetypessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_NodeTypesSettings_Get_sync] +import com.google.cloud.compute.v1.NodeTypesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeTypesSettings.Builder nodeTypesSettingsBuilder = NodeTypesSettings.newBuilder(); + nodeTypesSettingsBuilder + .getSettings() + .setRetrySettings( + nodeTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NodeTypesSettings nodeTypesSettings = nodeTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NodeTypesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..8ec6c6a90895 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PacketMirroringsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + AggregatedListPacketMirroringsRequest request = + AggregatedListPacketMirroringsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + packetMirroringsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PacketMirrorings_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..54cdbc41eac7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest; +import com.google.cloud.compute.v1.PacketMirroringAggregatedList; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PacketMirroringsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + AggregatedListPacketMirroringsRequest request = + AggregatedListPacketMirroringsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + PacketMirroringAggregatedList response = + packetMirroringsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_PacketMirrorings_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..a7441aba76f0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PacketMirroringsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + AggregatedListPacketMirroringsRequest request = + AggregatedListPacketMirroringsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + packetMirroringsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PacketMirrorings_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..0cb875bcf5a7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_AggregatedList_String_sync] +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PacketMirroringsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + packetMirroringsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PacketMirrorings_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a61cbd5a2143 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PacketMirroringsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PacketMirroringsSettings packetMirroringsSettings = + PacketMirroringsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PacketMirroringsClient packetMirroringsClient = + PacketMirroringsClient.create(packetMirroringsSettings); + } +} +// [END compute_v1_generated_PacketMirrorings_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..8d3dfc5aec1f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PacketMirroringsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PacketMirroringsSettings packetMirroringsSettings = + PacketMirroringsSettings.newBuilder().setEndpoint(myEndpoint).build(); + PacketMirroringsClient packetMirroringsClient = + PacketMirroringsClient.create(packetMirroringsSettings); + } +} +// [END compute_v1_generated_PacketMirrorings_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/AsyncDelete.java new file mode 100644 index 000000000000..4b481ad7b02b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeletePacketMirroringRequest; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + DeletePacketMirroringRequest request = + DeletePacketMirroringRequest.newBuilder() + .setPacketMirroring("packetMirroring1405520923") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = packetMirroringsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..ae70a878a70f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeletePacketMirroringRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + DeletePacketMirroringRequest request = + DeletePacketMirroringRequest.newBuilder() + .setPacketMirroring("packetMirroring1405520923") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + packetMirroringsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/SyncDelete.java new file mode 100644 index 000000000000..066fbf9d748a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Delete_sync] +import com.google.cloud.compute.v1.DeletePacketMirroringRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + DeletePacketMirroringRequest request = + DeletePacketMirroringRequest.newBuilder() + .setPacketMirroring("packetMirroring1405520923") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = packetMirroringsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..6093f0f43cdd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String packetMirroring = "packetMirroring1405520923"; + Operation response = + packetMirroringsClient.deleteAsync(project, region, packetMirroring).get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/AsyncGet.java new file mode 100644 index 000000000000..315e7307e9f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetPacketMirroringRequest; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + GetPacketMirroringRequest request = + GetPacketMirroringRequest.newBuilder() + .setPacketMirroring("packetMirroring1405520923") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = packetMirroringsClient.getCallable().futureCall(request); + // Do something. + PacketMirroring response = future.get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/SyncGet.java new file mode 100644 index 000000000000..e3325cd3f81e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Get_sync] +import com.google.cloud.compute.v1.GetPacketMirroringRequest; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + GetPacketMirroringRequest request = + GetPacketMirroringRequest.newBuilder() + .setPacketMirroring("packetMirroring1405520923") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + PacketMirroring response = packetMirroringsClient.get(request); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..87562c6e7760 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Get_StringStringString_sync] +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String packetMirroring = "packetMirroring1405520923"; + PacketMirroring response = packetMirroringsClient.get(project, region, packetMirroring); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/AsyncInsert.java new file mode 100644 index 000000000000..a970c27bbb14 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertPacketMirroringRequest; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + InsertPacketMirroringRequest request = + InsertPacketMirroringRequest.newBuilder() + .setPacketMirroringResource(PacketMirroring.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = packetMirroringsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..f2e1461e6c09 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertPacketMirroringRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + InsertPacketMirroringRequest request = + InsertPacketMirroringRequest.newBuilder() + .setPacketMirroringResource(PacketMirroring.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + packetMirroringsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/SyncInsert.java new file mode 100644 index 000000000000..ebce800d01ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Insert_sync] +import com.google.cloud.compute.v1.InsertPacketMirroringRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + InsertPacketMirroringRequest request = + InsertPacketMirroringRequest.newBuilder() + .setPacketMirroringResource(PacketMirroring.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = packetMirroringsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/SyncInsertStringStringPacketmirroring.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/SyncInsertStringStringPacketmirroring.java new file mode 100644 index 000000000000..5d463cb9f37c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/insert/SyncInsertStringStringPacketmirroring.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Insert_StringStringPacketmirroring_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncInsertStringStringPacketmirroring { + + public static void main(String[] args) throws Exception { + syncInsertStringStringPacketmirroring(); + } + + public static void syncInsertStringStringPacketmirroring() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + PacketMirroring packetMirroringResource = PacketMirroring.newBuilder().build(); + Operation response = + packetMirroringsClient.insertAsync(project, region, packetMirroringResource).get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Insert_StringStringPacketmirroring_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/AsyncList.java new file mode 100644 index 000000000000..6e84d8700e32 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListPacketMirroringsRequest; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + ListPacketMirroringsRequest request = + ListPacketMirroringsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + packetMirroringsClient.listPagedCallable().futureCall(request); + // Do something. + for (PacketMirroring element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PacketMirrorings_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/AsyncListPaged.java new file mode 100644 index 000000000000..a08ffb561385 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_List_Paged_async] +import com.google.cloud.compute.v1.ListPacketMirroringsRequest; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringList; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + ListPacketMirroringsRequest request = + ListPacketMirroringsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + PacketMirroringList response = packetMirroringsClient.listCallable().call(request); + for (PacketMirroring element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_PacketMirrorings_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/SyncList.java new file mode 100644 index 000000000000..2c01208532f6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_List_sync] +import com.google.cloud.compute.v1.ListPacketMirroringsRequest; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + ListPacketMirroringsRequest request = + ListPacketMirroringsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (PacketMirroring element : packetMirroringsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PacketMirrorings_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/SyncListStringString.java new file mode 100644 index 000000000000..ed789c059feb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_List_StringString_sync] +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (PacketMirroring element : packetMirroringsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PacketMirrorings_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/AsyncPatch.java new file mode 100644 index 000000000000..aad17c638e8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PatchPacketMirroringRequest; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + PatchPacketMirroringRequest request = + PatchPacketMirroringRequest.newBuilder() + .setPacketMirroring("packetMirroring1405520923") + .setPacketMirroringResource(PacketMirroring.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = packetMirroringsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..bdab580adc40 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PatchPacketMirroringRequest; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + PatchPacketMirroringRequest request = + PatchPacketMirroringRequest.newBuilder() + .setPacketMirroring("packetMirroring1405520923") + .setPacketMirroringResource(PacketMirroring.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + packetMirroringsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/SyncPatch.java new file mode 100644 index 000000000000..62b0f6d8b283 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.PatchPacketMirroringRequest; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + PatchPacketMirroringRequest request = + PatchPacketMirroringRequest.newBuilder() + .setPacketMirroring("packetMirroring1405520923") + .setPacketMirroringResource(PacketMirroring.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = packetMirroringsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/SyncPatchStringStringStringPacketmirroring.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/SyncPatchStringStringStringPacketmirroring.java new file mode 100644 index 000000000000..b6bf28157641 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/patch/SyncPatchStringStringStringPacketmirroring.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_Patch_StringStringStringPacketmirroring_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PacketMirroring; +import com.google.cloud.compute.v1.PacketMirroringsClient; + +public class SyncPatchStringStringStringPacketmirroring { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringPacketmirroring(); + } + + public static void syncPatchStringStringStringPacketmirroring() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String packetMirroring = "packetMirroring1405520923"; + PacketMirroring packetMirroringResource = PacketMirroring.newBuilder().build(); + Operation response = + packetMirroringsClient + .patchAsync(project, region, packetMirroring, packetMirroringResource) + .get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_Patch_StringStringStringPacketmirroring_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..0a1433653c86 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + TestIamPermissionsPacketMirroringRequest request = + TestIamPermissionsPacketMirroringRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + packetMirroringsClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_PacketMirrorings_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..eec83f3c8fec --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_TestIamPermissions_sync] +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + TestIamPermissionsPacketMirroringRequest request = + TestIamPermissionsPacketMirroringRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = packetMirroringsClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_PacketMirrorings_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..b35411e3ae19 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirrorings/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirrorings_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.PacketMirroringsClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + packetMirroringsClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_PacketMirrorings_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirroringssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirroringssettings/get/SyncGet.java new file mode 100644 index 000000000000..5ff4979cec45 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/packetmirroringssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_PacketMirroringsSettings_Get_sync] +import com.google.cloud.compute.v1.PacketMirroringsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PacketMirroringsSettings.Builder packetMirroringsSettingsBuilder = + PacketMirroringsSettings.newBuilder(); + packetMirroringsSettingsBuilder + .getSettings() + .setRetrySettings( + packetMirroringsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PacketMirroringsSettings packetMirroringsSettings = packetMirroringsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_PacketMirroringsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a51ecf0b91b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProjectsSettings projectsSettings = + ProjectsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ProjectsClient projectsClient = ProjectsClient.create(projectsSettings); + } +} +// [END compute_v1_generated_Projects_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e7d5af797c7b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProjectsSettings projectsSettings = + ProjectsSettings.newBuilder().setEndpoint(myEndpoint).build(); + ProjectsClient projectsClient = ProjectsClient.create(projectsSettings); + } +} +// [END compute_v1_generated_Projects_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/AsyncDisableXpnHost.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/AsyncDisableXpnHost.java new file mode 100644 index 000000000000..7b73ed1a2d6b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/AsyncDisableXpnHost.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_DisableXpnHost_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisableXpnHostProjectRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.longrunning.Operation; + +public class AsyncDisableXpnHost { + + public static void main(String[] args) throws Exception { + asyncDisableXpnHost(); + } + + public static void asyncDisableXpnHost() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + DisableXpnHostProjectRequest request = + DisableXpnHostProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = projectsClient.disableXpnHostCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_DisableXpnHost_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/AsyncDisableXpnHostLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/AsyncDisableXpnHostLRO.java new file mode 100644 index 000000000000..c5c705e12374 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/AsyncDisableXpnHostLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_DisableXpnHost_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DisableXpnHostProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class AsyncDisableXpnHostLRO { + + public static void main(String[] args) throws Exception { + asyncDisableXpnHostLRO(); + } + + public static void asyncDisableXpnHostLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + DisableXpnHostProjectRequest request = + DisableXpnHostProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + projectsClient.disableXpnHostOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_DisableXpnHost_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/SyncDisableXpnHost.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/SyncDisableXpnHost.java new file mode 100644 index 000000000000..c378fe526ca6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/SyncDisableXpnHost.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_DisableXpnHost_sync] +import com.google.cloud.compute.v1.DisableXpnHostProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncDisableXpnHost { + + public static void main(String[] args) throws Exception { + syncDisableXpnHost(); + } + + public static void syncDisableXpnHost() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + DisableXpnHostProjectRequest request = + DisableXpnHostProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = projectsClient.disableXpnHostAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_DisableXpnHost_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/SyncDisableXpnHostString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/SyncDisableXpnHostString.java new file mode 100644 index 000000000000..ed33c8383157 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnhost/SyncDisableXpnHostString.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_DisableXpnHost_String_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncDisableXpnHostString { + + public static void main(String[] args) throws Exception { + syncDisableXpnHostString(); + } + + public static void syncDisableXpnHostString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + Operation response = projectsClient.disableXpnHostAsync(project).get(); + } + } +} +// [END compute_v1_generated_Projects_DisableXpnHost_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/AsyncDisableXpnResource.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/AsyncDisableXpnResource.java new file mode 100644 index 000000000000..d4491b240144 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/AsyncDisableXpnResource.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_DisableXpnResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DisableXpnResourceProjectRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsDisableXpnResourceRequest; +import com.google.longrunning.Operation; + +public class AsyncDisableXpnResource { + + public static void main(String[] args) throws Exception { + asyncDisableXpnResource(); + } + + public static void asyncDisableXpnResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + DisableXpnResourceProjectRequest request = + DisableXpnResourceProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsDisableXpnResourceRequestResource( + ProjectsDisableXpnResourceRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = projectsClient.disableXpnResourceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_DisableXpnResource_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/AsyncDisableXpnResourceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/AsyncDisableXpnResourceLRO.java new file mode 100644 index 000000000000..ac41a13dc2fb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/AsyncDisableXpnResourceLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_DisableXpnResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DisableXpnResourceProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsDisableXpnResourceRequest; + +public class AsyncDisableXpnResourceLRO { + + public static void main(String[] args) throws Exception { + asyncDisableXpnResourceLRO(); + } + + public static void asyncDisableXpnResourceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + DisableXpnResourceProjectRequest request = + DisableXpnResourceProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsDisableXpnResourceRequestResource( + ProjectsDisableXpnResourceRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + projectsClient.disableXpnResourceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_DisableXpnResource_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/SyncDisableXpnResource.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/SyncDisableXpnResource.java new file mode 100644 index 000000000000..88e12bcf2ffa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/SyncDisableXpnResource.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_DisableXpnResource_sync] +import com.google.cloud.compute.v1.DisableXpnResourceProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsDisableXpnResourceRequest; + +public class SyncDisableXpnResource { + + public static void main(String[] args) throws Exception { + syncDisableXpnResource(); + } + + public static void syncDisableXpnResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + DisableXpnResourceProjectRequest request = + DisableXpnResourceProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsDisableXpnResourceRequestResource( + ProjectsDisableXpnResourceRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = projectsClient.disableXpnResourceAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_DisableXpnResource_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/SyncDisableXpnResourceStringProjectsdisablexpnresourcerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/SyncDisableXpnResourceStringProjectsdisablexpnresourcerequest.java new file mode 100644 index 000000000000..ec0c251a7def --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/disablexpnresource/SyncDisableXpnResourceStringProjectsdisablexpnresourcerequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_DisableXpnResource_StringProjectsdisablexpnresourcerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsDisableXpnResourceRequest; + +public class SyncDisableXpnResourceStringProjectsdisablexpnresourcerequest { + + public static void main(String[] args) throws Exception { + syncDisableXpnResourceStringProjectsdisablexpnresourcerequest(); + } + + public static void syncDisableXpnResourceStringProjectsdisablexpnresourcerequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = + ProjectsDisableXpnResourceRequest.newBuilder().build(); + Operation response = + projectsClient + .disableXpnResourceAsync(project, projectsDisableXpnResourceRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Projects_DisableXpnResource_StringProjectsdisablexpnresourcerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/AsyncEnableXpnHost.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/AsyncEnableXpnHost.java new file mode 100644 index 000000000000..ddd3ffeea634 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/AsyncEnableXpnHost.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_EnableXpnHost_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.EnableXpnHostProjectRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.longrunning.Operation; + +public class AsyncEnableXpnHost { + + public static void main(String[] args) throws Exception { + asyncEnableXpnHost(); + } + + public static void asyncEnableXpnHost() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + EnableXpnHostProjectRequest request = + EnableXpnHostProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = projectsClient.enableXpnHostCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_EnableXpnHost_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/AsyncEnableXpnHostLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/AsyncEnableXpnHostLRO.java new file mode 100644 index 000000000000..5dca9947171c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/AsyncEnableXpnHostLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_EnableXpnHost_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.EnableXpnHostProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class AsyncEnableXpnHostLRO { + + public static void main(String[] args) throws Exception { + asyncEnableXpnHostLRO(); + } + + public static void asyncEnableXpnHostLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + EnableXpnHostProjectRequest request = + EnableXpnHostProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + projectsClient.enableXpnHostOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_EnableXpnHost_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/SyncEnableXpnHost.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/SyncEnableXpnHost.java new file mode 100644 index 000000000000..8b758e8a4b6a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/SyncEnableXpnHost.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_EnableXpnHost_sync] +import com.google.cloud.compute.v1.EnableXpnHostProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncEnableXpnHost { + + public static void main(String[] args) throws Exception { + syncEnableXpnHost(); + } + + public static void syncEnableXpnHost() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + EnableXpnHostProjectRequest request = + EnableXpnHostProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = projectsClient.enableXpnHostAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_EnableXpnHost_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/SyncEnableXpnHostString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/SyncEnableXpnHostString.java new file mode 100644 index 000000000000..b2f9cf8d2b04 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnhost/SyncEnableXpnHostString.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_EnableXpnHost_String_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncEnableXpnHostString { + + public static void main(String[] args) throws Exception { + syncEnableXpnHostString(); + } + + public static void syncEnableXpnHostString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + Operation response = projectsClient.enableXpnHostAsync(project).get(); + } + } +} +// [END compute_v1_generated_Projects_EnableXpnHost_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/AsyncEnableXpnResource.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/AsyncEnableXpnResource.java new file mode 100644 index 000000000000..e43cb1f96e56 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/AsyncEnableXpnResource.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_EnableXpnResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.EnableXpnResourceProjectRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsEnableXpnResourceRequest; +import com.google.longrunning.Operation; + +public class AsyncEnableXpnResource { + + public static void main(String[] args) throws Exception { + asyncEnableXpnResource(); + } + + public static void asyncEnableXpnResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + EnableXpnResourceProjectRequest request = + EnableXpnResourceProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsEnableXpnResourceRequestResource( + ProjectsEnableXpnResourceRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = projectsClient.enableXpnResourceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_EnableXpnResource_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/AsyncEnableXpnResourceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/AsyncEnableXpnResourceLRO.java new file mode 100644 index 000000000000..643d82857b30 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/AsyncEnableXpnResourceLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_EnableXpnResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.EnableXpnResourceProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsEnableXpnResourceRequest; + +public class AsyncEnableXpnResourceLRO { + + public static void main(String[] args) throws Exception { + asyncEnableXpnResourceLRO(); + } + + public static void asyncEnableXpnResourceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + EnableXpnResourceProjectRequest request = + EnableXpnResourceProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsEnableXpnResourceRequestResource( + ProjectsEnableXpnResourceRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + projectsClient.enableXpnResourceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_EnableXpnResource_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/SyncEnableXpnResource.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/SyncEnableXpnResource.java new file mode 100644 index 000000000000..238753677fcc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/SyncEnableXpnResource.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_EnableXpnResource_sync] +import com.google.cloud.compute.v1.EnableXpnResourceProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsEnableXpnResourceRequest; + +public class SyncEnableXpnResource { + + public static void main(String[] args) throws Exception { + syncEnableXpnResource(); + } + + public static void syncEnableXpnResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + EnableXpnResourceProjectRequest request = + EnableXpnResourceProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsEnableXpnResourceRequestResource( + ProjectsEnableXpnResourceRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = projectsClient.enableXpnResourceAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_EnableXpnResource_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/SyncEnableXpnResourceStringProjectsenablexpnresourcerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/SyncEnableXpnResourceStringProjectsenablexpnresourcerequest.java new file mode 100644 index 000000000000..b41844ce1bc9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/enablexpnresource/SyncEnableXpnResourceStringProjectsenablexpnresourcerequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_EnableXpnResource_StringProjectsenablexpnresourcerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsEnableXpnResourceRequest; + +public class SyncEnableXpnResourceStringProjectsenablexpnresourcerequest { + + public static void main(String[] args) throws Exception { + syncEnableXpnResourceStringProjectsenablexpnresourcerequest(); + } + + public static void syncEnableXpnResourceStringProjectsenablexpnresourcerequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = + ProjectsEnableXpnResourceRequest.newBuilder().build(); + Operation response = + projectsClient + .enableXpnResourceAsync(project, projectsEnableXpnResourceRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Projects_EnableXpnResource_StringProjectsenablexpnresourcerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/AsyncGet.java new file mode 100644 index 000000000000..11263b24ab8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetProjectRequest; +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + GetProjectRequest request = + GetProjectRequest.newBuilder().setProject("project-309310695").build(); + ApiFuture future = projectsClient.getCallable().futureCall(request); + // Do something. + Project response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/SyncGet.java new file mode 100644 index 000000000000..344a62862acf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_Get_sync] +import com.google.cloud.compute.v1.GetProjectRequest; +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + GetProjectRequest request = + GetProjectRequest.newBuilder().setProject("project-309310695").build(); + Project response = projectsClient.get(request); + } + } +} +// [END compute_v1_generated_Projects_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/SyncGetString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/SyncGetString.java new file mode 100644 index 000000000000..054905071de6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/get/SyncGetString.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_Get_String_sync] +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncGetString { + + public static void main(String[] args) throws Exception { + syncGetString(); + } + + public static void syncGetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + Project response = projectsClient.get(project); + } + } +} +// [END compute_v1_generated_Projects_Get_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/AsyncGetXpnHost.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/AsyncGetXpnHost.java new file mode 100644 index 000000000000..2292f8c15118 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/AsyncGetXpnHost.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_GetXpnHost_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetXpnHostProjectRequest; +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; + +public class AsyncGetXpnHost { + + public static void main(String[] args) throws Exception { + asyncGetXpnHost(); + } + + public static void asyncGetXpnHost() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + GetXpnHostProjectRequest request = + GetXpnHostProjectRequest.newBuilder().setProject("project-309310695").build(); + ApiFuture future = projectsClient.getXpnHostCallable().futureCall(request); + // Do something. + Project response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_GetXpnHost_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/SyncGetXpnHost.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/SyncGetXpnHost.java new file mode 100644 index 000000000000..b1d1709cf6d5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/SyncGetXpnHost.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_GetXpnHost_sync] +import com.google.cloud.compute.v1.GetXpnHostProjectRequest; +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncGetXpnHost { + + public static void main(String[] args) throws Exception { + syncGetXpnHost(); + } + + public static void syncGetXpnHost() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + GetXpnHostProjectRequest request = + GetXpnHostProjectRequest.newBuilder().setProject("project-309310695").build(); + Project response = projectsClient.getXpnHost(request); + } + } +} +// [END compute_v1_generated_Projects_GetXpnHost_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/SyncGetXpnHostString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/SyncGetXpnHostString.java new file mode 100644 index 000000000000..cd7c3f02c257 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnhost/SyncGetXpnHostString.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_GetXpnHost_String_sync] +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncGetXpnHostString { + + public static void main(String[] args) throws Exception { + syncGetXpnHostString(); + } + + public static void syncGetXpnHostString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + Project response = projectsClient.getXpnHost(project); + } + } +} +// [END compute_v1_generated_Projects_GetXpnHost_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/AsyncGetXpnResources.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/AsyncGetXpnResources.java new file mode 100644 index 000000000000..214a87bd9ad7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/AsyncGetXpnResources.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_GetXpnResources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetXpnResourcesProjectsRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.XpnResourceId; + +public class AsyncGetXpnResources { + + public static void main(String[] args) throws Exception { + asyncGetXpnResources(); + } + + public static void asyncGetXpnResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + GetXpnResourcesProjectsRequest request = + GetXpnResourcesProjectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + projectsClient.getXpnResourcesPagedCallable().futureCall(request); + // Do something. + for (XpnResourceId element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Projects_GetXpnResources_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/AsyncGetXpnResourcesPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/AsyncGetXpnResourcesPaged.java new file mode 100644 index 000000000000..22dfc57a7540 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/AsyncGetXpnResourcesPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_GetXpnResources_Paged_async] +import com.google.cloud.compute.v1.GetXpnResourcesProjectsRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsGetXpnResources; +import com.google.cloud.compute.v1.XpnResourceId; +import com.google.common.base.Strings; + +public class AsyncGetXpnResourcesPaged { + + public static void main(String[] args) throws Exception { + asyncGetXpnResourcesPaged(); + } + + public static void asyncGetXpnResourcesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + GetXpnResourcesProjectsRequest request = + GetXpnResourcesProjectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ProjectsGetXpnResources response = projectsClient.getXpnResourcesCallable().call(request); + for (XpnResourceId element : response.getResourcesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Projects_GetXpnResources_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/SyncGetXpnResources.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/SyncGetXpnResources.java new file mode 100644 index 000000000000..898f156bcc8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/SyncGetXpnResources.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_GetXpnResources_sync] +import com.google.cloud.compute.v1.GetXpnResourcesProjectsRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.XpnResourceId; + +public class SyncGetXpnResources { + + public static void main(String[] args) throws Exception { + syncGetXpnResources(); + } + + public static void syncGetXpnResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + GetXpnResourcesProjectsRequest request = + GetXpnResourcesProjectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (XpnResourceId element : projectsClient.getXpnResources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Projects_GetXpnResources_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/SyncGetXpnResourcesString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/SyncGetXpnResourcesString.java new file mode 100644 index 000000000000..d84cc5796b72 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/getxpnresources/SyncGetXpnResourcesString.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_GetXpnResources_String_sync] +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.XpnResourceId; + +public class SyncGetXpnResourcesString { + + public static void main(String[] args) throws Exception { + syncGetXpnResourcesString(); + } + + public static void syncGetXpnResourcesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + for (XpnResourceId element : projectsClient.getXpnResources(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Projects_GetXpnResources_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/AsyncListXpnHosts.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/AsyncListXpnHosts.java new file mode 100644 index 000000000000..3c868760a46d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/AsyncListXpnHosts.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_ListXpnHosts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListXpnHostsProjectsRequest; +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsListXpnHostsRequest; + +public class AsyncListXpnHosts { + + public static void main(String[] args) throws Exception { + asyncListXpnHosts(); + } + + public static void asyncListXpnHosts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + ListXpnHostsProjectsRequest request = + ListXpnHostsProjectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setProjectsListXpnHostsRequestResource( + ProjectsListXpnHostsRequest.newBuilder().build()) + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = projectsClient.listXpnHostsPagedCallable().futureCall(request); + // Do something. + for (Project element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Projects_ListXpnHosts_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/AsyncListXpnHostsPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/AsyncListXpnHostsPaged.java new file mode 100644 index 000000000000..9ffbb589b524 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/AsyncListXpnHostsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_ListXpnHosts_Paged_async] +import com.google.cloud.compute.v1.ListXpnHostsProjectsRequest; +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsListXpnHostsRequest; +import com.google.cloud.compute.v1.XpnHostList; +import com.google.common.base.Strings; + +public class AsyncListXpnHostsPaged { + + public static void main(String[] args) throws Exception { + asyncListXpnHostsPaged(); + } + + public static void asyncListXpnHostsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + ListXpnHostsProjectsRequest request = + ListXpnHostsProjectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setProjectsListXpnHostsRequestResource( + ProjectsListXpnHostsRequest.newBuilder().build()) + .setReturnPartialSuccess(true) + .build(); + while (true) { + XpnHostList response = projectsClient.listXpnHostsCallable().call(request); + for (Project element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Projects_ListXpnHosts_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/SyncListXpnHosts.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/SyncListXpnHosts.java new file mode 100644 index 000000000000..1450afac713d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/SyncListXpnHosts.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_ListXpnHosts_sync] +import com.google.cloud.compute.v1.ListXpnHostsProjectsRequest; +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsListXpnHostsRequest; + +public class SyncListXpnHosts { + + public static void main(String[] args) throws Exception { + syncListXpnHosts(); + } + + public static void syncListXpnHosts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + ListXpnHostsProjectsRequest request = + ListXpnHostsProjectsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setProjectsListXpnHostsRequestResource( + ProjectsListXpnHostsRequest.newBuilder().build()) + .setReturnPartialSuccess(true) + .build(); + for (Project element : projectsClient.listXpnHosts(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Projects_ListXpnHosts_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/SyncListXpnHostsStringProjectslistxpnhostsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/SyncListXpnHostsStringProjectslistxpnhostsrequest.java new file mode 100644 index 000000000000..365c8916e27e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/listxpnhosts/SyncListXpnHostsStringProjectslistxpnhostsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_ListXpnHosts_StringProjectslistxpnhostsrequest_sync] +import com.google.cloud.compute.v1.Project; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsListXpnHostsRequest; + +public class SyncListXpnHostsStringProjectslistxpnhostsrequest { + + public static void main(String[] args) throws Exception { + syncListXpnHostsStringProjectslistxpnhostsrequest(); + } + + public static void syncListXpnHostsStringProjectslistxpnhostsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource = + ProjectsListXpnHostsRequest.newBuilder().build(); + for (Project element : + projectsClient.listXpnHosts(project, projectsListXpnHostsRequestResource).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Projects_ListXpnHosts_StringProjectslistxpnhostsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/AsyncMoveDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/AsyncMoveDisk.java new file mode 100644 index 000000000000..ada842c82c11 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/AsyncMoveDisk.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_MoveDisk_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DiskMoveRequest; +import com.google.cloud.compute.v1.MoveDiskProjectRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.longrunning.Operation; + +public class AsyncMoveDisk { + + public static void main(String[] args) throws Exception { + asyncMoveDisk(); + } + + public static void asyncMoveDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + MoveDiskProjectRequest request = + MoveDiskProjectRequest.newBuilder() + .setDiskMoveRequestResource(DiskMoveRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = projectsClient.moveDiskCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_MoveDisk_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/AsyncMoveDiskLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/AsyncMoveDiskLRO.java new file mode 100644 index 000000000000..2c26d34be156 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/AsyncMoveDiskLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_MoveDisk_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DiskMoveRequest; +import com.google.cloud.compute.v1.MoveDiskProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class AsyncMoveDiskLRO { + + public static void main(String[] args) throws Exception { + asyncMoveDiskLRO(); + } + + public static void asyncMoveDiskLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + MoveDiskProjectRequest request = + MoveDiskProjectRequest.newBuilder() + .setDiskMoveRequestResource(DiskMoveRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + projectsClient.moveDiskOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_MoveDisk_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/SyncMoveDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/SyncMoveDisk.java new file mode 100644 index 000000000000..890cf6b72016 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/SyncMoveDisk.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_MoveDisk_sync] +import com.google.cloud.compute.v1.DiskMoveRequest; +import com.google.cloud.compute.v1.MoveDiskProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncMoveDisk { + + public static void main(String[] args) throws Exception { + syncMoveDisk(); + } + + public static void syncMoveDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + MoveDiskProjectRequest request = + MoveDiskProjectRequest.newBuilder() + .setDiskMoveRequestResource(DiskMoveRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = projectsClient.moveDiskAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_MoveDisk_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/SyncMoveDiskStringDiskmoverequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/SyncMoveDiskStringDiskmoverequest.java new file mode 100644 index 000000000000..714cf64c7c28 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/movedisk/SyncMoveDiskStringDiskmoverequest.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_MoveDisk_StringDiskmoverequest_sync] +import com.google.cloud.compute.v1.DiskMoveRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncMoveDiskStringDiskmoverequest { + + public static void main(String[] args) throws Exception { + syncMoveDiskStringDiskmoverequest(); + } + + public static void syncMoveDiskStringDiskmoverequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + DiskMoveRequest diskMoveRequestResource = DiskMoveRequest.newBuilder().build(); + Operation response = projectsClient.moveDiskAsync(project, diskMoveRequestResource).get(); + } + } +} +// [END compute_v1_generated_Projects_MoveDisk_StringDiskmoverequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/AsyncMoveInstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/AsyncMoveInstance.java new file mode 100644 index 000000000000..aa18f0809e55 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/AsyncMoveInstance.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_MoveInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceMoveRequest; +import com.google.cloud.compute.v1.MoveInstanceProjectRequest; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.longrunning.Operation; + +public class AsyncMoveInstance { + + public static void main(String[] args) throws Exception { + asyncMoveInstance(); + } + + public static void asyncMoveInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + MoveInstanceProjectRequest request = + MoveInstanceProjectRequest.newBuilder() + .setInstanceMoveRequestResource(InstanceMoveRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = projectsClient.moveInstanceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_MoveInstance_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/AsyncMoveInstanceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/AsyncMoveInstanceLRO.java new file mode 100644 index 000000000000..62f2960ede7b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/AsyncMoveInstanceLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_MoveInstance_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceMoveRequest; +import com.google.cloud.compute.v1.MoveInstanceProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class AsyncMoveInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncMoveInstanceLRO(); + } + + public static void asyncMoveInstanceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + MoveInstanceProjectRequest request = + MoveInstanceProjectRequest.newBuilder() + .setInstanceMoveRequestResource(InstanceMoveRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + projectsClient.moveInstanceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_MoveInstance_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/SyncMoveInstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/SyncMoveInstance.java new file mode 100644 index 000000000000..87c60b634a1c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/SyncMoveInstance.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_MoveInstance_sync] +import com.google.cloud.compute.v1.InstanceMoveRequest; +import com.google.cloud.compute.v1.MoveInstanceProjectRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncMoveInstance { + + public static void main(String[] args) throws Exception { + syncMoveInstance(); + } + + public static void syncMoveInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + MoveInstanceProjectRequest request = + MoveInstanceProjectRequest.newBuilder() + .setInstanceMoveRequestResource(InstanceMoveRequest.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = projectsClient.moveInstanceAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_MoveInstance_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/SyncMoveInstanceStringInstancemoverequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/SyncMoveInstanceStringInstancemoverequest.java new file mode 100644 index 000000000000..06073160d6ea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/moveinstance/SyncMoveInstanceStringInstancemoverequest.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_MoveInstance_StringInstancemoverequest_sync] +import com.google.cloud.compute.v1.InstanceMoveRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncMoveInstanceStringInstancemoverequest { + + public static void main(String[] args) throws Exception { + syncMoveInstanceStringInstancemoverequest(); + } + + public static void syncMoveInstanceStringInstancemoverequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + InstanceMoveRequest instanceMoveRequestResource = InstanceMoveRequest.newBuilder().build(); + Operation response = + projectsClient.moveInstanceAsync(project, instanceMoveRequestResource).get(); + } + } +} +// [END compute_v1_generated_Projects_MoveInstance_StringInstancemoverequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/AsyncSetCommonInstanceMetadata.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/AsyncSetCommonInstanceMetadata.java new file mode 100644 index 000000000000..032677d99a96 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/AsyncSetCommonInstanceMetadata.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetCommonInstanceMetadata_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Metadata; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest; +import com.google.longrunning.Operation; + +public class AsyncSetCommonInstanceMetadata { + + public static void main(String[] args) throws Exception { + asyncSetCommonInstanceMetadata(); + } + + public static void asyncSetCommonInstanceMetadata() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetCommonInstanceMetadataProjectRequest request = + SetCommonInstanceMetadataProjectRequest.newBuilder() + .setMetadataResource(Metadata.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + projectsClient.setCommonInstanceMetadataCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_SetCommonInstanceMetadata_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/AsyncSetCommonInstanceMetadataLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/AsyncSetCommonInstanceMetadataLRO.java new file mode 100644 index 000000000000..97a907022489 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/AsyncSetCommonInstanceMetadataLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetCommonInstanceMetadata_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Metadata; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest; + +public class AsyncSetCommonInstanceMetadataLRO { + + public static void main(String[] args) throws Exception { + asyncSetCommonInstanceMetadataLRO(); + } + + public static void asyncSetCommonInstanceMetadataLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetCommonInstanceMetadataProjectRequest request = + SetCommonInstanceMetadataProjectRequest.newBuilder() + .setMetadataResource(Metadata.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + projectsClient.setCommonInstanceMetadataOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_SetCommonInstanceMetadata_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/SyncSetCommonInstanceMetadata.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/SyncSetCommonInstanceMetadata.java new file mode 100644 index 000000000000..9cf29e5a5fc2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/SyncSetCommonInstanceMetadata.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetCommonInstanceMetadata_sync] +import com.google.cloud.compute.v1.Metadata; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest; + +public class SyncSetCommonInstanceMetadata { + + public static void main(String[] args) throws Exception { + syncSetCommonInstanceMetadata(); + } + + public static void syncSetCommonInstanceMetadata() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetCommonInstanceMetadataProjectRequest request = + SetCommonInstanceMetadataProjectRequest.newBuilder() + .setMetadataResource(Metadata.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .build(); + Operation response = projectsClient.setCommonInstanceMetadataAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_SetCommonInstanceMetadata_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/SyncSetCommonInstanceMetadataStringMetadata.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/SyncSetCommonInstanceMetadataStringMetadata.java new file mode 100644 index 000000000000..4f48a528848e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setcommoninstancemetadata/SyncSetCommonInstanceMetadataStringMetadata.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetCommonInstanceMetadata_StringMetadata_sync] +import com.google.cloud.compute.v1.Metadata; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; + +public class SyncSetCommonInstanceMetadataStringMetadata { + + public static void main(String[] args) throws Exception { + syncSetCommonInstanceMetadataStringMetadata(); + } + + public static void syncSetCommonInstanceMetadataStringMetadata() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + Metadata metadataResource = Metadata.newBuilder().build(); + Operation response = + projectsClient.setCommonInstanceMetadataAsync(project, metadataResource).get(); + } + } +} +// [END compute_v1_generated_Projects_SetCommonInstanceMetadata_StringMetadata_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/AsyncSetDefaultNetworkTier.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/AsyncSetDefaultNetworkTier.java new file mode 100644 index 000000000000..dba1a212529e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/AsyncSetDefaultNetworkTier.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetDefaultNetworkTier_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequest; +import com.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest; +import com.google.longrunning.Operation; + +public class AsyncSetDefaultNetworkTier { + + public static void main(String[] args) throws Exception { + asyncSetDefaultNetworkTier(); + } + + public static void asyncSetDefaultNetworkTier() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetDefaultNetworkTierProjectRequest request = + SetDefaultNetworkTierProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsSetDefaultNetworkTierRequestResource( + ProjectsSetDefaultNetworkTierRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + projectsClient.setDefaultNetworkTierCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_SetDefaultNetworkTier_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/AsyncSetDefaultNetworkTierLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/AsyncSetDefaultNetworkTierLRO.java new file mode 100644 index 000000000000..f0b8bef24285 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/AsyncSetDefaultNetworkTierLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetDefaultNetworkTier_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequest; +import com.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest; + +public class AsyncSetDefaultNetworkTierLRO { + + public static void main(String[] args) throws Exception { + asyncSetDefaultNetworkTierLRO(); + } + + public static void asyncSetDefaultNetworkTierLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetDefaultNetworkTierProjectRequest request = + SetDefaultNetworkTierProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsSetDefaultNetworkTierRequestResource( + ProjectsSetDefaultNetworkTierRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + projectsClient.setDefaultNetworkTierOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_SetDefaultNetworkTier_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/SyncSetDefaultNetworkTier.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/SyncSetDefaultNetworkTier.java new file mode 100644 index 000000000000..b57efc5285a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/SyncSetDefaultNetworkTier.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetDefaultNetworkTier_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequest; +import com.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest; + +public class SyncSetDefaultNetworkTier { + + public static void main(String[] args) throws Exception { + syncSetDefaultNetworkTier(); + } + + public static void syncSetDefaultNetworkTier() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetDefaultNetworkTierProjectRequest request = + SetDefaultNetworkTierProjectRequest.newBuilder() + .setProject("project-309310695") + .setProjectsSetDefaultNetworkTierRequestResource( + ProjectsSetDefaultNetworkTierRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = projectsClient.setDefaultNetworkTierAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_SetDefaultNetworkTier_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/SyncSetDefaultNetworkTierStringProjectssetdefaultnetworktierrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/SyncSetDefaultNetworkTierStringProjectssetdefaultnetworktierrequest.java new file mode 100644 index 000000000000..f67df4fc769b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setdefaultnetworktier/SyncSetDefaultNetworkTierStringProjectssetdefaultnetworktierrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetDefaultNetworkTier_StringProjectssetdefaultnetworktierrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequest; + +public class SyncSetDefaultNetworkTierStringProjectssetdefaultnetworktierrequest { + + public static void main(String[] args) throws Exception { + syncSetDefaultNetworkTierStringProjectssetdefaultnetworktierrequest(); + } + + public static void syncSetDefaultNetworkTierStringProjectssetdefaultnetworktierrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = + ProjectsSetDefaultNetworkTierRequest.newBuilder().build(); + Operation response = + projectsClient + .setDefaultNetworkTierAsync(project, projectsSetDefaultNetworkTierRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Projects_SetDefaultNetworkTier_StringProjectssetdefaultnetworktierrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/AsyncSetUsageExportBucket.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/AsyncSetUsageExportBucket.java new file mode 100644 index 000000000000..16b0c93626e5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/AsyncSetUsageExportBucket.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetUsageExportBucket_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.SetUsageExportBucketProjectRequest; +import com.google.cloud.compute.v1.UsageExportLocation; +import com.google.longrunning.Operation; + +public class AsyncSetUsageExportBucket { + + public static void main(String[] args) throws Exception { + asyncSetUsageExportBucket(); + } + + public static void asyncSetUsageExportBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetUsageExportBucketProjectRequest request = + SetUsageExportBucketProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUsageExportLocationResource(UsageExportLocation.newBuilder().build()) + .build(); + ApiFuture future = + projectsClient.setUsageExportBucketCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_SetUsageExportBucket_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/AsyncSetUsageExportBucketLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/AsyncSetUsageExportBucketLRO.java new file mode 100644 index 000000000000..f4887341b700 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/AsyncSetUsageExportBucketLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetUsageExportBucket_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.SetUsageExportBucketProjectRequest; +import com.google.cloud.compute.v1.UsageExportLocation; + +public class AsyncSetUsageExportBucketLRO { + + public static void main(String[] args) throws Exception { + asyncSetUsageExportBucketLRO(); + } + + public static void asyncSetUsageExportBucketLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetUsageExportBucketProjectRequest request = + SetUsageExportBucketProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUsageExportLocationResource(UsageExportLocation.newBuilder().build()) + .build(); + OperationFuture future = + projectsClient.setUsageExportBucketOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Projects_SetUsageExportBucket_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/SyncSetUsageExportBucket.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/SyncSetUsageExportBucket.java new file mode 100644 index 000000000000..d24189c0b658 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/SyncSetUsageExportBucket.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetUsageExportBucket_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.SetUsageExportBucketProjectRequest; +import com.google.cloud.compute.v1.UsageExportLocation; + +public class SyncSetUsageExportBucket { + + public static void main(String[] args) throws Exception { + syncSetUsageExportBucket(); + } + + public static void syncSetUsageExportBucket() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + SetUsageExportBucketProjectRequest request = + SetUsageExportBucketProjectRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUsageExportLocationResource(UsageExportLocation.newBuilder().build()) + .build(); + Operation response = projectsClient.setUsageExportBucketAsync(request).get(); + } + } +} +// [END compute_v1_generated_Projects_SetUsageExportBucket_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/SyncSetUsageExportBucketStringUsageexportlocation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/SyncSetUsageExportBucketStringUsageexportlocation.java new file mode 100644 index 000000000000..973fc312239f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projects/setusageexportbucket/SyncSetUsageExportBucketStringUsageexportlocation.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.compute.v1.samples; + +// [START compute_v1_generated_Projects_SetUsageExportBucket_StringUsageexportlocation_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectsClient; +import com.google.cloud.compute.v1.UsageExportLocation; + +public class SyncSetUsageExportBucketStringUsageexportlocation { + + public static void main(String[] args) throws Exception { + syncSetUsageExportBucketStringUsageexportlocation(); + } + + public static void syncSetUsageExportBucketStringUsageexportlocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProjectsClient projectsClient = ProjectsClient.create()) { + String project = "project-309310695"; + UsageExportLocation usageExportLocationResource = UsageExportLocation.newBuilder().build(); + Operation response = + projectsClient.setUsageExportBucketAsync(project, usageExportLocationResource).get(); + } + } +} +// [END compute_v1_generated_Projects_SetUsageExportBucket_StringUsageexportlocation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projectssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projectssettings/get/SyncGet.java new file mode 100644 index 000000000000..a19a5702581b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/projectssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ProjectsSettings_Get_sync] +import com.google.cloud.compute.v1.ProjectsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProjectsSettings.Builder projectsSettingsBuilder = ProjectsSettings.newBuilder(); + projectsSettingsBuilder + .getSettings() + .setRetrySettings( + projectsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProjectsSettings projectsSettings = projectsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ProjectsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..f1d2eb2ea3d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PublicAdvertisedPrefixesSettings publicAdvertisedPrefixesSettings = + PublicAdvertisedPrefixesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create(publicAdvertisedPrefixesSettings); + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..3d484d53cb80 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PublicAdvertisedPrefixesSettings publicAdvertisedPrefixesSettings = + PublicAdvertisedPrefixesSettings.newBuilder().setEndpoint(myEndpoint).build(); + PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create(publicAdvertisedPrefixesSettings); + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/AsyncDelete.java new file mode 100644 index 000000000000..20626d60b0a9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + DeletePublicAdvertisedPrefixeRequest request = + DeletePublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + publicAdvertisedPrefixesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..3d4c9f77f60a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + DeletePublicAdvertisedPrefixeRequest request = + DeletePublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + publicAdvertisedPrefixesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/SyncDelete.java new file mode 100644 index 000000000000..4da970016ba2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Delete_sync] +import com.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + DeletePublicAdvertisedPrefixeRequest request = + DeletePublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856") + .setRequestId("requestId693933066") + .build(); + Operation response = publicAdvertisedPrefixesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..73c9075941b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/delete/SyncDeleteStringString.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + String project = "project-309310695"; + String publicAdvertisedPrefix = "publicAdvertisedPrefix1506440856"; + Operation response = + publicAdvertisedPrefixesClient.deleteAsync(project, publicAdvertisedPrefix).get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/AsyncGet.java new file mode 100644 index 000000000000..0f91f3d6b7ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + GetPublicAdvertisedPrefixeRequest request = + GetPublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856") + .build(); + ApiFuture future = + publicAdvertisedPrefixesClient.getCallable().futureCall(request); + // Do something. + PublicAdvertisedPrefix response = future.get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/SyncGet.java new file mode 100644 index 000000000000..bb597b32e28d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Get_sync] +import com.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + GetPublicAdvertisedPrefixeRequest request = + GetPublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856") + .build(); + PublicAdvertisedPrefix response = publicAdvertisedPrefixesClient.get(request); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/SyncGetStringString.java new file mode 100644 index 000000000000..a37d029e61b1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/get/SyncGetStringString.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Get_StringString_sync] +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + String project = "project-309310695"; + String publicAdvertisedPrefix = "publicAdvertisedPrefix1506440856"; + PublicAdvertisedPrefix response = + publicAdvertisedPrefixesClient.get(project, publicAdvertisedPrefix); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/AsyncInsert.java new file mode 100644 index 000000000000..8569e897c28e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/AsyncInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + InsertPublicAdvertisedPrefixeRequest request = + InsertPublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + publicAdvertisedPrefixesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..02eaaa8b1eb2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + InsertPublicAdvertisedPrefixeRequest request = + InsertPublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + publicAdvertisedPrefixesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/SyncInsert.java new file mode 100644 index 000000000000..1345ea617643 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Insert_sync] +import com.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + InsertPublicAdvertisedPrefixeRequest request = + InsertPublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = publicAdvertisedPrefixesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/SyncInsertStringPublicadvertisedprefix.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/SyncInsertStringPublicadvertisedprefix.java new file mode 100644 index 000000000000..b1e3d259a314 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/insert/SyncInsertStringPublicadvertisedprefix.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Insert_StringPublicadvertisedprefix_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncInsertStringPublicadvertisedprefix { + + public static void main(String[] args) throws Exception { + syncInsertStringPublicadvertisedprefix(); + } + + public static void syncInsertStringPublicadvertisedprefix() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + String project = "project-309310695"; + PublicAdvertisedPrefix publicAdvertisedPrefixResource = + PublicAdvertisedPrefix.newBuilder().build(); + Operation response = + publicAdvertisedPrefixesClient.insertAsync(project, publicAdvertisedPrefixResource).get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Insert_StringPublicadvertisedprefix_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/AsyncList.java new file mode 100644 index 000000000000..6852aa0c570f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + ListPublicAdvertisedPrefixesRequest request = + ListPublicAdvertisedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + publicAdvertisedPrefixesClient.listPagedCallable().futureCall(request); + // Do something. + for (PublicAdvertisedPrefix element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/AsyncListPaged.java new file mode 100644 index 000000000000..08129b05bd01 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_List_Paged_async] +import com.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixList; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + ListPublicAdvertisedPrefixesRequest request = + ListPublicAdvertisedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + PublicAdvertisedPrefixList response = + publicAdvertisedPrefixesClient.listCallable().call(request); + for (PublicAdvertisedPrefix element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/SyncList.java new file mode 100644 index 000000000000..7b4ec2f30485 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_List_sync] +import com.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + ListPublicAdvertisedPrefixesRequest request = + ListPublicAdvertisedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (PublicAdvertisedPrefix element : + publicAdvertisedPrefixesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/SyncListString.java new file mode 100644 index 000000000000..743cab7bf413 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_List_String_sync] +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + String project = "project-309310695"; + for (PublicAdvertisedPrefix element : + publicAdvertisedPrefixesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/AsyncPatch.java new file mode 100644 index 000000000000..de408f11c2e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/AsyncPatch.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + PatchPublicAdvertisedPrefixeRequest request = + PatchPublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856") + .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + publicAdvertisedPrefixesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..0830a31270b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + PatchPublicAdvertisedPrefixeRequest request = + PatchPublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856") + .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + publicAdvertisedPrefixesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/SyncPatch.java new file mode 100644 index 000000000000..188b93d466b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + PatchPublicAdvertisedPrefixeRequest request = + PatchPublicAdvertisedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856") + .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = publicAdvertisedPrefixesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/SyncPatchStringStringPublicadvertisedprefix.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/SyncPatchStringStringPublicadvertisedprefix.java new file mode 100644 index 000000000000..d981c582a9b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixes/patch/SyncPatchStringStringPublicadvertisedprefix.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixes_Patch_StringStringPublicadvertisedprefix_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicAdvertisedPrefix; +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesClient; + +public class SyncPatchStringStringPublicadvertisedprefix { + + public static void main(String[] args) throws Exception { + syncPatchStringStringPublicadvertisedprefix(); + } + + public static void syncPatchStringStringPublicadvertisedprefix() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient = + PublicAdvertisedPrefixesClient.create()) { + String project = "project-309310695"; + String publicAdvertisedPrefix = "publicAdvertisedPrefix1506440856"; + PublicAdvertisedPrefix publicAdvertisedPrefixResource = + PublicAdvertisedPrefix.newBuilder().build(); + Operation response = + publicAdvertisedPrefixesClient + .patchAsync(project, publicAdvertisedPrefix, publicAdvertisedPrefixResource) + .get(); + } + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixes_Patch_StringStringPublicadvertisedprefix_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixessettings/get/SyncGet.java new file mode 100644 index 000000000000..89151f18cf6f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicadvertisedprefixessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixesSettings_Get_sync] +import com.google.cloud.compute.v1.PublicAdvertisedPrefixesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PublicAdvertisedPrefixesSettings.Builder publicAdvertisedPrefixesSettingsBuilder = + PublicAdvertisedPrefixesSettings.newBuilder(); + publicAdvertisedPrefixesSettingsBuilder + .getSettings() + .setRetrySettings( + publicAdvertisedPrefixesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PublicAdvertisedPrefixesSettings publicAdvertisedPrefixesSettings = + publicAdvertisedPrefixesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..b5c5c5472d98 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/AsyncAggregatedList.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + AggregatedListPublicDelegatedPrefixesRequest request = + AggregatedListPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + publicDelegatedPrefixesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : + future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..fbdfdb45b221 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,68 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefixAggregatedList; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + AggregatedListPublicDelegatedPrefixesRequest request = + AggregatedListPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + PublicDelegatedPrefixAggregatedList response = + publicDelegatedPrefixesClient.aggregatedListCallable().call(request); + for (Map.Entry element : + response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..e1181dd33b5d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + AggregatedListPublicDelegatedPrefixesRequest request = + AggregatedListPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + publicDelegatedPrefixesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..222c7235562a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_AggregatedList_String_sync] +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + publicDelegatedPrefixesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..fbdc9a583777 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PublicDelegatedPrefixesSettings publicDelegatedPrefixesSettings = + PublicDelegatedPrefixesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create(publicDelegatedPrefixesSettings); + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e68bd4325cb5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PublicDelegatedPrefixesSettings publicDelegatedPrefixesSettings = + PublicDelegatedPrefixesSettings.newBuilder().setEndpoint(myEndpoint).build(); + PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create(publicDelegatedPrefixesSettings); + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/AsyncDelete.java new file mode 100644 index 000000000000..f032b9e1c827 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + DeletePublicDelegatedPrefixeRequest request = + DeletePublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + publicDelegatedPrefixesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..28b331fdaca5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + DeletePublicDelegatedPrefixeRequest request = + DeletePublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + publicDelegatedPrefixesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/SyncDelete.java new file mode 100644 index 000000000000..488710698ff0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Delete_sync] +import com.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + DeletePublicDelegatedPrefixeRequest request = + DeletePublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = publicDelegatedPrefixesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..f53ac06f7d7b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String publicDelegatedPrefix = "publicDelegatedPrefix-663003832"; + Operation response = + publicDelegatedPrefixesClient.deleteAsync(project, region, publicDelegatedPrefix).get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/AsyncGet.java new file mode 100644 index 000000000000..0ac15689cbf3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + GetPublicDelegatedPrefixeRequest request = + GetPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setRegion("region-934795532") + .build(); + ApiFuture future = + publicDelegatedPrefixesClient.getCallable().futureCall(request); + // Do something. + PublicDelegatedPrefix response = future.get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/SyncGet.java new file mode 100644 index 000000000000..20076f172509 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Get_sync] +import com.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + GetPublicDelegatedPrefixeRequest request = + GetPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setRegion("region-934795532") + .build(); + PublicDelegatedPrefix response = publicDelegatedPrefixesClient.get(request); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..770fce9a9211 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Get_StringStringString_sync] +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String publicDelegatedPrefix = "publicDelegatedPrefix-663003832"; + PublicDelegatedPrefix response = + publicDelegatedPrefixesClient.get(project, region, publicDelegatedPrefix); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/AsyncInsert.java new file mode 100644 index 000000000000..04c6301a0f18 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + InsertPublicDelegatedPrefixeRequest request = + InsertPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + publicDelegatedPrefixesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..0416365b8c9c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + InsertPublicDelegatedPrefixeRequest request = + InsertPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + publicDelegatedPrefixesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/SyncInsert.java new file mode 100644 index 000000000000..db8c9a4b1e94 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Insert_sync] +import com.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + InsertPublicDelegatedPrefixeRequest request = + InsertPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = publicDelegatedPrefixesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/SyncInsertStringStringPublicdelegatedprefix.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/SyncInsertStringStringPublicdelegatedprefix.java new file mode 100644 index 000000000000..c515efe61169 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/insert/SyncInsertStringStringPublicdelegatedprefix.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Insert_StringStringPublicdelegatedprefix_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncInsertStringStringPublicdelegatedprefix { + + public static void main(String[] args) throws Exception { + syncInsertStringStringPublicdelegatedprefix(); + } + + public static void syncInsertStringStringPublicdelegatedprefix() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + PublicDelegatedPrefix publicDelegatedPrefixResource = + PublicDelegatedPrefix.newBuilder().build(); + Operation response = + publicDelegatedPrefixesClient + .insertAsync(project, region, publicDelegatedPrefixResource) + .get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Insert_StringStringPublicdelegatedprefix_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/AsyncList.java new file mode 100644 index 000000000000..81ab131cd85e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + ListPublicDelegatedPrefixesRequest request = + ListPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + publicDelegatedPrefixesClient.listPagedCallable().futureCall(request); + // Do something. + for (PublicDelegatedPrefix element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/AsyncListPaged.java new file mode 100644 index 000000000000..361df42c5679 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_List_Paged_async] +import com.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixList; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + ListPublicDelegatedPrefixesRequest request = + ListPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + PublicDelegatedPrefixList response = + publicDelegatedPrefixesClient.listCallable().call(request); + for (PublicDelegatedPrefix element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/SyncList.java new file mode 100644 index 000000000000..ca1245eebd38 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/SyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_List_sync] +import com.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + ListPublicDelegatedPrefixesRequest request = + ListPublicDelegatedPrefixesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (PublicDelegatedPrefix element : + publicDelegatedPrefixesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/SyncListStringString.java new file mode 100644 index 000000000000..ba110dd54733 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_List_StringString_sync] +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (PublicDelegatedPrefix element : + publicDelegatedPrefixesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/AsyncPatch.java new file mode 100644 index 000000000000..4208c23e0606 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/AsyncPatch.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + PatchPublicDelegatedPrefixeRequest request = + PatchPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + publicDelegatedPrefixesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..70659aabd88d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + PatchPublicDelegatedPrefixeRequest request = + PatchPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + publicDelegatedPrefixesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/SyncPatch.java new file mode 100644 index 000000000000..2213085ef47f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + PatchPublicDelegatedPrefixeRequest request = + PatchPublicDelegatedPrefixeRequest.newBuilder() + .setProject("project-309310695") + .setPublicDelegatedPrefix("publicDelegatedPrefix-663003832") + .setPublicDelegatedPrefixResource(PublicDelegatedPrefix.newBuilder().build()) + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = publicDelegatedPrefixesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/SyncPatchStringStringStringPublicdelegatedprefix.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/SyncPatchStringStringStringPublicdelegatedprefix.java new file mode 100644 index 000000000000..5e3a0e810c83 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixes/patch/SyncPatchStringStringStringPublicdelegatedprefix.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixes_Patch_StringStringStringPublicdelegatedprefix_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PublicDelegatedPrefix; +import com.google.cloud.compute.v1.PublicDelegatedPrefixesClient; + +public class SyncPatchStringStringStringPublicdelegatedprefix { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringPublicdelegatedprefix(); + } + + public static void syncPatchStringStringStringPublicdelegatedprefix() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PublicDelegatedPrefixesClient publicDelegatedPrefixesClient = + PublicDelegatedPrefixesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String publicDelegatedPrefix = "publicDelegatedPrefix-663003832"; + PublicDelegatedPrefix publicDelegatedPrefixResource = + PublicDelegatedPrefix.newBuilder().build(); + Operation response = + publicDelegatedPrefixesClient + .patchAsync(project, region, publicDelegatedPrefix, publicDelegatedPrefixResource) + .get(); + } + } +} +// [END compute_v1_generated_PublicDelegatedPrefixes_Patch_StringStringStringPublicdelegatedprefix_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixessettings/get/SyncGet.java new file mode 100644 index 000000000000..fb8f4cb71d9b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/publicdelegatedprefixessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixesSettings_Get_sync] +import com.google.cloud.compute.v1.PublicDelegatedPrefixesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PublicDelegatedPrefixesSettings.Builder publicDelegatedPrefixesSettingsBuilder = + PublicDelegatedPrefixesSettings.newBuilder(); + publicDelegatedPrefixesSettingsBuilder + .getSettings() + .setRetrySettings( + publicDelegatedPrefixesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PublicDelegatedPrefixesSettings publicDelegatedPrefixesSettings = + publicDelegatedPrefixesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_PublicDelegatedPrefixesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..1e60f9e98827 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.cloud.compute.v1.RegionAutoscalersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionAutoscalersSettings regionAutoscalersSettings = + RegionAutoscalersSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionAutoscalersClient regionAutoscalersClient = + RegionAutoscalersClient.create(regionAutoscalersSettings); + } +} +// [END compute_v1_generated_RegionAutoscalers_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..32178f6ac6eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.cloud.compute.v1.RegionAutoscalersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionAutoscalersSettings regionAutoscalersSettings = + RegionAutoscalersSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionAutoscalersClient regionAutoscalersClient = + RegionAutoscalersClient.create(regionAutoscalersSettings); + } +} +// [END compute_v1_generated_RegionAutoscalers_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/AsyncDelete.java new file mode 100644 index 000000000000..9e2a3d0cebdc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionAutoscalerRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + DeleteRegionAutoscalerRequest request = + DeleteRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionAutoscalersClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..51ef0d23b477 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionAutoscalerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + DeleteRegionAutoscalerRequest request = + DeleteRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionAutoscalersClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/SyncDelete.java new file mode 100644 index 000000000000..5bea25001bde --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionAutoscalerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + DeleteRegionAutoscalerRequest request = + DeleteRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionAutoscalersClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..23f60ea7a726 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String autoscaler = "autoscaler517258967"; + Operation response = regionAutoscalersClient.deleteAsync(project, region, autoscaler).get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/AsyncGet.java new file mode 100644 index 000000000000..b0d895643b59 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.GetRegionAutoscalerRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + GetRegionAutoscalerRequest request = + GetRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionAutoscalersClient.getCallable().futureCall(request); + // Do something. + Autoscaler response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/SyncGet.java new file mode 100644 index 000000000000..30ad47158b4c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Get_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.GetRegionAutoscalerRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + GetRegionAutoscalerRequest request = + GetRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Autoscaler response = regionAutoscalersClient.get(request); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..42f449e8d624 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String autoscaler = "autoscaler517258967"; + Autoscaler response = regionAutoscalersClient.get(project, region, autoscaler); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/AsyncInsert.java new file mode 100644 index 000000000000..40c160221f0c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.InsertRegionAutoscalerRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + InsertRegionAutoscalerRequest request = + InsertRegionAutoscalerRequest.newBuilder() + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionAutoscalersClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..9271a171a213 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.InsertRegionAutoscalerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + InsertRegionAutoscalerRequest request = + InsertRegionAutoscalerRequest.newBuilder() + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionAutoscalersClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/SyncInsert.java new file mode 100644 index 000000000000..6fc10038201c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Insert_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.InsertRegionAutoscalerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + InsertRegionAutoscalerRequest request = + InsertRegionAutoscalerRequest.newBuilder() + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionAutoscalersClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/SyncInsertStringStringAutoscaler.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/SyncInsertStringStringAutoscaler.java new file mode 100644 index 000000000000..346cb48bd77b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/insert/SyncInsertStringStringAutoscaler.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Insert_StringStringAutoscaler_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncInsertStringStringAutoscaler { + + public static void main(String[] args) throws Exception { + syncInsertStringStringAutoscaler(); + } + + public static void syncInsertStringStringAutoscaler() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Autoscaler autoscalerResource = Autoscaler.newBuilder().build(); + Operation response = + regionAutoscalersClient.insertAsync(project, region, autoscalerResource).get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Insert_StringStringAutoscaler_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/AsyncList.java new file mode 100644 index 000000000000..e89d0752615f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.ListRegionAutoscalersRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + ListRegionAutoscalersRequest request = + ListRegionAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionAutoscalersClient.listPagedCallable().futureCall(request); + // Do something. + for (Autoscaler element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionAutoscalers_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/AsyncListPaged.java new file mode 100644 index 000000000000..a88b39a27393 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_List_Paged_async] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.ListRegionAutoscalersRequest; +import com.google.cloud.compute.v1.RegionAutoscalerList; +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + ListRegionAutoscalersRequest request = + ListRegionAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionAutoscalerList response = regionAutoscalersClient.listCallable().call(request); + for (Autoscaler element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionAutoscalers_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/SyncList.java new file mode 100644 index 000000000000..5d126ae6bead --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_List_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.ListRegionAutoscalersRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + ListRegionAutoscalersRequest request = + ListRegionAutoscalersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (Autoscaler element : regionAutoscalersClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionAutoscalers_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/SyncListStringString.java new file mode 100644 index 000000000000..d67be69fbe23 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_List_StringString_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (Autoscaler element : regionAutoscalersClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionAutoscalers_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/AsyncPatch.java new file mode 100644 index 000000000000..a776fe8dac75 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.PatchRegionAutoscalerRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + PatchRegionAutoscalerRequest request = + PatchRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionAutoscalersClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..496da3c40d0e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionAutoscalerRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + PatchRegionAutoscalerRequest request = + PatchRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionAutoscalersClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/SyncPatch.java new file mode 100644 index 000000000000..c099a589b8ac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Patch_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionAutoscalerRequest; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + PatchRegionAutoscalerRequest request = + PatchRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionAutoscalersClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/SyncPatchStringStringAutoscaler.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/SyncPatchStringStringAutoscaler.java new file mode 100644 index 000000000000..2e8d3d9d8be4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/patch/SyncPatchStringStringAutoscaler.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Patch_StringStringAutoscaler_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncPatchStringStringAutoscaler { + + public static void main(String[] args) throws Exception { + syncPatchStringStringAutoscaler(); + } + + public static void syncPatchStringStringAutoscaler() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Autoscaler autoscalerResource = Autoscaler.newBuilder().build(); + Operation response = + regionAutoscalersClient.patchAsync(project, region, autoscalerResource).get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Patch_StringStringAutoscaler_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/AsyncUpdate.java new file mode 100644 index 000000000000..0abf07160221 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/AsyncUpdate.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.cloud.compute.v1.UpdateRegionAutoscalerRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + UpdateRegionAutoscalerRequest request = + UpdateRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionAutoscalersClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..e53d1d220513 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/AsyncUpdateLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.cloud.compute.v1.UpdateRegionAutoscalerRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + UpdateRegionAutoscalerRequest request = + UpdateRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionAutoscalersClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/SyncUpdate.java new file mode 100644 index 000000000000..88c2fe21e0a2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Update_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; +import com.google.cloud.compute.v1.UpdateRegionAutoscalerRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + UpdateRegionAutoscalerRequest request = + UpdateRegionAutoscalerRequest.newBuilder() + .setAutoscaler("autoscaler517258967") + .setAutoscalerResource(Autoscaler.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionAutoscalersClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/SyncUpdateStringStringAutoscaler.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/SyncUpdateStringStringAutoscaler.java new file mode 100644 index 000000000000..44ab35f8a7a7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalers/update/SyncUpdateStringStringAutoscaler.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalers_Update_StringStringAutoscaler_sync] +import com.google.cloud.compute.v1.Autoscaler; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionAutoscalersClient; + +public class SyncUpdateStringStringAutoscaler { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringAutoscaler(); + } + + public static void syncUpdateStringStringAutoscaler() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionAutoscalersClient regionAutoscalersClient = RegionAutoscalersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Autoscaler autoscalerResource = Autoscaler.newBuilder().build(); + Operation response = + regionAutoscalersClient.updateAsync(project, region, autoscalerResource).get(); + } + } +} +// [END compute_v1_generated_RegionAutoscalers_Update_StringStringAutoscaler_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalerssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalerssettings/get/SyncGet.java new file mode 100644 index 000000000000..1f9ee9e30bfd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionautoscalerssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionAutoscalersSettings_Get_sync] +import com.google.cloud.compute.v1.RegionAutoscalersSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionAutoscalersSettings.Builder regionAutoscalersSettingsBuilder = + RegionAutoscalersSettings.newBuilder(); + regionAutoscalersSettingsBuilder + .getSettings() + .setRetrySettings( + regionAutoscalersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionAutoscalersSettings regionAutoscalersSettings = regionAutoscalersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionAutoscalersSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..9a6b09a89d12 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.RegionBackendServicesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionBackendServicesSettings regionBackendServicesSettings = + RegionBackendServicesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create(regionBackendServicesSettings); + } +} +// [END compute_v1_generated_RegionBackendServices_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..2b7594cbe444 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.RegionBackendServicesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionBackendServicesSettings regionBackendServicesSettings = + RegionBackendServicesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create(regionBackendServicesSettings); + } +} +// [END compute_v1_generated_RegionBackendServices_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/AsyncDelete.java new file mode 100644 index 000000000000..194a7968db17 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + DeleteRegionBackendServiceRequest request = + DeleteRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionBackendServicesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..8f13b6bb79a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + DeleteRegionBackendServiceRequest request = + DeleteRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionBackendServicesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/SyncDelete.java new file mode 100644 index 000000000000..4147e202a7a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + DeleteRegionBackendServiceRequest request = + DeleteRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionBackendServicesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..91d6543e1bb7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String backendService = "backendService-1884714623"; + Operation response = + regionBackendServicesClient.deleteAsync(project, region, backendService).get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/AsyncGet.java new file mode 100644 index 000000000000..b652aa36bc74 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.GetRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + GetRegionBackendServiceRequest request = + GetRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionBackendServicesClient.getCallable().futureCall(request); + // Do something. + BackendService response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/SyncGet.java new file mode 100644 index 000000000000..4a41f481e024 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Get_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.GetRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + GetRegionBackendServiceRequest request = + GetRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + BackendService response = regionBackendServicesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..adee9d1c04a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Get_StringStringString_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String backendService = "backendService-1884714623"; + BackendService response = regionBackendServicesClient.get(project, region, backendService); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/AsyncGetHealth.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/AsyncGetHealth.java new file mode 100644 index 000000000000..f8a043301af0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/AsyncGetHealth.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_GetHealth_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendServiceGroupHealth; +import com.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.ResourceGroupReference; + +public class AsyncGetHealth { + + public static void main(String[] args) throws Exception { + asyncGetHealth(); + } + + public static void asyncGetHealth() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + GetHealthRegionBackendServiceRequest request = + GetHealthRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRegion("region-934795532") + .setResourceGroupReferenceResource(ResourceGroupReference.newBuilder().build()) + .build(); + ApiFuture future = + regionBackendServicesClient.getHealthCallable().futureCall(request); + // Do something. + BackendServiceGroupHealth response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_GetHealth_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/SyncGetHealth.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/SyncGetHealth.java new file mode 100644 index 000000000000..c5f106429035 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/SyncGetHealth.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_GetHealth_sync] +import com.google.cloud.compute.v1.BackendServiceGroupHealth; +import com.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.ResourceGroupReference; + +public class SyncGetHealth { + + public static void main(String[] args) throws Exception { + syncGetHealth(); + } + + public static void syncGetHealth() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + GetHealthRegionBackendServiceRequest request = + GetHealthRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setProject("project-309310695") + .setRegion("region-934795532") + .setResourceGroupReferenceResource(ResourceGroupReference.newBuilder().build()) + .build(); + BackendServiceGroupHealth response = regionBackendServicesClient.getHealth(request); + } + } +} +// [END compute_v1_generated_RegionBackendServices_GetHealth_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/SyncGetHealthStringStringStringResourcegroupreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/SyncGetHealthStringStringStringResourcegroupreference.java new file mode 100644 index 000000000000..f8c04ca01e2a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/gethealth/SyncGetHealthStringStringStringResourcegroupreference.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_GetHealth_StringStringStringResourcegroupreference_sync] +import com.google.cloud.compute.v1.BackendServiceGroupHealth; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.ResourceGroupReference; + +public class SyncGetHealthStringStringStringResourcegroupreference { + + public static void main(String[] args) throws Exception { + syncGetHealthStringStringStringResourcegroupreference(); + } + + public static void syncGetHealthStringStringStringResourcegroupreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String backendService = "backendService-1884714623"; + ResourceGroupReference resourceGroupReferenceResource = + ResourceGroupReference.newBuilder().build(); + BackendServiceGroupHealth response = + regionBackendServicesClient.getHealth( + project, region, backendService, resourceGroupReferenceResource); + } + } +} +// [END compute_v1_generated_RegionBackendServices_GetHealth_StringStringStringResourcegroupreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..0892d64926f0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + GetIamPolicyRegionBackendServiceRequest request = + GetIamPolicyRegionBackendServiceRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + ApiFuture future = + regionBackendServicesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..61adf4f979da --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + GetIamPolicyRegionBackendServiceRequest request = + GetIamPolicyRegionBackendServiceRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + Policy response = regionBackendServicesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_RegionBackendServices_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..e47d68b33e2e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + Policy response = regionBackendServicesClient.getIamPolicy(project, region, resource); + } + } +} +// [END compute_v1_generated_RegionBackendServices_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/AsyncInsert.java new file mode 100644 index 000000000000..9bfa978eb08c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.InsertRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + InsertRegionBackendServiceRequest request = + InsertRegionBackendServiceRequest.newBuilder() + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionBackendServicesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..f1ff287d5c87 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.InsertRegionBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + InsertRegionBackendServiceRequest request = + InsertRegionBackendServiceRequest.newBuilder() + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionBackendServicesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/SyncInsert.java new file mode 100644 index 000000000000..68fc51563e1c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Insert_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.InsertRegionBackendServiceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + InsertRegionBackendServiceRequest request = + InsertRegionBackendServiceRequest.newBuilder() + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionBackendServicesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/SyncInsertStringStringBackendservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/SyncInsertStringStringBackendservice.java new file mode 100644 index 000000000000..1c22e9f37869 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/insert/SyncInsertStringStringBackendservice.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Insert_StringStringBackendservice_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncInsertStringStringBackendservice { + + public static void main(String[] args) throws Exception { + syncInsertStringStringBackendservice(); + } + + public static void syncInsertStringStringBackendservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + BackendService backendServiceResource = BackendService.newBuilder().build(); + Operation response = + regionBackendServicesClient.insertAsync(project, region, backendServiceResource).get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Insert_StringStringBackendservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/AsyncList.java new file mode 100644 index 000000000000..2452049f86b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.ListRegionBackendServicesRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + ListRegionBackendServicesRequest request = + ListRegionBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionBackendServicesClient.listPagedCallable().futureCall(request); + // Do something. + for (BackendService element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionBackendServices_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/AsyncListPaged.java new file mode 100644 index 000000000000..ddef390e6118 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_List_Paged_async] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.BackendServiceList; +import com.google.cloud.compute.v1.ListRegionBackendServicesRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + ListRegionBackendServicesRequest request = + ListRegionBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + BackendServiceList response = regionBackendServicesClient.listCallable().call(request); + for (BackendService element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionBackendServices_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/SyncList.java new file mode 100644 index 000000000000..45ad04147786 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_List_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.ListRegionBackendServicesRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + ListRegionBackendServicesRequest request = + ListRegionBackendServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (BackendService element : regionBackendServicesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionBackendServices_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/SyncListStringString.java new file mode 100644 index 000000000000..0e45d6cb6f14 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_List_StringString_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (BackendService element : + regionBackendServicesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionBackendServices_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/AsyncPatch.java new file mode 100644 index 000000000000..55634e6642cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/AsyncPatch.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.PatchRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + PatchRegionBackendServiceRequest request = + PatchRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionBackendServicesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..846724948fcd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + PatchRegionBackendServiceRequest request = + PatchRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionBackendServicesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/SyncPatch.java new file mode 100644 index 000000000000..bb034d58e2e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Patch_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionBackendServiceRequest; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + PatchRegionBackendServiceRequest request = + PatchRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionBackendServicesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/SyncPatchStringStringStringBackendservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/SyncPatchStringStringStringBackendservice.java new file mode 100644 index 000000000000..e90329630c5b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/patch/SyncPatchStringStringStringBackendservice.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Patch_StringStringStringBackendservice_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncPatchStringStringStringBackendservice { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringBackendservice(); + } + + public static void syncPatchStringStringStringBackendservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String backendService = "backendService-1884714623"; + BackendService backendServiceResource = BackendService.newBuilder().build(); + Operation response = + regionBackendServicesClient + .patchAsync(project, region, backendService, backendServiceResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Patch_StringStringStringBackendservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..6e24670041a2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + SetIamPolicyRegionBackendServiceRequest request = + SetIamPolicyRegionBackendServiceRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = + regionBackendServicesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..bb9d0e1ee56b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_SetIamPolicy_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + SetIamPolicyRegionBackendServiceRequest request = + SetIamPolicyRegionBackendServiceRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = regionBackendServicesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_RegionBackendServices_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java new file mode 100644 index 000000000000..da572707e4ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringRegionsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringRegionsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringRegionsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetPolicyRequest regionSetPolicyRequestResource = + RegionSetPolicyRequest.newBuilder().build(); + Policy response = + regionBackendServicesClient.setIamPolicy( + project, region, resource, regionSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_RegionBackendServices_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/AsyncUpdate.java new file mode 100644 index 000000000000..a543bc899dc9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/AsyncUpdate.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.UpdateRegionBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + UpdateRegionBackendServiceRequest request = + UpdateRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionBackendServicesClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..7849efb3e1ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/AsyncUpdateLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.UpdateRegionBackendServiceRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + UpdateRegionBackendServiceRequest request = + UpdateRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionBackendServicesClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/SyncUpdate.java new file mode 100644 index 000000000000..8fd7273465ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Update_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; +import com.google.cloud.compute.v1.UpdateRegionBackendServiceRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + UpdateRegionBackendServiceRequest request = + UpdateRegionBackendServiceRequest.newBuilder() + .setBackendService("backendService-1884714623") + .setBackendServiceResource(BackendService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionBackendServicesClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/SyncUpdateStringStringStringBackendservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/SyncUpdateStringStringStringBackendservice.java new file mode 100644 index 000000000000..de0c42b0d961 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservices/update/SyncUpdateStringStringStringBackendservice.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServices_Update_StringStringStringBackendservice_sync] +import com.google.cloud.compute.v1.BackendService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionBackendServicesClient; + +public class SyncUpdateStringStringStringBackendservice { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringBackendservice(); + } + + public static void syncUpdateStringStringStringBackendservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionBackendServicesClient regionBackendServicesClient = + RegionBackendServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String backendService = "backendService-1884714623"; + BackendService backendServiceResource = BackendService.newBuilder().build(); + Operation response = + regionBackendServicesClient + .updateAsync(project, region, backendService, backendServiceResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionBackendServices_Update_StringStringStringBackendservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservicessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservicessettings/get/SyncGet.java new file mode 100644 index 000000000000..e6523ef02f3e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionbackendservicessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionBackendServicesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionBackendServicesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionBackendServicesSettings.Builder regionBackendServicesSettingsBuilder = + RegionBackendServicesSettings.newBuilder(); + regionBackendServicesSettingsBuilder + .getSettings() + .setRetrySettings( + regionBackendServicesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionBackendServicesSettings regionBackendServicesSettings = + regionBackendServicesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionBackendServicesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..962fefbae561 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest; +import com.google.cloud.compute.v1.CommitmentsScopedList; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + AggregatedListRegionCommitmentsRequest request = + AggregatedListRegionCommitmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + regionCommitmentsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionCommitments_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..ccc7feac2b6b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest; +import com.google.cloud.compute.v1.CommitmentAggregatedList; +import com.google.cloud.compute.v1.CommitmentsScopedList; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + AggregatedListRegionCommitmentsRequest request = + AggregatedListRegionCommitmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + CommitmentAggregatedList response = + regionCommitmentsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionCommitments_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..59fbcc000a6f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest; +import com.google.cloud.compute.v1.CommitmentsScopedList; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + AggregatedListRegionCommitmentsRequest request = + AggregatedListRegionCommitmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + regionCommitmentsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionCommitments_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..81ce67fe87cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_AggregatedList_String_sync] +import com.google.cloud.compute.v1.CommitmentsScopedList; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + regionCommitmentsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionCommitments_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..7c5690ee4722 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import com.google.cloud.compute.v1.RegionCommitmentsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionCommitmentsSettings regionCommitmentsSettings = + RegionCommitmentsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionCommitmentsClient regionCommitmentsClient = + RegionCommitmentsClient.create(regionCommitmentsSettings); + } +} +// [END compute_v1_generated_RegionCommitments_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..8100e91440dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import com.google.cloud.compute.v1.RegionCommitmentsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionCommitmentsSettings regionCommitmentsSettings = + RegionCommitmentsSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionCommitmentsClient regionCommitmentsClient = + RegionCommitmentsClient.create(regionCommitmentsSettings); + } +} +// [END compute_v1_generated_RegionCommitments_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/AsyncGet.java new file mode 100644 index 000000000000..e5302498f0db --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.GetRegionCommitmentRequest; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + GetRegionCommitmentRequest request = + GetRegionCommitmentRequest.newBuilder() + .setCommitment("commitment1019005717") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionCommitmentsClient.getCallable().futureCall(request); + // Do something. + Commitment response = future.get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/SyncGet.java new file mode 100644 index 000000000000..f6923a7d2eca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Get_sync] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.GetRegionCommitmentRequest; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + GetRegionCommitmentRequest request = + GetRegionCommitmentRequest.newBuilder() + .setCommitment("commitment1019005717") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Commitment response = regionCommitmentsClient.get(request); + } + } +} +// [END compute_v1_generated_RegionCommitments_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..0697be93931b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String commitment = "commitment1019005717"; + Commitment response = regionCommitmentsClient.get(project, region, commitment); + } + } +} +// [END compute_v1_generated_RegionCommitments_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/AsyncInsert.java new file mode 100644 index 000000000000..9b9232fb1da0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.InsertRegionCommitmentRequest; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + InsertRegionCommitmentRequest request = + InsertRegionCommitmentRequest.newBuilder() + .setCommitmentResource(Commitment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionCommitmentsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..10eef803337c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.InsertRegionCommitmentRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + InsertRegionCommitmentRequest request = + InsertRegionCommitmentRequest.newBuilder() + .setCommitmentResource(Commitment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionCommitmentsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/SyncInsert.java new file mode 100644 index 000000000000..dcdb9d9102d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Insert_sync] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.InsertRegionCommitmentRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + InsertRegionCommitmentRequest request = + InsertRegionCommitmentRequest.newBuilder() + .setCommitmentResource(Commitment.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionCommitmentsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/SyncInsertStringStringCommitment.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/SyncInsertStringStringCommitment.java new file mode 100644 index 000000000000..5e4c415ff8f2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/insert/SyncInsertStringStringCommitment.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Insert_StringStringCommitment_sync] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class SyncInsertStringStringCommitment { + + public static void main(String[] args) throws Exception { + syncInsertStringStringCommitment(); + } + + public static void syncInsertStringStringCommitment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Commitment commitmentResource = Commitment.newBuilder().build(); + Operation response = + regionCommitmentsClient.insertAsync(project, region, commitmentResource).get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Insert_StringStringCommitment_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/AsyncList.java new file mode 100644 index 000000000000..5e139e6ae2d2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.ListRegionCommitmentsRequest; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + ListRegionCommitmentsRequest request = + ListRegionCommitmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionCommitmentsClient.listPagedCallable().futureCall(request); + // Do something. + for (Commitment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionCommitments_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/AsyncListPaged.java new file mode 100644 index 000000000000..824fe71aa277 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_List_Paged_async] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.CommitmentList; +import com.google.cloud.compute.v1.ListRegionCommitmentsRequest; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + ListRegionCommitmentsRequest request = + ListRegionCommitmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + CommitmentList response = regionCommitmentsClient.listCallable().call(request); + for (Commitment element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionCommitments_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/SyncList.java new file mode 100644 index 000000000000..888111ff042a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_List_sync] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.ListRegionCommitmentsRequest; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + ListRegionCommitmentsRequest request = + ListRegionCommitmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (Commitment element : regionCommitmentsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionCommitments_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/SyncListStringString.java new file mode 100644 index 000000000000..ef0a1c00d6db --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_List_StringString_sync] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (Commitment element : regionCommitmentsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionCommitments_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/AsyncUpdate.java new file mode 100644 index 000000000000..8f66b9e14ecd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/AsyncUpdate.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import com.google.cloud.compute.v1.UpdateRegionCommitmentRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + UpdateRegionCommitmentRequest request = + UpdateRegionCommitmentRequest.newBuilder() + .setCommitment("commitment1019005717") + .setCommitmentResource(Commitment.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + ApiFuture future = regionCommitmentsClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..68932128194c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/AsyncUpdateLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import com.google.cloud.compute.v1.UpdateRegionCommitmentRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + UpdateRegionCommitmentRequest request = + UpdateRegionCommitmentRequest.newBuilder() + .setCommitment("commitment1019005717") + .setCommitmentResource(Commitment.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + OperationFuture future = + regionCommitmentsClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/SyncUpdate.java new file mode 100644 index 000000000000..feef57f9327d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Update_sync] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionCommitmentsClient; +import com.google.cloud.compute.v1.UpdateRegionCommitmentRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + UpdateRegionCommitmentRequest request = + UpdateRegionCommitmentRequest.newBuilder() + .setCommitment("commitment1019005717") + .setCommitmentResource(Commitment.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + Operation response = regionCommitmentsClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/SyncUpdateStringStringStringCommitment.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/SyncUpdateStringStringStringCommitment.java new file mode 100644 index 000000000000..b5174e0ed3bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitments/update/SyncUpdateStringStringStringCommitment.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitments_Update_StringStringStringCommitment_sync] +import com.google.cloud.compute.v1.Commitment; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionCommitmentsClient; + +public class SyncUpdateStringStringStringCommitment { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringCommitment(); + } + + public static void syncUpdateStringStringStringCommitment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionCommitmentsClient regionCommitmentsClient = RegionCommitmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String commitment = "commitment1019005717"; + Commitment commitmentResource = Commitment.newBuilder().build(); + Operation response = + regionCommitmentsClient + .updateAsync(project, region, commitment, commitmentResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionCommitments_Update_StringStringStringCommitment_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitmentssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitmentssettings/get/SyncGet.java new file mode 100644 index 000000000000..641f0d3366d6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioncommitmentssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionCommitmentsSettings_Get_sync] +import com.google.cloud.compute.v1.RegionCommitmentsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionCommitmentsSettings.Builder regionCommitmentsSettingsBuilder = + RegionCommitmentsSettings.newBuilder(); + regionCommitmentsSettingsBuilder + .getSettings() + .setRetrySettings( + regionCommitmentsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionCommitmentsSettings regionCommitmentsSettings = regionCommitmentsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionCommitmentsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/AsyncAddResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/AsyncAddResourcePolicies.java new file mode 100644 index 000000000000..38593252985c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/AsyncAddResourcePolicies.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_AddResourcePolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest; +import com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.longrunning.Operation; + +public class AsyncAddResourcePolicies { + + public static void main(String[] args) throws Exception { + asyncAddResourcePolicies(); + } + + public static void asyncAddResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + AddResourcePoliciesRegionDiskRequest request = + AddResourcePoliciesRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksAddResourcePoliciesRequestResource( + RegionDisksAddResourcePoliciesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionDisksClient.addResourcePoliciesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_AddResourcePolicies_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/AsyncAddResourcePoliciesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/AsyncAddResourcePoliciesLRO.java new file mode 100644 index 000000000000..8c9ba32721d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/AsyncAddResourcePoliciesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_AddResourcePolicies_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class AsyncAddResourcePoliciesLRO { + + public static void main(String[] args) throws Exception { + asyncAddResourcePoliciesLRO(); + } + + public static void asyncAddResourcePoliciesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + AddResourcePoliciesRegionDiskRequest request = + AddResourcePoliciesRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksAddResourcePoliciesRequestResource( + RegionDisksAddResourcePoliciesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionDisksClient.addResourcePoliciesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_AddResourcePolicies_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/SyncAddResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/SyncAddResourcePolicies.java new file mode 100644 index 000000000000..779487e7e4f2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/SyncAddResourcePolicies.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_AddResourcePolicies_sync] +import com.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncAddResourcePolicies { + + public static void main(String[] args) throws Exception { + syncAddResourcePolicies(); + } + + public static void syncAddResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + AddResourcePoliciesRegionDiskRequest request = + AddResourcePoliciesRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksAddResourcePoliciesRequestResource( + RegionDisksAddResourcePoliciesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionDisksClient.addResourcePoliciesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_AddResourcePolicies_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/SyncAddResourcePoliciesStringStringStringRegiondisksaddresourcepoliciesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/SyncAddResourcePoliciesStringStringStringRegiondisksaddresourcepoliciesrequest.java new file mode 100644 index 000000000000..1c3e1397a5a1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/addresourcepolicies/SyncAddResourcePoliciesStringStringStringRegiondisksaddresourcepoliciesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_AddResourcePolicies_StringStringStringRegiondisksaddresourcepoliciesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncAddResourcePoliciesStringStringStringRegiondisksaddresourcepoliciesrequest { + + public static void main(String[] args) throws Exception { + syncAddResourcePoliciesStringStringStringRegiondisksaddresourcepoliciesrequest(); + } + + public static void + syncAddResourcePoliciesStringStringStringRegiondisksaddresourcepoliciesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String disk = "disk3083677"; + RegionDisksAddResourcePoliciesRequest regionDisksAddResourcePoliciesRequestResource = + RegionDisksAddResourcePoliciesRequest.newBuilder().build(); + Operation response = + regionDisksClient + .addResourcePoliciesAsync( + project, region, disk, regionDisksAddResourcePoliciesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionDisks_AddResourcePolicies_StringStringStringRegiondisksaddresourcepoliciesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..c17fb67227a1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionDisksSettings regionDisksSettings = + RegionDisksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionDisksClient regionDisksClient = RegionDisksClient.create(regionDisksSettings); + } +} +// [END compute_v1_generated_RegionDisks_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..23b1874f343d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionDisksSettings regionDisksSettings = + RegionDisksSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionDisksClient regionDisksClient = RegionDisksClient.create(regionDisksSettings); + } +} +// [END compute_v1_generated_RegionDisks_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/AsyncCreateSnapshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/AsyncCreateSnapshot.java new file mode 100644 index 000000000000..51d2c1f6fec5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/AsyncCreateSnapshot.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_CreateSnapshot_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.Snapshot; +import com.google.longrunning.Operation; + +public class AsyncCreateSnapshot { + + public static void main(String[] args) throws Exception { + asyncCreateSnapshot(); + } + + public static void asyncCreateSnapshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + CreateSnapshotRegionDiskRequest request = + CreateSnapshotRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .build(); + ApiFuture future = regionDisksClient.createSnapshotCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_CreateSnapshot_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/AsyncCreateSnapshotLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/AsyncCreateSnapshotLRO.java new file mode 100644 index 000000000000..001ae799bd46 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/AsyncCreateSnapshotLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_CreateSnapshot_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.Snapshot; + +public class AsyncCreateSnapshotLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSnapshotLRO(); + } + + public static void asyncCreateSnapshotLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + CreateSnapshotRegionDiskRequest request = + CreateSnapshotRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .build(); + OperationFuture future = + regionDisksClient.createSnapshotOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_CreateSnapshot_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/SyncCreateSnapshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/SyncCreateSnapshot.java new file mode 100644 index 000000000000..4ada7b7d9064 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/SyncCreateSnapshot.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_CreateSnapshot_sync] +import com.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.Snapshot; + +public class SyncCreateSnapshot { + + public static void main(String[] args) throws Exception { + syncCreateSnapshot(); + } + + public static void syncCreateSnapshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + CreateSnapshotRegionDiskRequest request = + CreateSnapshotRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .build(); + Operation response = regionDisksClient.createSnapshotAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_CreateSnapshot_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/SyncCreateSnapshotStringStringStringSnapshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/SyncCreateSnapshotStringStringStringSnapshot.java new file mode 100644 index 000000000000..e3c5f81010b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/createsnapshot/SyncCreateSnapshotStringStringStringSnapshot.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_CreateSnapshot_StringStringStringSnapshot_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.Snapshot; + +public class SyncCreateSnapshotStringStringStringSnapshot { + + public static void main(String[] args) throws Exception { + syncCreateSnapshotStringStringStringSnapshot(); + } + + public static void syncCreateSnapshotStringStringStringSnapshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String disk = "disk3083677"; + Snapshot snapshotResource = Snapshot.newBuilder().build(); + Operation response = + regionDisksClient.createSnapshotAsync(project, region, disk, snapshotResource).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_CreateSnapshot_StringStringStringSnapshot_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/AsyncDelete.java new file mode 100644 index 000000000000..438972706651 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionDiskRequest; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + DeleteRegionDiskRequest request = + DeleteRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionDisksClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..78c1897b5348 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionDiskRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + DeleteRegionDiskRequest request = + DeleteRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionDisksClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/SyncDelete.java new file mode 100644 index 000000000000..ee952109e9e3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionDiskRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + DeleteRegionDiskRequest request = + DeleteRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionDisksClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..e27b1a1d821b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String disk = "disk3083677"; + Operation response = regionDisksClient.deleteAsync(project, region, disk).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/AsyncGet.java new file mode 100644 index 000000000000..d98735ffebc1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.GetRegionDiskRequest; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + GetRegionDiskRequest request = + GetRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionDisksClient.getCallable().futureCall(request); + // Do something. + Disk response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/SyncGet.java new file mode 100644 index 000000000000..36302d715c7b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Get_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.GetRegionDiskRequest; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + GetRegionDiskRequest request = + GetRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Disk response = regionDisksClient.get(request); + } + } +} +// [END compute_v1_generated_RegionDisks_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..4b52184c8ac0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String disk = "disk3083677"; + Disk response = regionDisksClient.get(project, region, disk); + } + } +} +// [END compute_v1_generated_RegionDisks_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..2b4edd8b5f6a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyRegionDiskRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + GetIamPolicyRegionDiskRequest request = + GetIamPolicyRegionDiskRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + ApiFuture future = regionDisksClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..f8bc87a1d29d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyRegionDiskRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + GetIamPolicyRegionDiskRequest request = + GetIamPolicyRegionDiskRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + Policy response = regionDisksClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_RegionDisks_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..a4eeac8a266a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + Policy response = regionDisksClient.getIamPolicy(project, region, resource); + } + } +} +// [END compute_v1_generated_RegionDisks_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/AsyncInsert.java new file mode 100644 index 000000000000..bc55eaa837f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/AsyncInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.InsertRegionDiskRequest; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + InsertRegionDiskRequest request = + InsertRegionDiskRequest.newBuilder() + .setDiskResource(Disk.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSourceImage("sourceImage-105174528") + .build(); + ApiFuture future = regionDisksClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..e6a5094f6681 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.InsertRegionDiskRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + InsertRegionDiskRequest request = + InsertRegionDiskRequest.newBuilder() + .setDiskResource(Disk.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSourceImage("sourceImage-105174528") + .build(); + OperationFuture future = + regionDisksClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/SyncInsert.java new file mode 100644 index 000000000000..b4b5af8a8b92 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Insert_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.InsertRegionDiskRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + InsertRegionDiskRequest request = + InsertRegionDiskRequest.newBuilder() + .setDiskResource(Disk.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSourceImage("sourceImage-105174528") + .build(); + Operation response = regionDisksClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/SyncInsertStringStringDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/SyncInsertStringStringDisk.java new file mode 100644 index 000000000000..b3ee1a9cf0d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/insert/SyncInsertStringStringDisk.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Insert_StringStringDisk_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncInsertStringStringDisk { + + public static void main(String[] args) throws Exception { + syncInsertStringStringDisk(); + } + + public static void syncInsertStringStringDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Disk diskResource = Disk.newBuilder().build(); + Operation response = regionDisksClient.insertAsync(project, region, diskResource).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Insert_StringStringDisk_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/AsyncList.java new file mode 100644 index 000000000000..523069996142 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.ListRegionDisksRequest; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + ListRegionDisksRequest request = + ListRegionDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = regionDisksClient.listPagedCallable().futureCall(request); + // Do something. + for (Disk element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionDisks_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/AsyncListPaged.java new file mode 100644 index 000000000000..8ef60bf6eab8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_List_Paged_async] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.DiskList; +import com.google.cloud.compute.v1.ListRegionDisksRequest; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + ListRegionDisksRequest request = + ListRegionDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + DiskList response = regionDisksClient.listCallable().call(request); + for (Disk element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionDisks_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/SyncList.java new file mode 100644 index 000000000000..eede20cf1d8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_List_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.ListRegionDisksRequest; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + ListRegionDisksRequest request = + ListRegionDisksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (Disk element : regionDisksClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionDisks_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/SyncListStringString.java new file mode 100644 index 000000000000..f28b49f37744 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_List_StringString_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (Disk element : regionDisksClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionDisks_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/AsyncRemoveResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/AsyncRemoveResourcePolicies.java new file mode 100644 index 000000000000..5d34c09172be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/AsyncRemoveResourcePolicies.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_RemoveResourcePolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveResourcePolicies { + + public static void main(String[] args) throws Exception { + asyncRemoveResourcePolicies(); + } + + public static void asyncRemoveResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + RemoveResourcePoliciesRegionDiskRequest request = + RemoveResourcePoliciesRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksRemoveResourcePoliciesRequestResource( + RegionDisksRemoveResourcePoliciesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionDisksClient.removeResourcePoliciesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_RemoveResourcePolicies_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java new file mode 100644 index 000000000000..96074914ef1d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/AsyncRemoveResourcePoliciesLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_RemoveResourcePolicies_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest; + +public class AsyncRemoveResourcePoliciesLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveResourcePoliciesLRO(); + } + + public static void asyncRemoveResourcePoliciesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + RemoveResourcePoliciesRegionDiskRequest request = + RemoveResourcePoliciesRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksRemoveResourcePoliciesRequestResource( + RegionDisksRemoveResourcePoliciesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionDisksClient.removeResourcePoliciesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_RemoveResourcePolicies_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/SyncRemoveResourcePolicies.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/SyncRemoveResourcePolicies.java new file mode 100644 index 000000000000..f7bb26a785e5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/SyncRemoveResourcePolicies.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_RemoveResourcePolicies_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest; +import com.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest; + +public class SyncRemoveResourcePolicies { + + public static void main(String[] args) throws Exception { + syncRemoveResourcePolicies(); + } + + public static void syncRemoveResourcePolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + RemoveResourcePoliciesRegionDiskRequest request = + RemoveResourcePoliciesRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksRemoveResourcePoliciesRequestResource( + RegionDisksRemoveResourcePoliciesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionDisksClient.removeResourcePoliciesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_RemoveResourcePolicies_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringRegiondisksremoveresourcepoliciesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringRegiondisksremoveresourcepoliciesrequest.java new file mode 100644 index 000000000000..cb53c5a7120d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/removeresourcepolicies/SyncRemoveResourcePoliciesStringStringStringRegiondisksremoveresourcepoliciesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_RemoveResourcePolicies_StringStringStringRegiondisksremoveresourcepoliciesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest; + +public class SyncRemoveResourcePoliciesStringStringStringRegiondisksremoveresourcepoliciesrequest { + + public static void main(String[] args) throws Exception { + syncRemoveResourcePoliciesStringStringStringRegiondisksremoveresourcepoliciesrequest(); + } + + public static void + syncRemoveResourcePoliciesStringStringStringRegiondisksremoveresourcepoliciesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String disk = "disk3083677"; + RegionDisksRemoveResourcePoliciesRequest regionDisksRemoveResourcePoliciesRequestResource = + RegionDisksRemoveResourcePoliciesRequest.newBuilder().build(); + Operation response = + regionDisksClient + .removeResourcePoliciesAsync( + project, region, disk, regionDisksRemoveResourcePoliciesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionDisks_RemoveResourcePolicies_StringStringStringRegiondisksremoveresourcepoliciesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/AsyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/AsyncResize.java new file mode 100644 index 000000000000..08291e83a545 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/AsyncResize.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Resize_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksResizeRequest; +import com.google.cloud.compute.v1.ResizeRegionDiskRequest; +import com.google.longrunning.Operation; + +public class AsyncResize { + + public static void main(String[] args) throws Exception { + asyncResize(); + } + + public static void asyncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + ResizeRegionDiskRequest request = + ResizeRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksResizeRequestResource(RegionDisksResizeRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionDisksClient.resizeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Resize_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/AsyncResizeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/AsyncResizeLRO.java new file mode 100644 index 000000000000..b10e335218f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/AsyncResizeLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Resize_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksResizeRequest; +import com.google.cloud.compute.v1.ResizeRegionDiskRequest; + +public class AsyncResizeLRO { + + public static void main(String[] args) throws Exception { + asyncResizeLRO(); + } + + public static void asyncResizeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + ResizeRegionDiskRequest request = + ResizeRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksResizeRequestResource(RegionDisksResizeRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionDisksClient.resizeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Resize_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/SyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/SyncResize.java new file mode 100644 index 000000000000..3d24b36c1eb5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/SyncResize.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Resize_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksResizeRequest; +import com.google.cloud.compute.v1.ResizeRegionDiskRequest; + +public class SyncResize { + + public static void main(String[] args) throws Exception { + syncResize(); + } + + public static void syncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + ResizeRegionDiskRequest request = + ResizeRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionDisksResizeRequestResource(RegionDisksResizeRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionDisksClient.resizeAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Resize_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/SyncResizeStringStringStringRegiondisksresizerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/SyncResizeStringStringStringRegiondisksresizerequest.java new file mode 100644 index 000000000000..eb667711da11 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/resize/SyncResizeStringStringStringRegiondisksresizerequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Resize_StringStringStringRegiondisksresizerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionDisksResizeRequest; + +public class SyncResizeStringStringStringRegiondisksresizerequest { + + public static void main(String[] args) throws Exception { + syncResizeStringStringStringRegiondisksresizerequest(); + } + + public static void syncResizeStringStringStringRegiondisksresizerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String disk = "disk3083677"; + RegionDisksResizeRequest regionDisksResizeRequestResource = + RegionDisksResizeRequest.newBuilder().build(); + Operation response = + regionDisksClient + .resizeAsync(project, region, disk, regionDisksResizeRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Resize_StringStringStringRegiondisksresizerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..0e8360847165 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyRegionDiskRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + SetIamPolicyRegionDiskRequest request = + SetIamPolicyRegionDiskRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = regionDisksClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..9fdf8838b004 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_SetIamPolicy_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyRegionDiskRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + SetIamPolicyRegionDiskRequest request = + SetIamPolicyRegionDiskRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = regionDisksClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_RegionDisks_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java new file mode 100644 index 000000000000..0002d6d796c4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringRegionsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringRegionsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringRegionsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetPolicyRequest regionSetPolicyRequestResource = + RegionSetPolicyRequest.newBuilder().build(); + Policy response = + regionDisksClient.setIamPolicy(project, region, resource, regionSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_RegionDisks_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..d20b128a7be6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsRegionDiskRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + SetLabelsRegionDiskRequest request = + SetLabelsRegionDiskRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + ApiFuture future = regionDisksClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..b41eee00262a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsRegionDiskRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + SetLabelsRegionDiskRequest request = + SetLabelsRegionDiskRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + OperationFuture future = + regionDisksClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..00e1315f1a23 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_SetLabels_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsRegionDiskRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + SetLabelsRegionDiskRequest request = + SetLabelsRegionDiskRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + Operation response = regionDisksClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java new file mode 100644 index 000000000000..ccfb27095af9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_SetLabels_StringStringStringRegionsetlabelsrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; + +public class SyncSetLabelsStringStringStringRegionsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringRegionsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringRegionsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetLabelsRequest regionSetLabelsRequestResource = + RegionSetLabelsRequest.newBuilder().build(); + Operation response = + regionDisksClient + .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionDisks_SetLabels_StringStringStringRegionsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..71b5653dbb20 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + TestIamPermissionsRegionDiskRequest request = + TestIamPermissionsRegionDiskRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + regionDisksClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..f369d13a1dbd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_TestIamPermissions_sync] +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + TestIamPermissionsRegionDiskRequest request = + TestIamPermissionsRegionDiskRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = regionDisksClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_RegionDisks_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..2e6b94f35e58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + regionDisksClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_RegionDisks_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/AsyncUpdate.java new file mode 100644 index 000000000000..8854d9e6649f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/AsyncUpdate.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.UpdateRegionDiskRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + UpdateRegionDiskRequest request = + UpdateRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDiskResource(Disk.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + ApiFuture future = regionDisksClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..098ff521a801 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/AsyncUpdateLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.UpdateRegionDiskRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + UpdateRegionDiskRequest request = + UpdateRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDiskResource(Disk.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + OperationFuture future = + regionDisksClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/SyncUpdate.java new file mode 100644 index 000000000000..9cfe1e24404c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Update_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; +import com.google.cloud.compute.v1.UpdateRegionDiskRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + UpdateRegionDiskRequest request = + UpdateRegionDiskRequest.newBuilder() + .setDisk("disk3083677") + .setDiskResource(Disk.newBuilder().build()) + .setPaths("paths106438894") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUpdateMask("updateMask-296147115") + .build(); + Operation response = regionDisksClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/SyncUpdateStringStringStringDisk.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/SyncUpdateStringStringStringDisk.java new file mode 100644 index 000000000000..d4bb50ba21bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisks/update/SyncUpdateStringStringStringDisk.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisks_Update_StringStringStringDisk_sync] +import com.google.cloud.compute.v1.Disk; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionDisksClient; + +public class SyncUpdateStringStringStringDisk { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringDisk(); + } + + public static void syncUpdateStringStringStringDisk() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String disk = "disk3083677"; + Disk diskResource = Disk.newBuilder().build(); + Operation response = regionDisksClient.updateAsync(project, region, disk, diskResource).get(); + } + } +} +// [END compute_v1_generated_RegionDisks_Update_StringStringStringDisk_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondiskssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondiskssettings/get/SyncGet.java new file mode 100644 index 000000000000..c7db37271d8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondiskssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDisksSettings_Get_sync] +import com.google.cloud.compute.v1.RegionDisksSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionDisksSettings.Builder regionDisksSettingsBuilder = RegionDisksSettings.newBuilder(); + regionDisksSettingsBuilder + .getSettings() + .setRetrySettings( + regionDisksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionDisksSettings regionDisksSettings = regionDisksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionDisksSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..6472582361a0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionDiskTypesClient; +import com.google.cloud.compute.v1.RegionDiskTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionDiskTypesSettings regionDiskTypesSettings = + RegionDiskTypesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionDiskTypesClient regionDiskTypesClient = + RegionDiskTypesClient.create(regionDiskTypesSettings); + } +} +// [END compute_v1_generated_RegionDiskTypes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7c47af8bae60 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionDiskTypesClient; +import com.google.cloud.compute.v1.RegionDiskTypesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionDiskTypesSettings regionDiskTypesSettings = + RegionDiskTypesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionDiskTypesClient regionDiskTypesClient = + RegionDiskTypesClient.create(regionDiskTypesSettings); + } +} +// [END compute_v1_generated_RegionDiskTypes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/AsyncGet.java new file mode 100644 index 000000000000..03076d1020d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.GetRegionDiskTypeRequest; +import com.google.cloud.compute.v1.RegionDiskTypesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDiskTypesClient regionDiskTypesClient = RegionDiskTypesClient.create()) { + GetRegionDiskTypeRequest request = + GetRegionDiskTypeRequest.newBuilder() + .setDiskType("diskType279771767") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionDiskTypesClient.getCallable().futureCall(request); + // Do something. + DiskType response = future.get(); + } + } +} +// [END compute_v1_generated_RegionDiskTypes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/SyncGet.java new file mode 100644 index 000000000000..51631b6a62a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_Get_sync] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.GetRegionDiskTypeRequest; +import com.google.cloud.compute.v1.RegionDiskTypesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDiskTypesClient regionDiskTypesClient = RegionDiskTypesClient.create()) { + GetRegionDiskTypeRequest request = + GetRegionDiskTypeRequest.newBuilder() + .setDiskType("diskType279771767") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + DiskType response = regionDiskTypesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionDiskTypes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..d9d3d1f750f3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_Get_StringStringString_sync] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.RegionDiskTypesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDiskTypesClient regionDiskTypesClient = RegionDiskTypesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String diskType = "diskType279771767"; + DiskType response = regionDiskTypesClient.get(project, region, diskType); + } + } +} +// [END compute_v1_generated_RegionDiskTypes_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/AsyncList.java new file mode 100644 index 000000000000..dac366742a38 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.ListRegionDiskTypesRequest; +import com.google.cloud.compute.v1.RegionDiskTypesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDiskTypesClient regionDiskTypesClient = RegionDiskTypesClient.create()) { + ListRegionDiskTypesRequest request = + ListRegionDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = regionDiskTypesClient.listPagedCallable().futureCall(request); + // Do something. + for (DiskType element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionDiskTypes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/AsyncListPaged.java new file mode 100644 index 000000000000..a70bc9bf6607 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_List_Paged_async] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.ListRegionDiskTypesRequest; +import com.google.cloud.compute.v1.RegionDiskTypeList; +import com.google.cloud.compute.v1.RegionDiskTypesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDiskTypesClient regionDiskTypesClient = RegionDiskTypesClient.create()) { + ListRegionDiskTypesRequest request = + ListRegionDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionDiskTypeList response = regionDiskTypesClient.listCallable().call(request); + for (DiskType element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionDiskTypes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/SyncList.java new file mode 100644 index 000000000000..73552b3b9ae3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_List_sync] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.ListRegionDiskTypesRequest; +import com.google.cloud.compute.v1.RegionDiskTypesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDiskTypesClient regionDiskTypesClient = RegionDiskTypesClient.create()) { + ListRegionDiskTypesRequest request = + ListRegionDiskTypesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (DiskType element : regionDiskTypesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionDiskTypes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/SyncListStringString.java new file mode 100644 index 000000000000..b08294191cee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypes/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypes_List_StringString_sync] +import com.google.cloud.compute.v1.DiskType; +import com.google.cloud.compute.v1.RegionDiskTypesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionDiskTypesClient regionDiskTypesClient = RegionDiskTypesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (DiskType element : regionDiskTypesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionDiskTypes_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypessettings/get/SyncGet.java new file mode 100644 index 000000000000..7671a3cb426e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiondisktypessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionDiskTypesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionDiskTypesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionDiskTypesSettings.Builder regionDiskTypesSettingsBuilder = + RegionDiskTypesSettings.newBuilder(); + regionDiskTypesSettingsBuilder + .getSettings() + .setRetrySettings( + regionDiskTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionDiskTypesSettings regionDiskTypesSettings = regionDiskTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionDiskTypesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ae096482c164 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.cloud.compute.v1.RegionHealthChecksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionHealthChecksSettings regionHealthChecksSettings = + RegionHealthChecksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionHealthChecksClient regionHealthChecksClient = + RegionHealthChecksClient.create(regionHealthChecksSettings); + } +} +// [END compute_v1_generated_RegionHealthChecks_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..8f9bdb0fa39e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.cloud.compute.v1.RegionHealthChecksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionHealthChecksSettings regionHealthChecksSettings = + RegionHealthChecksSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionHealthChecksClient regionHealthChecksClient = + RegionHealthChecksClient.create(regionHealthChecksSettings); + } +} +// [END compute_v1_generated_RegionHealthChecks_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/AsyncDelete.java new file mode 100644 index 000000000000..5450884ce102 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionHealthCheckRequest; +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + DeleteRegionHealthCheckRequest request = + DeleteRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionHealthChecksClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..d0398bcafa18 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionHealthCheckRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + DeleteRegionHealthCheckRequest request = + DeleteRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionHealthChecksClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/SyncDelete.java new file mode 100644 index 000000000000..1d56e54718f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionHealthCheckRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + DeleteRegionHealthCheckRequest request = + DeleteRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionHealthChecksClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..294573fcfbe5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String healthCheck = "healthCheck-1938093044"; + Operation response = regionHealthChecksClient.deleteAsync(project, region, healthCheck).get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/AsyncGet.java new file mode 100644 index 000000000000..018e9a4417bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionHealthCheckRequest; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + GetRegionHealthCheckRequest request = + GetRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionHealthChecksClient.getCallable().futureCall(request); + // Do something. + HealthCheck response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/SyncGet.java new file mode 100644 index 000000000000..be3a645aa11d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Get_sync] +import com.google.cloud.compute.v1.GetRegionHealthCheckRequest; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + GetRegionHealthCheckRequest request = + GetRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + HealthCheck response = regionHealthChecksClient.get(request); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..2e59a40c6d96 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Get_StringStringString_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String healthCheck = "healthCheck-1938093044"; + HealthCheck response = regionHealthChecksClient.get(project, region, healthCheck); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/AsyncInsert.java new file mode 100644 index 000000000000..f4aea67f9e1a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.InsertRegionHealthCheckRequest; +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + InsertRegionHealthCheckRequest request = + InsertRegionHealthCheckRequest.newBuilder() + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionHealthChecksClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..3dda12e534a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.InsertRegionHealthCheckRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + InsertRegionHealthCheckRequest request = + InsertRegionHealthCheckRequest.newBuilder() + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionHealthChecksClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/SyncInsert.java new file mode 100644 index 000000000000..639c522cf827 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Insert_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.InsertRegionHealthCheckRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + InsertRegionHealthCheckRequest request = + InsertRegionHealthCheckRequest.newBuilder() + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionHealthChecksClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/SyncInsertStringStringHealthcheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/SyncInsertStringStringHealthcheck.java new file mode 100644 index 000000000000..a4077f408216 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/insert/SyncInsertStringStringHealthcheck.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Insert_StringStringHealthcheck_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncInsertStringStringHealthcheck { + + public static void main(String[] args) throws Exception { + syncInsertStringStringHealthcheck(); + } + + public static void syncInsertStringStringHealthcheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + HealthCheck healthCheckResource = HealthCheck.newBuilder().build(); + Operation response = + regionHealthChecksClient.insertAsync(project, region, healthCheckResource).get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Insert_StringStringHealthcheck_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/AsyncList.java new file mode 100644 index 000000000000..960b07e344cc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.ListRegionHealthChecksRequest; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + ListRegionHealthChecksRequest request = + ListRegionHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionHealthChecksClient.listPagedCallable().futureCall(request); + // Do something. + for (HealthCheck element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionHealthChecks_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/AsyncListPaged.java new file mode 100644 index 000000000000..9c0201c6e8f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_List_Paged_async] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.HealthCheckList; +import com.google.cloud.compute.v1.ListRegionHealthChecksRequest; +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + ListRegionHealthChecksRequest request = + ListRegionHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + HealthCheckList response = regionHealthChecksClient.listCallable().call(request); + for (HealthCheck element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionHealthChecks_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/SyncList.java new file mode 100644 index 000000000000..7e051bf894ea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_List_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.ListRegionHealthChecksRequest; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + ListRegionHealthChecksRequest request = + ListRegionHealthChecksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (HealthCheck element : regionHealthChecksClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionHealthChecks_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/SyncListStringString.java new file mode 100644 index 000000000000..99cb07415806 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_List_StringString_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (HealthCheck element : regionHealthChecksClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionHealthChecks_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/AsyncPatch.java new file mode 100644 index 000000000000..92c2b266e36e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.PatchRegionHealthCheckRequest; +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + PatchRegionHealthCheckRequest request = + PatchRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionHealthChecksClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..d26cd21d9f48 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionHealthCheckRequest; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + PatchRegionHealthCheckRequest request = + PatchRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionHealthChecksClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/SyncPatch.java new file mode 100644 index 000000000000..a7eed1c006b7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Patch_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionHealthCheckRequest; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + PatchRegionHealthCheckRequest request = + PatchRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionHealthChecksClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/SyncPatchStringStringStringHealthcheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/SyncPatchStringStringStringHealthcheck.java new file mode 100644 index 000000000000..89d0ac2030b1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/patch/SyncPatchStringStringStringHealthcheck.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Patch_StringStringStringHealthcheck_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncPatchStringStringStringHealthcheck { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringHealthcheck(); + } + + public static void syncPatchStringStringStringHealthcheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String healthCheck = "healthCheck-1938093044"; + HealthCheck healthCheckResource = HealthCheck.newBuilder().build(); + Operation response = + regionHealthChecksClient + .patchAsync(project, region, healthCheck, healthCheckResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Patch_StringStringStringHealthcheck_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/AsyncUpdate.java new file mode 100644 index 000000000000..b74564cf853b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/AsyncUpdate.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.cloud.compute.v1.UpdateRegionHealthCheckRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + UpdateRegionHealthCheckRequest request = + UpdateRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionHealthChecksClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..27f293530ddd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/AsyncUpdateLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.cloud.compute.v1.UpdateRegionHealthCheckRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + UpdateRegionHealthCheckRequest request = + UpdateRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionHealthChecksClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/SyncUpdate.java new file mode 100644 index 000000000000..be68e565729d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Update_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; +import com.google.cloud.compute.v1.UpdateRegionHealthCheckRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + UpdateRegionHealthCheckRequest request = + UpdateRegionHealthCheckRequest.newBuilder() + .setHealthCheck("healthCheck-1938093044") + .setHealthCheckResource(HealthCheck.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionHealthChecksClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/SyncUpdateStringStringStringHealthcheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/SyncUpdateStringStringStringHealthcheck.java new file mode 100644 index 000000000000..ec98067aa58d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthchecks/update/SyncUpdateStringStringStringHealthcheck.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecks_Update_StringStringStringHealthcheck_sync] +import com.google.cloud.compute.v1.HealthCheck; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthChecksClient; + +public class SyncUpdateStringStringStringHealthcheck { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringHealthcheck(); + } + + public static void syncUpdateStringStringStringHealthcheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthChecksClient regionHealthChecksClient = RegionHealthChecksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String healthCheck = "healthCheck-1938093044"; + HealthCheck healthCheckResource = HealthCheck.newBuilder().build(); + Operation response = + regionHealthChecksClient + .updateAsync(project, region, healthCheck, healthCheckResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionHealthChecks_Update_StringStringStringHealthcheck_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ede4b799790f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; +import com.google.cloud.compute.v1.RegionHealthCheckServicesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionHealthCheckServicesSettings regionHealthCheckServicesSettings = + RegionHealthCheckServicesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create(regionHealthCheckServicesSettings); + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..f7c2795a3402 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; +import com.google.cloud.compute.v1.RegionHealthCheckServicesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionHealthCheckServicesSettings regionHealthCheckServicesSettings = + RegionHealthCheckServicesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create(regionHealthCheckServicesSettings); + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/AsyncDelete.java new file mode 100644 index 000000000000..4ea665f801d4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + DeleteRegionHealthCheckServiceRequest request = + DeleteRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckService("healthCheckService-917902071") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionHealthCheckServicesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..947a1d82a0e5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + DeleteRegionHealthCheckServiceRequest request = + DeleteRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckService("healthCheckService-917902071") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionHealthCheckServicesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/SyncDelete.java new file mode 100644 index 000000000000..d16207b3005a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + DeleteRegionHealthCheckServiceRequest request = + DeleteRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckService("healthCheckService-917902071") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionHealthCheckServicesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..fb7288f53e8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String healthCheckService = "healthCheckService-917902071"; + Operation response = + regionHealthCheckServicesClient.deleteAsync(project, region, healthCheckService).get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/AsyncGet.java new file mode 100644 index 000000000000..1c2dcdd4e958 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + GetRegionHealthCheckServiceRequest request = + GetRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckService("healthCheckService-917902071") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionHealthCheckServicesClient.getCallable().futureCall(request); + // Do something. + HealthCheckService response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/SyncGet.java new file mode 100644 index 000000000000..0e175cf25bf8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Get_sync] +import com.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + GetRegionHealthCheckServiceRequest request = + GetRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckService("healthCheckService-917902071") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + HealthCheckService response = regionHealthCheckServicesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..a5b3d4bddd82 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Get_StringStringString_sync] +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String healthCheckService = "healthCheckService-917902071"; + HealthCheckService response = + regionHealthCheckServicesClient.get(project, region, healthCheckService); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/AsyncInsert.java new file mode 100644 index 000000000000..cad3cc6f3cbb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + InsertRegionHealthCheckServiceRequest request = + InsertRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckServiceResource(HealthCheckService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionHealthCheckServicesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..92c7d0df823d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + InsertRegionHealthCheckServiceRequest request = + InsertRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckServiceResource(HealthCheckService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionHealthCheckServicesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/SyncInsert.java new file mode 100644 index 000000000000..58531821bc4c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Insert_sync] +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + InsertRegionHealthCheckServiceRequest request = + InsertRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckServiceResource(HealthCheckService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionHealthCheckServicesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/SyncInsertStringStringHealthcheckservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/SyncInsertStringStringHealthcheckservice.java new file mode 100644 index 000000000000..87a91d5d8194 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/insert/SyncInsertStringStringHealthcheckservice.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Insert_StringStringHealthcheckservice_sync] +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncInsertStringStringHealthcheckservice { + + public static void main(String[] args) throws Exception { + syncInsertStringStringHealthcheckservice(); + } + + public static void syncInsertStringStringHealthcheckservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + HealthCheckService healthCheckServiceResource = HealthCheckService.newBuilder().build(); + Operation response = + regionHealthCheckServicesClient + .insertAsync(project, region, healthCheckServiceResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Insert_StringStringHealthcheckservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/AsyncList.java new file mode 100644 index 000000000000..2eaa3cc965d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + ListRegionHealthCheckServicesRequest request = + ListRegionHealthCheckServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionHealthCheckServicesClient.listPagedCallable().futureCall(request); + // Do something. + for (HealthCheckService element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/AsyncListPaged.java new file mode 100644 index 000000000000..0cc8885182a1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_List_Paged_async] +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.HealthCheckServicesList; +import com.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + ListRegionHealthCheckServicesRequest request = + ListRegionHealthCheckServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + HealthCheckServicesList response = + regionHealthCheckServicesClient.listCallable().call(request); + for (HealthCheckService element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/SyncList.java new file mode 100644 index 000000000000..6cbaedea0308 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/SyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_List_sync] +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + ListRegionHealthCheckServicesRequest request = + ListRegionHealthCheckServicesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (HealthCheckService element : + regionHealthCheckServicesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/SyncListStringString.java new file mode 100644 index 000000000000..4f8ac84d6db0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_List_StringString_sync] +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (HealthCheckService element : + regionHealthCheckServicesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/AsyncPatch.java new file mode 100644 index 000000000000..f755c5306086 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/AsyncPatch.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + PatchRegionHealthCheckServiceRequest request = + PatchRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckService("healthCheckService-917902071") + .setHealthCheckServiceResource(HealthCheckService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionHealthCheckServicesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..ce33caa1104e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + PatchRegionHealthCheckServiceRequest request = + PatchRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckService("healthCheckService-917902071") + .setHealthCheckServiceResource(HealthCheckService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionHealthCheckServicesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/SyncPatch.java new file mode 100644 index 000000000000..44af11b9ae2d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Patch_sync] +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + PatchRegionHealthCheckServiceRequest request = + PatchRegionHealthCheckServiceRequest.newBuilder() + .setHealthCheckService("healthCheckService-917902071") + .setHealthCheckServiceResource(HealthCheckService.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionHealthCheckServicesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/SyncPatchStringStringStringHealthcheckservice.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/SyncPatchStringStringStringHealthcheckservice.java new file mode 100644 index 000000000000..b8bf9e4c8215 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservices/patch/SyncPatchStringStringStringHealthcheckservice.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServices_Patch_StringStringStringHealthcheckservice_sync] +import com.google.cloud.compute.v1.HealthCheckService; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionHealthCheckServicesClient; + +public class SyncPatchStringStringStringHealthcheckservice { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringHealthcheckservice(); + } + + public static void syncPatchStringStringStringHealthcheckservice() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionHealthCheckServicesClient regionHealthCheckServicesClient = + RegionHealthCheckServicesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String healthCheckService = "healthCheckService-917902071"; + HealthCheckService healthCheckServiceResource = HealthCheckService.newBuilder().build(); + Operation response = + regionHealthCheckServicesClient + .patchAsync(project, region, healthCheckService, healthCheckServiceResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionHealthCheckServices_Patch_StringStringStringHealthcheckservice_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservicessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservicessettings/get/SyncGet.java new file mode 100644 index 000000000000..117bfa251723 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckservicessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthCheckServicesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionHealthCheckServicesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionHealthCheckServicesSettings.Builder regionHealthCheckServicesSettingsBuilder = + RegionHealthCheckServicesSettings.newBuilder(); + regionHealthCheckServicesSettingsBuilder + .getSettings() + .setRetrySettings( + regionHealthCheckServicesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionHealthCheckServicesSettings regionHealthCheckServicesSettings = + regionHealthCheckServicesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionHealthCheckServicesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckssettings/get/SyncGet.java new file mode 100644 index 000000000000..8f075e503d03 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionhealthcheckssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionHealthChecksSettings_Get_sync] +import com.google.cloud.compute.v1.RegionHealthChecksSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionHealthChecksSettings.Builder regionHealthChecksSettingsBuilder = + RegionHealthChecksSettings.newBuilder(); + regionHealthChecksSettingsBuilder + .getSettings() + .setRetrySettings( + regionHealthChecksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionHealthChecksSettings regionHealthChecksSettings = + regionHealthChecksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionHealthChecksSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/AsyncAbandonInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/AsyncAbandonInstances.java new file mode 100644 index 000000000000..74671461f5d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/AsyncAbandonInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncAbandonInstances { + + public static void main(String[] args) throws Exception { + asyncAbandonInstances(); + } + + public static void asyncAbandonInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + AbandonInstancesRegionInstanceGroupManagerRequest request = + AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersAbandonInstancesRequestResource( + RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.abandonInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/AsyncAbandonInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/AsyncAbandonInstancesLRO.java new file mode 100644 index 000000000000..89058ea42bce --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/AsyncAbandonInstancesLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncAbandonInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncAbandonInstancesLRO(); + } + + public static void asyncAbandonInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + AbandonInstancesRegionInstanceGroupManagerRequest request = + AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersAbandonInstancesRequestResource( + RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient.abandonInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/SyncAbandonInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/SyncAbandonInstances.java new file mode 100644 index 000000000000..e8fb107b104e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/SyncAbandonInstances.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_sync] +import com.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncAbandonInstances { + + public static void main(String[] args) throws Exception { + syncAbandonInstances(); + } + + public static void syncAbandonInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + AbandonInstancesRegionInstanceGroupManagerRequest request = + AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersAbandonInstancesRequestResource( + RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupManagersClient.abandonInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/SyncAbandonInstancesStringStringStringRegioninstancegroupmanagersabandoninstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/SyncAbandonInstancesStringStringStringRegioninstancegroupmanagersabandoninstancesrequest.java new file mode 100644 index 000000000000..a678569ac470 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/abandoninstances/SyncAbandonInstancesStringStringStringRegioninstancegroupmanagersabandoninstancesrequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_StringStringStringRegioninstancegroupmanagersabandoninstancesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public +class SyncAbandonInstancesStringStringStringRegioninstancegroupmanagersabandoninstancesrequest { + + public static void main(String[] args) throws Exception { + syncAbandonInstancesStringStringStringRegioninstancegroupmanagersabandoninstancesrequest(); + } + + public static void + syncAbandonInstancesStringStringStringRegioninstancegroupmanagersabandoninstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagersAbandonInstancesRequest + regionInstanceGroupManagersAbandonInstancesRequestResource = + RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .abandonInstancesAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagersAbandonInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_StringStringStringRegioninstancegroupmanagersabandoninstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstances.java new file mode 100644 index 000000000000..c29e44bc71b4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstances.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncApplyUpdatesToInstances { + + public static void main(String[] args) throws Exception { + asyncApplyUpdatesToInstances(); + } + + public static void asyncApplyUpdatesToInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request = + ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersApplyUpdatesRequestResource( + RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build()) + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.applyUpdatesToInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstancesLRO.java new file mode 100644 index 000000000000..dcdb7b4ccf47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/AsyncApplyUpdatesToInstancesLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncApplyUpdatesToInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncApplyUpdatesToInstancesLRO(); + } + + public static void asyncApplyUpdatesToInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request = + ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersApplyUpdatesRequestResource( + RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build()) + .build(); + OperationFuture future = + regionInstanceGroupManagersClient + .applyUpdatesToInstancesOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstances.java new file mode 100644 index 000000000000..7ed2d997a297 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstances.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_sync] +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncApplyUpdatesToInstances { + + public static void main(String[] args) throws Exception { + syncApplyUpdatesToInstances(); + } + + public static void syncApplyUpdatesToInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request = + ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersApplyUpdatesRequestResource( + RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build()) + .build(); + Operation response = + regionInstanceGroupManagersClient.applyUpdatesToInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstancesStringStringStringRegioninstancegroupmanagersapplyupdatesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstancesStringStringStringRegioninstancegroupmanagersapplyupdatesrequest.java new file mode 100644 index 000000000000..d981f0fc49d4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/applyupdatestoinstances/SyncApplyUpdatesToInstancesStringStringStringRegioninstancegroupmanagersapplyupdatesrequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_StringStringStringRegioninstancegroupmanagersapplyupdatesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public +class SyncApplyUpdatesToInstancesStringStringStringRegioninstancegroupmanagersapplyupdatesrequest { + + public static void main(String[] args) throws Exception { + syncApplyUpdatesToInstancesStringStringStringRegioninstancegroupmanagersapplyupdatesrequest(); + } + + public static void + syncApplyUpdatesToInstancesStringStringStringRegioninstancegroupmanagersapplyupdatesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagersApplyUpdatesRequest + regionInstanceGroupManagersApplyUpdatesRequestResource = + RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .applyUpdatesToInstancesAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagersApplyUpdatesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_StringStringStringRegioninstancegroupmanagersapplyupdatesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..96d795f3990a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceGroupManagersSettings regionInstanceGroupManagersSettings = + RegionInstanceGroupManagersSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create(regionInstanceGroupManagersSettings); + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e872a94f357c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceGroupManagersSettings regionInstanceGroupManagersSettings = + RegionInstanceGroupManagersSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create(regionInstanceGroupManagersSettings); + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/AsyncCreateInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/AsyncCreateInstances.java new file mode 100644 index 000000000000..7fd3d3af46ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/AsyncCreateInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest; +import com.google.longrunning.Operation; + +public class AsyncCreateInstances { + + public static void main(String[] args) throws Exception { + asyncCreateInstances(); + } + + public static void asyncCreateInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + CreateInstancesRegionInstanceGroupManagerRequest request = + CreateInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersCreateInstancesRequestResource( + RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.createInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/AsyncCreateInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/AsyncCreateInstancesLRO.java new file mode 100644 index 000000000000..a3a1446ebebb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/AsyncCreateInstancesLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest; + +public class AsyncCreateInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncCreateInstancesLRO(); + } + + public static void asyncCreateInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + CreateInstancesRegionInstanceGroupManagerRequest request = + CreateInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersCreateInstancesRequestResource( + RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient.createInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/SyncCreateInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/SyncCreateInstances.java new file mode 100644 index 000000000000..904f8b0c7d8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/SyncCreateInstances.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_sync] +import com.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest; + +public class SyncCreateInstances { + + public static void main(String[] args) throws Exception { + syncCreateInstances(); + } + + public static void syncCreateInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + CreateInstancesRegionInstanceGroupManagerRequest request = + CreateInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersCreateInstancesRequestResource( + RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupManagersClient.createInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/SyncCreateInstancesStringStringStringRegioninstancegroupmanagerscreateinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/SyncCreateInstancesStringStringStringRegioninstancegroupmanagerscreateinstancesrequest.java new file mode 100644 index 000000000000..24137953c53d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/createinstances/SyncCreateInstancesStringStringStringRegioninstancegroupmanagerscreateinstancesrequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_StringStringStringRegioninstancegroupmanagerscreateinstancesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest; + +public +class SyncCreateInstancesStringStringStringRegioninstancegroupmanagerscreateinstancesrequest { + + public static void main(String[] args) throws Exception { + syncCreateInstancesStringStringStringRegioninstancegroupmanagerscreateinstancesrequest(); + } + + public static void + syncCreateInstancesStringStringStringRegioninstancegroupmanagerscreateinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagersCreateInstancesRequest + regionInstanceGroupManagersCreateInstancesRequestResource = + RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .createInstancesAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagersCreateInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_StringStringStringRegioninstancegroupmanagerscreateinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/AsyncDelete.java new file mode 100644 index 000000000000..09eb37012e68 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeleteRegionInstanceGroupManagerRequest request = + DeleteRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..dfa51724e9e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeleteRegionInstanceGroupManagerRequest request = + DeleteRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/SyncDelete.java new file mode 100644 index 000000000000..01bfb9d53cf4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeleteRegionInstanceGroupManagerRequest request = + DeleteRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupManagersClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..c04d339b795c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + Operation response = + regionInstanceGroupManagersClient + .deleteAsync(project, region, instanceGroupManager) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/AsyncDeleteInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/AsyncDeleteInstances.java new file mode 100644 index 000000000000..d0c2abc49057 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/AsyncDeleteInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteInstances { + + public static void main(String[] args) throws Exception { + asyncDeleteInstances(); + } + + public static void asyncDeleteInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeleteInstancesRegionInstanceGroupManagerRequest request = + DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersDeleteInstancesRequestResource( + RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.deleteInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/AsyncDeleteInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/AsyncDeleteInstancesLRO.java new file mode 100644 index 000000000000..3ef23837d7cc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/AsyncDeleteInstancesLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest; + +public class AsyncDeleteInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteInstancesLRO(); + } + + public static void asyncDeleteInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeleteInstancesRegionInstanceGroupManagerRequest request = + DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersDeleteInstancesRequestResource( + RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient.deleteInstancesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/SyncDeleteInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/SyncDeleteInstances.java new file mode 100644 index 000000000000..2d61c4dacea6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/SyncDeleteInstances.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_sync] +import com.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest; + +public class SyncDeleteInstances { + + public static void main(String[] args) throws Exception { + syncDeleteInstances(); + } + + public static void syncDeleteInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeleteInstancesRegionInstanceGroupManagerRequest request = + DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersDeleteInstancesRequestResource( + RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupManagersClient.deleteInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/SyncDeleteInstancesStringStringStringRegioninstancegroupmanagersdeleteinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/SyncDeleteInstancesStringStringStringRegioninstancegroupmanagersdeleteinstancesrequest.java new file mode 100644 index 000000000000..a1cd6ec49895 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteinstances/SyncDeleteInstancesStringStringStringRegioninstancegroupmanagersdeleteinstancesrequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_StringStringStringRegioninstancegroupmanagersdeleteinstancesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest; + +public +class SyncDeleteInstancesStringStringStringRegioninstancegroupmanagersdeleteinstancesrequest { + + public static void main(String[] args) throws Exception { + syncDeleteInstancesStringStringStringRegioninstancegroupmanagersdeleteinstancesrequest(); + } + + public static void + syncDeleteInstancesStringStringStringRegioninstancegroupmanagersdeleteinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagersDeleteInstancesRequest + regionInstanceGroupManagersDeleteInstancesRequestResource = + RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .deleteInstancesAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagersDeleteInstancesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_StringStringStringRegioninstancegroupmanagersdeleteinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigs.java new file mode 100644 index 000000000000..99de5c22288f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigs.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncDeletePerInstanceConfigs { + + public static void main(String[] args) throws Exception { + asyncDeletePerInstanceConfigs(); + } + + public static void asyncDeletePerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request = + DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerDeleteInstanceConfigReqResource( + RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build()) + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.deletePerInstanceConfigsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigsLRO.java new file mode 100644 index 000000000000..0dfa1e03ae97 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/AsyncDeletePerInstanceConfigsLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncDeletePerInstanceConfigsLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePerInstanceConfigsLRO(); + } + + public static void asyncDeletePerInstanceConfigsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request = + DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerDeleteInstanceConfigReqResource( + RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build()) + .build(); + OperationFuture future = + regionInstanceGroupManagersClient + .deletePerInstanceConfigsOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigs.java new file mode 100644 index 000000000000..437160389ea5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigs.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_sync] +import com.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncDeletePerInstanceConfigs { + + public static void main(String[] args) throws Exception { + syncDeletePerInstanceConfigs(); + } + + public static void syncDeletePerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request = + DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerDeleteInstanceConfigReqResource( + RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build()) + .build(); + Operation response = + regionInstanceGroupManagersClient.deletePerInstanceConfigsAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigsStringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigsStringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq.java new file mode 100644 index 000000000000..be560fb5651a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/deleteperinstanceconfigs/SyncDeletePerInstanceConfigsStringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_StringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public +class SyncDeletePerInstanceConfigsStringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq { + + public static void main(String[] args) throws Exception { + syncDeletePerInstanceConfigsStringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq(); + } + + public static void + syncDeletePerInstanceConfigsStringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagerDeleteInstanceConfigReq + regionInstanceGroupManagerDeleteInstanceConfigReqResource = + RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .deletePerInstanceConfigsAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagerDeleteInstanceConfigReqResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_StringStringStringRegioninstancegroupmanagerdeleteinstanceconfigreq_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/AsyncGet.java new file mode 100644 index 000000000000..a747c4eee601 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + GetRegionInstanceGroupManagerRequest request = + GetRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.getCallable().futureCall(request); + // Do something. + InstanceGroupManager response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/SyncGet.java new file mode 100644 index 000000000000..d129e11b139c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Get_sync] +import com.google.cloud.compute.v1.GetRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + GetRegionInstanceGroupManagerRequest request = + GetRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + InstanceGroupManager response = regionInstanceGroupManagersClient.get(request); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..9e4fb9ab7b08 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Get_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManager response = + regionInstanceGroupManagersClient.get(project, region, instanceGroupManager); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/AsyncInsert.java new file mode 100644 index 000000000000..35db316ad56c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + InsertRegionInstanceGroupManagerRequest request = + InsertRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..98bb85dd39a5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + InsertRegionInstanceGroupManagerRequest request = + InsertRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/SyncInsert.java new file mode 100644 index 000000000000..e1fed15b7021 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + InsertRegionInstanceGroupManagerRequest request = + InsertRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupManagersClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/SyncInsertStringStringInstancegroupmanager.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/SyncInsertStringStringInstancegroupmanager.java new file mode 100644 index 000000000000..d6686cac889a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/insert/SyncInsertStringStringInstancegroupmanager.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Insert_StringStringInstancegroupmanager_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncInsertStringStringInstancegroupmanager { + + public static void main(String[] args) throws Exception { + syncInsertStringStringInstancegroupmanager(); + } + + public static void syncInsertStringStringInstancegroupmanager() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .insertAsync(project, region, instanceGroupManagerResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Insert_StringStringInstancegroupmanager_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/AsyncList.java new file mode 100644 index 000000000000..c49d5db2759a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListRegionInstanceGroupManagersRequest request = + ListRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.listPagedCallable().futureCall(request); + // Do something. + for (InstanceGroupManager element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/AsyncListPaged.java new file mode 100644 index 000000000000..bd89dcc9b41f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_List_Paged_async] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerList; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListRegionInstanceGroupManagersRequest request = + ListRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionInstanceGroupManagerList response = + regionInstanceGroupManagersClient.listCallable().call(request); + for (InstanceGroupManager element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/SyncList.java new file mode 100644 index 000000000000..5916d9e1b75e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/SyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_List_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListRegionInstanceGroupManagersRequest request = + ListRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (InstanceGroupManager element : + regionInstanceGroupManagersClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/SyncListStringString.java new file mode 100644 index 000000000000..3f60a7a0ae01 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_List_StringString_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (InstanceGroupManager element : + regionInstanceGroupManagersClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/AsyncListErrors.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/AsyncListErrors.java new file mode 100644 index 000000000000..354201c5c7e9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/AsyncListErrors.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListErrors_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncListErrors { + + public static void main(String[] args) throws Exception { + asyncListErrors(); + } + + public static void asyncListErrors() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListErrorsRegionInstanceGroupManagersRequest request = + ListErrorsRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.listErrorsPagedCallable().futureCall(request); + // Do something. + for (InstanceManagedByIgmError element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListErrors_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/AsyncListErrorsPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/AsyncListErrorsPaged.java new file mode 100644 index 000000000000..945186e45d91 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/AsyncListErrorsPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListErrors_Paged_async] +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersListErrorsResponse; +import com.google.common.base.Strings; + +public class AsyncListErrorsPaged { + + public static void main(String[] args) throws Exception { + asyncListErrorsPaged(); + } + + public static void asyncListErrorsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListErrorsRegionInstanceGroupManagersRequest request = + ListErrorsRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionInstanceGroupManagersListErrorsResponse response = + regionInstanceGroupManagersClient.listErrorsCallable().call(request); + for (InstanceManagedByIgmError element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListErrors_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/SyncListErrors.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/SyncListErrors.java new file mode 100644 index 000000000000..a565eed2966f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/SyncListErrors.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListErrors_sync] +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncListErrors { + + public static void main(String[] args) throws Exception { + syncListErrors(); + } + + public static void syncListErrors() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListErrorsRegionInstanceGroupManagersRequest request = + ListErrorsRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (InstanceManagedByIgmError element : + regionInstanceGroupManagersClient.listErrors(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListErrors_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/SyncListErrorsStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/SyncListErrorsStringStringString.java new file mode 100644 index 000000000000..903cd2a081a2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listerrors/SyncListErrorsStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListErrors_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncListErrorsStringStringString { + + public static void main(String[] args) throws Exception { + syncListErrorsStringStringString(); + } + + public static void syncListErrorsStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + for (InstanceManagedByIgmError element : + regionInstanceGroupManagersClient + .listErrors(project, region, instanceGroupManager) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListErrors_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/AsyncListManagedInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/AsyncListManagedInstances.java new file mode 100644 index 000000000000..b926049edd7b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/AsyncListManagedInstances.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListManagedInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.ManagedInstance; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncListManagedInstances { + + public static void main(String[] args) throws Exception { + asyncListManagedInstances(); + } + + public static void asyncListManagedInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListManagedInstancesRegionInstanceGroupManagersRequest request = + ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.listManagedInstancesPagedCallable().futureCall(request); + // Do something. + for (ManagedInstance element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListManagedInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/AsyncListManagedInstancesPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/AsyncListManagedInstancesPaged.java new file mode 100644 index 000000000000..eb23f6496e10 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/AsyncListManagedInstancesPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListManagedInstances_Paged_async] +import com.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.ManagedInstance; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersListInstancesResponse; +import com.google.common.base.Strings; + +public class AsyncListManagedInstancesPaged { + + public static void main(String[] args) throws Exception { + asyncListManagedInstancesPaged(); + } + + public static void asyncListManagedInstancesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListManagedInstancesRegionInstanceGroupManagersRequest request = + ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionInstanceGroupManagersListInstancesResponse response = + regionInstanceGroupManagersClient.listManagedInstancesCallable().call(request); + for (ManagedInstance element : response.getManagedInstancesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListManagedInstances_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/SyncListManagedInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/SyncListManagedInstances.java new file mode 100644 index 000000000000..9b584ba77ee6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/SyncListManagedInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListManagedInstances_sync] +import com.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.ManagedInstance; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncListManagedInstances { + + public static void main(String[] args) throws Exception { + syncListManagedInstances(); + } + + public static void syncListManagedInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListManagedInstancesRegionInstanceGroupManagersRequest request = + ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (ManagedInstance element : + regionInstanceGroupManagersClient.listManagedInstances(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListManagedInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/SyncListManagedInstancesStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/SyncListManagedInstancesStringStringString.java new file mode 100644 index 000000000000..9e8c6a36a440 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listmanagedinstances/SyncListManagedInstancesStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListManagedInstances_StringStringString_sync] +import com.google.cloud.compute.v1.ManagedInstance; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncListManagedInstancesStringStringString { + + public static void main(String[] args) throws Exception { + syncListManagedInstancesStringStringString(); + } + + public static void syncListManagedInstancesStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + for (ManagedInstance element : + regionInstanceGroupManagersClient + .listManagedInstances(project, region, instanceGroupManager) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListManagedInstances_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigs.java new file mode 100644 index 000000000000..591d48441ccd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigs.java @@ -0,0 +1,61 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.PerInstanceConfig; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncListPerInstanceConfigs { + + public static void main(String[] args) throws Exception { + asyncListPerInstanceConfigs(); + } + + public static void asyncListPerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListPerInstanceConfigsRegionInstanceGroupManagersRequest request = + ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionInstanceGroupManagersClient + .listPerInstanceConfigsPagedCallable() + .futureCall(request); + // Do something. + for (PerInstanceConfig element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigsPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigsPaged.java new file mode 100644 index 000000000000..45bcaffa79ee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/AsyncListPerInstanceConfigsPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_Paged_async] +import com.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.PerInstanceConfig; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersListInstanceConfigsResp; +import com.google.common.base.Strings; + +public class AsyncListPerInstanceConfigsPaged { + + public static void main(String[] args) throws Exception { + asyncListPerInstanceConfigsPaged(); + } + + public static void asyncListPerInstanceConfigsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListPerInstanceConfigsRegionInstanceGroupManagersRequest request = + ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionInstanceGroupManagersListInstanceConfigsResp response = + regionInstanceGroupManagersClient.listPerInstanceConfigsCallable().call(request); + for (PerInstanceConfig element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigs.java new file mode 100644 index 000000000000..1c6e3e42b830 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigs.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_sync] +import com.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest; +import com.google.cloud.compute.v1.PerInstanceConfig; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncListPerInstanceConfigs { + + public static void main(String[] args) throws Exception { + syncListPerInstanceConfigs(); + } + + public static void syncListPerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ListPerInstanceConfigsRegionInstanceGroupManagersRequest request = + ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroupManager("instanceGroupManager-388242077") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (PerInstanceConfig element : + regionInstanceGroupManagersClient.listPerInstanceConfigs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigsStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigsStringStringString.java new file mode 100644 index 000000000000..80482edf27fc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/listperinstanceconfigs/SyncListPerInstanceConfigsStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_StringStringString_sync] +import com.google.cloud.compute.v1.PerInstanceConfig; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncListPerInstanceConfigsStringStringString { + + public static void main(String[] args) throws Exception { + syncListPerInstanceConfigsStringStringString(); + } + + public static void syncListPerInstanceConfigsStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + for (PerInstanceConfig element : + regionInstanceGroupManagersClient + .listPerInstanceConfigs(project, region, instanceGroupManager) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/AsyncPatch.java new file mode 100644 index 000000000000..fd9a598b15e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/AsyncPatch.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + PatchRegionInstanceGroupManagerRequest request = + PatchRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..40e97d56f697 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + PatchRegionInstanceGroupManagerRequest request = + PatchRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/SyncPatch.java new file mode 100644 index 000000000000..4dc602ce6588 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Patch_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + PatchRegionInstanceGroupManagerRequest request = + PatchRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupManagersClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/SyncPatchStringStringStringInstancegroupmanager.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/SyncPatchStringStringStringInstancegroupmanager.java new file mode 100644 index 000000000000..ef475574777a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patch/SyncPatchStringStringStringInstancegroupmanager.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Patch_StringStringStringInstancegroupmanager_sync] +import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncPatchStringStringStringInstancegroupmanager { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringInstancegroupmanager(); + } + + public static void syncPatchStringStringStringInstancegroupmanager() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .patchAsync(project, region, instanceGroupManager, instanceGroupManagerResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Patch_StringStringStringInstancegroupmanager_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigs.java new file mode 100644 index 000000000000..2f290263fd5b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigs.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.longrunning.Operation; + +public class AsyncPatchPerInstanceConfigs { + + public static void main(String[] args) throws Exception { + asyncPatchPerInstanceConfigs(); + } + + public static void asyncPatchPerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request = + PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerPatchInstanceConfigReqResource( + RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.patchPerInstanceConfigsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigsLRO.java new file mode 100644 index 000000000000..0b6caaf83078 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/AsyncPatchPerInstanceConfigsLRO.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class AsyncPatchPerInstanceConfigsLRO { + + public static void main(String[] args) throws Exception { + asyncPatchPerInstanceConfigsLRO(); + } + + public static void asyncPatchPerInstanceConfigsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request = + PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerPatchInstanceConfigReqResource( + RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient + .patchPerInstanceConfigsOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigs.java new file mode 100644 index 000000000000..8a2338fbc045 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigs.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncPatchPerInstanceConfigs { + + public static void main(String[] args) throws Exception { + syncPatchPerInstanceConfigs(); + } + + public static void syncPatchPerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request = + PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerPatchInstanceConfigReqResource( + RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = + regionInstanceGroupManagersClient.patchPerInstanceConfigsAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigsStringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigsStringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq.java new file mode 100644 index 000000000000..b4b69a9f87e0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/patchperinstanceconfigs/SyncPatchPerInstanceConfigsStringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_StringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public +class SyncPatchPerInstanceConfigsStringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq { + + public static void main(String[] args) throws Exception { + syncPatchPerInstanceConfigsStringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq(); + } + + public static void + syncPatchPerInstanceConfigsStringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagerPatchInstanceConfigReq + regionInstanceGroupManagerPatchInstanceConfigReqResource = + RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .patchPerInstanceConfigsAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagerPatchInstanceConfigReqResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_StringStringStringRegioninstancegroupmanagerpatchinstanceconfigreq_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/AsyncRecreateInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/AsyncRecreateInstances.java new file mode 100644 index 000000000000..78e67798fdc4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/AsyncRecreateInstances.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest; +import com.google.longrunning.Operation; + +public class AsyncRecreateInstances { + + public static void main(String[] args) throws Exception { + asyncRecreateInstances(); + } + + public static void asyncRecreateInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + RecreateInstancesRegionInstanceGroupManagerRequest request = + RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersRecreateRequestResource( + RegionInstanceGroupManagersRecreateRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.recreateInstancesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/AsyncRecreateInstancesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/AsyncRecreateInstancesLRO.java new file mode 100644 index 000000000000..dce8fcb03dc2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/AsyncRecreateInstancesLRO.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest; + +public class AsyncRecreateInstancesLRO { + + public static void main(String[] args) throws Exception { + asyncRecreateInstancesLRO(); + } + + public static void asyncRecreateInstancesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + RecreateInstancesRegionInstanceGroupManagerRequest request = + RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersRecreateRequestResource( + RegionInstanceGroupManagersRecreateRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient + .recreateInstancesOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/SyncRecreateInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/SyncRecreateInstances.java new file mode 100644 index 000000000000..eed1f94e867f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/SyncRecreateInstances.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest; + +public class SyncRecreateInstances { + + public static void main(String[] args) throws Exception { + syncRecreateInstances(); + } + + public static void syncRecreateInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + RecreateInstancesRegionInstanceGroupManagerRequest request = + RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersRecreateRequestResource( + RegionInstanceGroupManagersRecreateRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupManagersClient.recreateInstancesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/SyncRecreateInstancesStringStringStringRegioninstancegroupmanagersrecreaterequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/SyncRecreateInstancesStringStringStringRegioninstancegroupmanagersrecreaterequest.java new file mode 100644 index 000000000000..fedcf6bc5366 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/recreateinstances/SyncRecreateInstancesStringStringStringRegioninstancegroupmanagersrecreaterequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_StringStringStringRegioninstancegroupmanagersrecreaterequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest; + +public class SyncRecreateInstancesStringStringStringRegioninstancegroupmanagersrecreaterequest { + + public static void main(String[] args) throws Exception { + syncRecreateInstancesStringStringStringRegioninstancegroupmanagersrecreaterequest(); + } + + public static void + syncRecreateInstancesStringStringStringRegioninstancegroupmanagersrecreaterequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagersRecreateRequest + regionInstanceGroupManagersRecreateRequestResource = + RegionInstanceGroupManagersRecreateRequest.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .recreateInstancesAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagersRecreateRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_StringStringStringRegioninstancegroupmanagersrecreaterequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/AsyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/AsyncResize.java new file mode 100644 index 000000000000..aa0f9df260ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/AsyncResize.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Resize_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncResize { + + public static void main(String[] args) throws Exception { + asyncResize(); + } + + public static void asyncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ResizeRegionInstanceGroupManagerRequest request = + ResizeRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSize(3530753) + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.resizeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Resize_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/AsyncResizeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/AsyncResizeLRO.java new file mode 100644 index 000000000000..748457884099 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/AsyncResizeLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Resize_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest; + +public class AsyncResizeLRO { + + public static void main(String[] args) throws Exception { + asyncResizeLRO(); + } + + public static void asyncResizeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ResizeRegionInstanceGroupManagerRequest request = + ResizeRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSize(3530753) + .build(); + OperationFuture future = + regionInstanceGroupManagersClient.resizeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Resize_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/SyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/SyncResize.java new file mode 100644 index 000000000000..5923c61d92fa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/SyncResize.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Resize_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest; + +public class SyncResize { + + public static void main(String[] args) throws Exception { + syncResize(); + } + + public static void syncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + ResizeRegionInstanceGroupManagerRequest request = + ResizeRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSize(3530753) + .build(); + Operation response = regionInstanceGroupManagersClient.resizeAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Resize_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/SyncResizeStringStringStringInt.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/SyncResizeStringStringStringInt.java new file mode 100644 index 000000000000..78fabe362621 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/resize/SyncResizeStringStringStringInt.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_Resize_StringStringStringInt_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public class SyncResizeStringStringStringInt { + + public static void main(String[] args) throws Exception { + syncResizeStringStringStringInt(); + } + + public static void syncResizeStringStringStringInt() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + int size = 3530753; + Operation response = + regionInstanceGroupManagersClient + .resizeAsync(project, region, instanceGroupManager, size) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_Resize_StringStringStringInt_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplate.java new file mode 100644 index 000000000000..8983bf09e4e8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplate.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_SetInstanceTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTemplateRequest; +import com.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncSetInstanceTemplate { + + public static void main(String[] args) throws Exception { + asyncSetInstanceTemplate(); + } + + public static void asyncSetInstanceTemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + SetInstanceTemplateRegionInstanceGroupManagerRequest request = + SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersSetTemplateRequestResource( + RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.setInstanceTemplateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_SetInstanceTemplate_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplateLRO.java new file mode 100644 index 000000000000..b0c8291017ac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/AsyncSetInstanceTemplateLRO.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_SetInstanceTemplate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTemplateRequest; +import com.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest; + +public class AsyncSetInstanceTemplateLRO { + + public static void main(String[] args) throws Exception { + asyncSetInstanceTemplateLRO(); + } + + public static void asyncSetInstanceTemplateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + SetInstanceTemplateRegionInstanceGroupManagerRequest request = + SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersSetTemplateRequestResource( + RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient + .setInstanceTemplateOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_SetInstanceTemplate_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplate.java new file mode 100644 index 000000000000..33bdb689664b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplate.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_SetInstanceTemplate_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTemplateRequest; +import com.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest; + +public class SyncSetInstanceTemplate { + + public static void main(String[] args) throws Exception { + syncSetInstanceTemplate(); + } + + public static void syncSetInstanceTemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + SetInstanceTemplateRegionInstanceGroupManagerRequest request = + SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersSetTemplateRequestResource( + RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = + regionInstanceGroupManagersClient.setInstanceTemplateAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_SetInstanceTemplate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplateStringStringStringRegioninstancegroupmanagerssettemplaterequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplateStringStringStringRegioninstancegroupmanagerssettemplaterequest.java new file mode 100644 index 000000000000..c508bf490a9e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/setinstancetemplate/SyncSetInstanceTemplateStringStringStringRegioninstancegroupmanagerssettemplaterequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_SetInstanceTemplate_StringStringStringRegioninstancegroupmanagerssettemplaterequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTemplateRequest; + +public +class SyncSetInstanceTemplateStringStringStringRegioninstancegroupmanagerssettemplaterequest { + + public static void main(String[] args) throws Exception { + syncSetInstanceTemplateStringStringStringRegioninstancegroupmanagerssettemplaterequest(); + } + + public static void + syncSetInstanceTemplateStringStringStringRegioninstancegroupmanagerssettemplaterequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagersSetTemplateRequest + regionInstanceGroupManagersSetTemplateRequestResource = + RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .setInstanceTemplateAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagersSetTemplateRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_SetInstanceTemplate_StringStringStringRegioninstancegroupmanagerssettemplaterequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/AsyncSetTargetPools.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/AsyncSetTargetPools.java new file mode 100644 index 000000000000..ff51f0947752 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/AsyncSetTargetPools.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_SetTargetPools_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest; +import com.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncSetTargetPools { + + public static void main(String[] args) throws Exception { + asyncSetTargetPools(); + } + + public static void asyncSetTargetPools() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + SetTargetPoolsRegionInstanceGroupManagerRequest request = + SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersSetTargetPoolsRequestResource( + RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.setTargetPoolsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_SetTargetPools_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/AsyncSetTargetPoolsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/AsyncSetTargetPoolsLRO.java new file mode 100644 index 000000000000..d750dfb93b21 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/AsyncSetTargetPoolsLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_SetTargetPools_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest; +import com.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest; + +public class AsyncSetTargetPoolsLRO { + + public static void main(String[] args) throws Exception { + asyncSetTargetPoolsLRO(); + } + + public static void asyncSetTargetPoolsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + SetTargetPoolsRegionInstanceGroupManagerRequest request = + SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersSetTargetPoolsRequestResource( + RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient.setTargetPoolsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_SetTargetPools_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/SyncSetTargetPools.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/SyncSetTargetPools.java new file mode 100644 index 000000000000..45e09d0dcc03 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/SyncSetTargetPools.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_SetTargetPools_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest; +import com.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest; + +public class SyncSetTargetPools { + + public static void main(String[] args) throws Exception { + syncSetTargetPools(); + } + + public static void syncSetTargetPools() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + SetTargetPoolsRegionInstanceGroupManagerRequest request = + SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagersSetTargetPoolsRequestResource( + RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupManagersClient.setTargetPoolsAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_SetTargetPools_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/SyncSetTargetPoolsStringStringStringRegioninstancegroupmanagerssettargetpoolsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/SyncSetTargetPoolsStringStringStringRegioninstancegroupmanagerssettargetpoolsrequest.java new file mode 100644 index 000000000000..c5eb975f9e66 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/settargetpools/SyncSetTargetPoolsStringStringStringRegioninstancegroupmanagerssettargetpoolsrequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_SetTargetPools_StringStringStringRegioninstancegroupmanagerssettargetpoolsrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest; + +public class SyncSetTargetPoolsStringStringStringRegioninstancegroupmanagerssettargetpoolsrequest { + + public static void main(String[] args) throws Exception { + syncSetTargetPoolsStringStringStringRegioninstancegroupmanagerssettargetpoolsrequest(); + } + + public static void + syncSetTargetPoolsStringStringStringRegioninstancegroupmanagerssettargetpoolsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagersSetTargetPoolsRequest + regionInstanceGroupManagersSetTargetPoolsRequestResource = + RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .setTargetPoolsAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagersSetTargetPoolsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_SetTargetPools_StringStringStringRegioninstancegroupmanagerssettargetpoolsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigs.java new file mode 100644 index 000000000000..545149b13b65 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigs.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdatePerInstanceConfigs { + + public static void main(String[] args) throws Exception { + asyncUpdatePerInstanceConfigs(); + } + + public static void asyncUpdatePerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request = + UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerUpdateInstanceConfigReqResource( + RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupManagersClient.updatePerInstanceConfigsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigsLRO.java new file mode 100644 index 000000000000..fe29351b17ca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/AsyncUpdatePerInstanceConfigsLRO.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest; + +public class AsyncUpdatePerInstanceConfigsLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePerInstanceConfigsLRO(); + } + + public static void asyncUpdatePerInstanceConfigsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request = + UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerUpdateInstanceConfigReqResource( + RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupManagersClient + .updatePerInstanceConfigsOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigs.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigs.java new file mode 100644 index 000000000000..eb27fc11bbcb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigs.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; +import com.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest; + +public class SyncUpdatePerInstanceConfigs { + + public static void main(String[] args) throws Exception { + syncUpdatePerInstanceConfigs(); + } + + public static void syncUpdatePerInstanceConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request = + UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder() + .setInstanceGroupManager("instanceGroupManager-388242077") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupManagerUpdateInstanceConfigReqResource( + RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = + regionInstanceGroupManagersClient.updatePerInstanceConfigsAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigsStringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigsStringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq.java new file mode 100644 index 000000000000..d499a72ad4d8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagers/updateperinstanceconfigs/SyncUpdatePerInstanceConfigsStringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_StringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersClient; + +public +class SyncUpdatePerInstanceConfigsStringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq { + + public static void main(String[] args) throws Exception { + syncUpdatePerInstanceConfigsStringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq(); + } + + public static void + syncUpdatePerInstanceConfigsStringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient = + RegionInstanceGroupManagersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroupManager = "instanceGroupManager-388242077"; + RegionInstanceGroupManagerUpdateInstanceConfigReq + regionInstanceGroupManagerUpdateInstanceConfigReqResource = + RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build(); + Operation response = + regionInstanceGroupManagersClient + .updatePerInstanceConfigsAsync( + project, + region, + instanceGroupManager, + regionInstanceGroupManagerUpdateInstanceConfigReqResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_StringStringStringRegioninstancegroupmanagerupdateinstanceconfigreq_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagerssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagerssettings/get/SyncGet.java new file mode 100644 index 000000000000..8a0fecf1736f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupmanagerssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagersSettings_Get_sync] +import com.google.cloud.compute.v1.RegionInstanceGroupManagersSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceGroupManagersSettings.Builder regionInstanceGroupManagersSettingsBuilder = + RegionInstanceGroupManagersSettings.newBuilder(); + regionInstanceGroupManagersSettingsBuilder + .getSettings() + .setRetrySettings( + regionInstanceGroupManagersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionInstanceGroupManagersSettings regionInstanceGroupManagersSettings = + regionInstanceGroupManagersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionInstanceGroupManagersSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..265c1fa6d4e5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceGroupsSettings regionInstanceGroupsSettings = + RegionInstanceGroupsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create(regionInstanceGroupsSettings); + } +} +// [END compute_v1_generated_RegionInstanceGroups_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..05558a63713f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceGroupsSettings regionInstanceGroupsSettings = + RegionInstanceGroupsSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create(regionInstanceGroupsSettings); + } +} +// [END compute_v1_generated_RegionInstanceGroups_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/AsyncGet.java new file mode 100644 index 000000000000..a57fb92057de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + GetRegionInstanceGroupRequest request = + GetRegionInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionInstanceGroupsClient.getCallable().futureCall(request); + // Do something. + InstanceGroup response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/SyncGet.java new file mode 100644 index 000000000000..66e87b11719f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_Get_sync] +import com.google.cloud.compute.v1.GetRegionInstanceGroupRequest; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + GetRegionInstanceGroupRequest request = + GetRegionInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + InstanceGroup response = regionInstanceGroupsClient.get(request); + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..2b55bd1162e8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_Get_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroup = "instanceGroup-1404696854"; + InstanceGroup response = regionInstanceGroupsClient.get(project, region, instanceGroup); + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/AsyncList.java new file mode 100644 index 000000000000..f78890f57757 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.ListRegionInstanceGroupsRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + ListRegionInstanceGroupsRequest request = + ListRegionInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionInstanceGroupsClient.listPagedCallable().futureCall(request); + // Do something. + for (InstanceGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/AsyncListPaged.java new file mode 100644 index 000000000000..c1616088ec67 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_List_Paged_async] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.ListRegionInstanceGroupsRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupList; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + ListRegionInstanceGroupsRequest request = + ListRegionInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionInstanceGroupList response = regionInstanceGroupsClient.listCallable().call(request); + for (InstanceGroup element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/SyncList.java new file mode 100644 index 000000000000..b711ffb03541 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_List_sync] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.ListRegionInstanceGroupsRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + ListRegionInstanceGroupsRequest request = + ListRegionInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (InstanceGroup element : regionInstanceGroupsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/SyncListStringString.java new file mode 100644 index 000000000000..bfda13447ce0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_List_StringString_sync] +import com.google.cloud.compute.v1.InstanceGroup; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (InstanceGroup element : regionInstanceGroupsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/AsyncListInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/AsyncListInstances.java new file mode 100644 index 000000000000..aecc651192c7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/AsyncListInstances.java @@ -0,0 +1,62 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_ListInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceWithNamedPorts; +import com.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequest; + +public class AsyncListInstances { + + public static void main(String[] args) throws Exception { + asyncListInstances(); + } + + public static void asyncListInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + ListInstancesRegionInstanceGroupsRequest request = + ListInstancesRegionInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroup("instanceGroup-1404696854") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupsListInstancesRequestResource( + RegionInstanceGroupsListInstancesRequest.newBuilder().build()) + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionInstanceGroupsClient.listInstancesPagedCallable().futureCall(request); + // Do something. + for (InstanceWithNamedPorts element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_ListInstances_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/AsyncListInstancesPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/AsyncListInstancesPaged.java new file mode 100644 index 000000000000..e3fd331e5360 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/AsyncListInstancesPaged.java @@ -0,0 +1,70 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_ListInstances_Paged_async] +import com.google.cloud.compute.v1.InstanceWithNamedPorts; +import com.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsListInstances; +import com.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequest; +import com.google.common.base.Strings; + +public class AsyncListInstancesPaged { + + public static void main(String[] args) throws Exception { + asyncListInstancesPaged(); + } + + public static void asyncListInstancesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + ListInstancesRegionInstanceGroupsRequest request = + ListInstancesRegionInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroup("instanceGroup-1404696854") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupsListInstancesRequestResource( + RegionInstanceGroupsListInstancesRequest.newBuilder().build()) + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionInstanceGroupsListInstances response = + regionInstanceGroupsClient.listInstancesCallable().call(request); + for (InstanceWithNamedPorts element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_ListInstances_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/SyncListInstances.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/SyncListInstances.java new file mode 100644 index 000000000000..5f3918a4a520 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/SyncListInstances.java @@ -0,0 +1,59 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_ListInstances_sync] +import com.google.cloud.compute.v1.InstanceWithNamedPorts; +import com.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequest; + +public class SyncListInstances { + + public static void main(String[] args) throws Exception { + syncListInstances(); + } + + public static void syncListInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + ListInstancesRegionInstanceGroupsRequest request = + ListInstancesRegionInstanceGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setInstanceGroup("instanceGroup-1404696854") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupsListInstancesRequestResource( + RegionInstanceGroupsListInstancesRequest.newBuilder().build()) + .setReturnPartialSuccess(true) + .build(); + for (InstanceWithNamedPorts element : + regionInstanceGroupsClient.listInstances(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_ListInstances_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/SyncListInstancesStringStringStringRegioninstancegroupslistinstancesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/SyncListInstancesStringStringStringRegioninstancegroupslistinstancesrequest.java new file mode 100644 index 000000000000..135c5df31268 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/listinstances/SyncListInstancesStringStringStringRegioninstancegroupslistinstancesrequest.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_ListInstances_StringStringStringRegioninstancegroupslistinstancesrequest_sync] +import com.google.cloud.compute.v1.InstanceWithNamedPorts; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequest; + +public class SyncListInstancesStringStringStringRegioninstancegroupslistinstancesrequest { + + public static void main(String[] args) throws Exception { + syncListInstancesStringStringStringRegioninstancegroupslistinstancesrequest(); + } + + public static void syncListInstancesStringStringStringRegioninstancegroupslistinstancesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroup = "instanceGroup-1404696854"; + RegionInstanceGroupsListInstancesRequest regionInstanceGroupsListInstancesRequestResource = + RegionInstanceGroupsListInstancesRequest.newBuilder().build(); + for (InstanceWithNamedPorts element : + regionInstanceGroupsClient + .listInstances( + project, region, instanceGroup, regionInstanceGroupsListInstancesRequestResource) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_ListInstances_StringStringStringRegioninstancegroupslistinstancesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/AsyncSetNamedPorts.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/AsyncSetNamedPorts.java new file mode 100644 index 000000000000..9b622ea39edb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/AsyncSetNamedPorts.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_SetNamedPorts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsSetNamedPortsRequest; +import com.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest; +import com.google.longrunning.Operation; + +public class AsyncSetNamedPorts { + + public static void main(String[] args) throws Exception { + asyncSetNamedPorts(); + } + + public static void asyncSetNamedPorts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + SetNamedPortsRegionInstanceGroupRequest request = + SetNamedPortsRegionInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupsSetNamedPortsRequestResource( + RegionInstanceGroupsSetNamedPortsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceGroupsClient.setNamedPortsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_SetNamedPorts_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/AsyncSetNamedPortsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/AsyncSetNamedPortsLRO.java new file mode 100644 index 000000000000..9bceeee3ccd7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/AsyncSetNamedPortsLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_SetNamedPorts_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsSetNamedPortsRequest; +import com.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest; + +public class AsyncSetNamedPortsLRO { + + public static void main(String[] args) throws Exception { + asyncSetNamedPortsLRO(); + } + + public static void asyncSetNamedPortsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + SetNamedPortsRegionInstanceGroupRequest request = + SetNamedPortsRegionInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupsSetNamedPortsRequestResource( + RegionInstanceGroupsSetNamedPortsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceGroupsClient.setNamedPortsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_SetNamedPorts_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/SyncSetNamedPorts.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/SyncSetNamedPorts.java new file mode 100644 index 000000000000..2b674f4b56c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/SyncSetNamedPorts.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_SetNamedPorts_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsSetNamedPortsRequest; +import com.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest; + +public class SyncSetNamedPorts { + + public static void main(String[] args) throws Exception { + syncSetNamedPorts(); + } + + public static void syncSetNamedPorts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + SetNamedPortsRegionInstanceGroupRequest request = + SetNamedPortsRegionInstanceGroupRequest.newBuilder() + .setInstanceGroup("instanceGroup-1404696854") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionInstanceGroupsSetNamedPortsRequestResource( + RegionInstanceGroupsSetNamedPortsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceGroupsClient.setNamedPortsAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_SetNamedPorts_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/SyncSetNamedPortsStringStringStringRegioninstancegroupssetnamedportsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/SyncSetNamedPortsStringStringStringRegioninstancegroupssetnamedportsrequest.java new file mode 100644 index 000000000000..0e14c97af369 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/setnamedports/SyncSetNamedPortsStringStringStringRegioninstancegroupssetnamedportsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroups_SetNamedPorts_StringStringStringRegioninstancegroupssetnamedportsrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceGroupsClient; +import com.google.cloud.compute.v1.RegionInstanceGroupsSetNamedPortsRequest; + +public class SyncSetNamedPortsStringStringStringRegioninstancegroupssetnamedportsrequest { + + public static void main(String[] args) throws Exception { + syncSetNamedPortsStringStringStringRegioninstancegroupssetnamedportsrequest(); + } + + public static void syncSetNamedPortsStringStringStringRegioninstancegroupssetnamedportsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceGroupsClient regionInstanceGroupsClient = + RegionInstanceGroupsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceGroup = "instanceGroup-1404696854"; + RegionInstanceGroupsSetNamedPortsRequest regionInstanceGroupsSetNamedPortsRequestResource = + RegionInstanceGroupsSetNamedPortsRequest.newBuilder().build(); + Operation response = + regionInstanceGroupsClient + .setNamedPortsAsync( + project, region, instanceGroup, regionInstanceGroupsSetNamedPortsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceGroups_SetNamedPorts_StringStringStringRegioninstancegroupssetnamedportsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupssettings/get/SyncGet.java new file mode 100644 index 000000000000..10c28000e1d5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroupssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceGroupsSettings_Get_sync] +import com.google.cloud.compute.v1.RegionInstanceGroupsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceGroupsSettings.Builder regionInstanceGroupsSettingsBuilder = + RegionInstanceGroupsSettings.newBuilder(); + regionInstanceGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + regionInstanceGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionInstanceGroupsSettings regionInstanceGroupsSettings = + regionInstanceGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionInstanceGroupsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/AsyncBulkInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/AsyncBulkInsert.java new file mode 100644 index 000000000000..75a3f7e0e942 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/AsyncBulkInsert.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstances_BulkInsert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.BulkInsertInstanceResource; +import com.google.cloud.compute.v1.BulkInsertRegionInstanceRequest; +import com.google.cloud.compute.v1.RegionInstancesClient; +import com.google.longrunning.Operation; + +public class AsyncBulkInsert { + + public static void main(String[] args) throws Exception { + asyncBulkInsert(); + } + + public static void asyncBulkInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstancesClient regionInstancesClient = RegionInstancesClient.create()) { + BulkInsertRegionInstanceRequest request = + BulkInsertRegionInstanceRequest.newBuilder() + .setBulkInsertInstanceResourceResource( + BulkInsertInstanceResource.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = regionInstancesClient.bulkInsertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstances_BulkInsert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/AsyncBulkInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/AsyncBulkInsertLRO.java new file mode 100644 index 000000000000..68d5646a374a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/AsyncBulkInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstances_BulkInsert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.BulkInsertInstanceResource; +import com.google.cloud.compute.v1.BulkInsertRegionInstanceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstancesClient; + +public class AsyncBulkInsertLRO { + + public static void main(String[] args) throws Exception { + asyncBulkInsertLRO(); + } + + public static void asyncBulkInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstancesClient regionInstancesClient = RegionInstancesClient.create()) { + BulkInsertRegionInstanceRequest request = + BulkInsertRegionInstanceRequest.newBuilder() + .setBulkInsertInstanceResourceResource( + BulkInsertInstanceResource.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstancesClient.bulkInsertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstances_BulkInsert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/SyncBulkInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/SyncBulkInsert.java new file mode 100644 index 000000000000..c8ef4d8f4c84 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/SyncBulkInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstances_BulkInsert_sync] +import com.google.cloud.compute.v1.BulkInsertInstanceResource; +import com.google.cloud.compute.v1.BulkInsertRegionInstanceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstancesClient; + +public class SyncBulkInsert { + + public static void main(String[] args) throws Exception { + syncBulkInsert(); + } + + public static void syncBulkInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstancesClient regionInstancesClient = RegionInstancesClient.create()) { + BulkInsertRegionInstanceRequest request = + BulkInsertRegionInstanceRequest.newBuilder() + .setBulkInsertInstanceResourceResource( + BulkInsertInstanceResource.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstancesClient.bulkInsertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstances_BulkInsert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/SyncBulkInsertStringStringBulkinsertinstanceresource.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/SyncBulkInsertStringStringBulkinsertinstanceresource.java new file mode 100644 index 000000000000..3cce335c8fdc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/bulkinsert/SyncBulkInsertStringStringBulkinsertinstanceresource.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstances_BulkInsert_StringStringBulkinsertinstanceresource_sync] +import com.google.cloud.compute.v1.BulkInsertInstanceResource; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstancesClient; + +public class SyncBulkInsertStringStringBulkinsertinstanceresource { + + public static void main(String[] args) throws Exception { + syncBulkInsertStringStringBulkinsertinstanceresource(); + } + + public static void syncBulkInsertStringStringBulkinsertinstanceresource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstancesClient regionInstancesClient = RegionInstancesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + BulkInsertInstanceResource bulkInsertInstanceResourceResource = + BulkInsertInstanceResource.newBuilder().build(); + Operation response = + regionInstancesClient + .bulkInsertAsync(project, region, bulkInsertInstanceResourceResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstances_BulkInsert_StringStringBulkinsertinstanceresource_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..f43fc079ad47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstances_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionInstancesClient; +import com.google.cloud.compute.v1.RegionInstancesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstancesSettings regionInstancesSettings = + RegionInstancesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionInstancesClient regionInstancesClient = + RegionInstancesClient.create(regionInstancesSettings); + } +} +// [END compute_v1_generated_RegionInstances_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..edcab4ec5924 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstances/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstances_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionInstancesClient; +import com.google.cloud.compute.v1.RegionInstancesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstancesSettings regionInstancesSettings = + RegionInstancesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionInstancesClient regionInstancesClient = + RegionInstancesClient.create(regionInstancesSettings); + } +} +// [END compute_v1_generated_RegionInstances_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancessettings/bulkinsert/SyncBulkInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancessettings/bulkinsert/SyncBulkInsert.java new file mode 100644 index 000000000000..86cd38ab36d6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancessettings/bulkinsert/SyncBulkInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstancesSettings_BulkInsert_sync] +import com.google.cloud.compute.v1.RegionInstancesSettings; +import java.time.Duration; + +public class SyncBulkInsert { + + public static void main(String[] args) throws Exception { + syncBulkInsert(); + } + + public static void syncBulkInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstancesSettings.Builder regionInstancesSettingsBuilder = + RegionInstancesSettings.newBuilder(); + regionInstancesSettingsBuilder + .bulkInsertSettings() + .setRetrySettings( + regionInstancesSettingsBuilder + .bulkInsertSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionInstancesSettings regionInstancesSettings = regionInstancesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionInstancesSettings_BulkInsert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..13d002f04a6e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; +import com.google.cloud.compute.v1.RegionInstanceTemplatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceTemplatesSettings regionInstanceTemplatesSettings = + RegionInstanceTemplatesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create(regionInstanceTemplatesSettings); + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..dc1c01294749 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; +import com.google.cloud.compute.v1.RegionInstanceTemplatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceTemplatesSettings regionInstanceTemplatesSettings = + RegionInstanceTemplatesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create(regionInstanceTemplatesSettings); + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/AsyncDelete.java new file mode 100644 index 000000000000..fb0b2afb38e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + DeleteRegionInstanceTemplateRequest request = + DeleteRegionInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceTemplatesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..5802744fc837 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + DeleteRegionInstanceTemplateRequest request = + DeleteRegionInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceTemplatesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/SyncDelete.java new file mode 100644 index 000000000000..4c8a48a18cb6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + DeleteRegionInstanceTemplateRequest request = + DeleteRegionInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceTemplatesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..0985660039e8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceTemplate = "instanceTemplate1009541167"; + Operation response = + regionInstanceTemplatesClient.deleteAsync(project, region, instanceTemplate).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/AsyncGet.java new file mode 100644 index 000000000000..1de4f0c2db3a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + GetRegionInstanceTemplateRequest request = + GetRegionInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionInstanceTemplatesClient.getCallable().futureCall(request); + // Do something. + InstanceTemplate response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/SyncGet.java new file mode 100644 index 000000000000..2cfee4e1c41c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Get_sync] +import com.google.cloud.compute.v1.GetRegionInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + GetRegionInstanceTemplateRequest request = + GetRegionInstanceTemplateRequest.newBuilder() + .setInstanceTemplate("instanceTemplate1009541167") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + InstanceTemplate response = regionInstanceTemplatesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..037e206dd149 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Get_StringStringString_sync] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String instanceTemplate = "instanceTemplate1009541167"; + InstanceTemplate response = + regionInstanceTemplatesClient.get(project, region, instanceTemplate); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/AsyncInsert.java new file mode 100644 index 000000000000..576b9411846c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + InsertRegionInstanceTemplateRequest request = + InsertRegionInstanceTemplateRequest.newBuilder() + .setInstanceTemplateResource(InstanceTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionInstanceTemplatesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..43d55830a089 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + InsertRegionInstanceTemplateRequest request = + InsertRegionInstanceTemplateRequest.newBuilder() + .setInstanceTemplateResource(InstanceTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionInstanceTemplatesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/SyncInsert.java new file mode 100644 index 000000000000..717022226ee4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + InsertRegionInstanceTemplateRequest request = + InsertRegionInstanceTemplateRequest.newBuilder() + .setInstanceTemplateResource(InstanceTemplate.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionInstanceTemplatesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/SyncInsertStringStringInstancetemplate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/SyncInsertStringStringInstancetemplate.java new file mode 100644 index 000000000000..66338377df7a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/insert/SyncInsertStringStringInstancetemplate.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_Insert_StringStringInstancetemplate_sync] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class SyncInsertStringStringInstancetemplate { + + public static void main(String[] args) throws Exception { + syncInsertStringStringInstancetemplate(); + } + + public static void syncInsertStringStringInstancetemplate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + InstanceTemplate instanceTemplateResource = InstanceTemplate.newBuilder().build(); + Operation response = + regionInstanceTemplatesClient + .insertAsync(project, region, instanceTemplateResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_Insert_StringStringInstancetemplate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/AsyncList.java new file mode 100644 index 000000000000..dba73d8343f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + ListRegionInstanceTemplatesRequest request = + ListRegionInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionInstanceTemplatesClient.listPagedCallable().futureCall(request); + // Do something. + for (InstanceTemplate element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/AsyncListPaged.java new file mode 100644 index 000000000000..568882a9fd57 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_List_Paged_async] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.InstanceTemplateList; +import com.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + ListRegionInstanceTemplatesRequest request = + ListRegionInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + InstanceTemplateList response = regionInstanceTemplatesClient.listCallable().call(request); + for (InstanceTemplate element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/SyncList.java new file mode 100644 index 000000000000..185c2d2659b3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_List_sync] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + ListRegionInstanceTemplatesRequest request = + ListRegionInstanceTemplatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (InstanceTemplate element : regionInstanceTemplatesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/SyncListStringString.java new file mode 100644 index 000000000000..426a530b82d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplates/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplates_List_StringString_sync] +import com.google.cloud.compute.v1.InstanceTemplate; +import com.google.cloud.compute.v1.RegionInstanceTemplatesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionInstanceTemplatesClient regionInstanceTemplatesClient = + RegionInstanceTemplatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (InstanceTemplate element : + regionInstanceTemplatesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionInstanceTemplates_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplatessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplatessettings/get/SyncGet.java new file mode 100644 index 000000000000..46e170be2d97 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancetemplatessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionInstanceTemplatesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionInstanceTemplatesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceTemplatesSettings.Builder regionInstanceTemplatesSettingsBuilder = + RegionInstanceTemplatesSettings.newBuilder(); + regionInstanceTemplatesSettingsBuilder + .getSettings() + .setRetrySettings( + regionInstanceTemplatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionInstanceTemplatesSettings regionInstanceTemplatesSettings = + regionInstanceTemplatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionInstanceTemplatesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..90e0693c21da --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNetworkEndpointGroupsSettings regionNetworkEndpointGroupsSettings = + RegionNetworkEndpointGroupsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create(regionNetworkEndpointGroupsSettings); + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..337ebef484d8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNetworkEndpointGroupsSettings regionNetworkEndpointGroupsSettings = + RegionNetworkEndpointGroupsSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create(regionNetworkEndpointGroupsSettings); + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/AsyncDelete.java new file mode 100644 index 000000000000..85bbc320eddb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + DeleteRegionNetworkEndpointGroupRequest request = + DeleteRegionNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkEndpointGroupsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..63598e995ed4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + DeleteRegionNetworkEndpointGroupRequest request = + DeleteRegionNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkEndpointGroupsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/SyncDelete.java new file mode 100644 index 000000000000..46c1830f6958 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + DeleteRegionNetworkEndpointGroupRequest request = + DeleteRegionNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkEndpointGroupsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..5b0e59673eca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + Operation response = + regionNetworkEndpointGroupsClient + .deleteAsync(project, region, networkEndpointGroup) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/AsyncGet.java new file mode 100644 index 000000000000..8f51ac86a6f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + GetRegionNetworkEndpointGroupRequest request = + GetRegionNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionNetworkEndpointGroupsClient.getCallable().futureCall(request); + // Do something. + NetworkEndpointGroup response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/SyncGet.java new file mode 100644 index 000000000000..308b43a67b97 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Get_sync] +import com.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + GetRegionNetworkEndpointGroupRequest request = + GetRegionNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroup("networkEndpointGroup-2120389028") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + NetworkEndpointGroup response = regionNetworkEndpointGroupsClient.get(request); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..64ae1abc3877 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Get_StringStringString_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String networkEndpointGroup = "networkEndpointGroup-2120389028"; + NetworkEndpointGroup response = + regionNetworkEndpointGroupsClient.get(project, region, networkEndpointGroup); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/AsyncInsert.java new file mode 100644 index 000000000000..3f6439103eb6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + InsertRegionNetworkEndpointGroupRequest request = + InsertRegionNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkEndpointGroupsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..bbefc20bff91 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + InsertRegionNetworkEndpointGroupRequest request = + InsertRegionNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkEndpointGroupsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/SyncInsert.java new file mode 100644 index 000000000000..1f0ea071e01d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + InsertRegionNetworkEndpointGroupRequest request = + InsertRegionNetworkEndpointGroupRequest.newBuilder() + .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkEndpointGroupsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/SyncInsertStringStringNetworkendpointgroup.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/SyncInsertStringStringNetworkendpointgroup.java new file mode 100644 index 000000000000..3aaf018da1cc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/insert/SyncInsertStringStringNetworkendpointgroup.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_Insert_StringStringNetworkendpointgroup_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class SyncInsertStringStringNetworkendpointgroup { + + public static void main(String[] args) throws Exception { + syncInsertStringStringNetworkendpointgroup(); + } + + public static void syncInsertStringStringNetworkendpointgroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build(); + Operation response = + regionNetworkEndpointGroupsClient + .insertAsync(project, region, networkEndpointGroupResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_Insert_StringStringNetworkendpointgroup_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/AsyncList.java new file mode 100644 index 000000000000..9fdf420364b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + ListRegionNetworkEndpointGroupsRequest request = + ListRegionNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionNetworkEndpointGroupsClient.listPagedCallable().futureCall(request); + // Do something. + for (NetworkEndpointGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/AsyncListPaged.java new file mode 100644 index 000000000000..7ac1e1e61843 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + ListRegionNetworkEndpointGroupsRequest request = + ListRegionNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NetworkEndpointGroupList response = + regionNetworkEndpointGroupsClient.listCallable().call(request); + for (NetworkEndpointGroup element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/SyncList.java new file mode 100644 index 000000000000..fb672cba5d54 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/SyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_List_sync] +import com.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + ListRegionNetworkEndpointGroupsRequest request = + ListRegionNetworkEndpointGroupsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (NetworkEndpointGroup element : + regionNetworkEndpointGroupsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/SyncListStringString.java new file mode 100644 index 000000000000..e8d706de0c98 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroups/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroups_List_StringString_sync] +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkEndpointGroupsClient regionNetworkEndpointGroupsClient = + RegionNetworkEndpointGroupsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (NetworkEndpointGroup element : + regionNetworkEndpointGroupsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroups_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroupssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroupssettings/get/SyncGet.java new file mode 100644 index 000000000000..d4dbd6d0f852 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkendpointgroupssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroupsSettings_Get_sync] +import com.google.cloud.compute.v1.RegionNetworkEndpointGroupsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNetworkEndpointGroupsSettings.Builder regionNetworkEndpointGroupsSettingsBuilder = + RegionNetworkEndpointGroupsSettings.newBuilder(); + regionNetworkEndpointGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + regionNetworkEndpointGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionNetworkEndpointGroupsSettings regionNetworkEndpointGroupsSettings = + regionNetworkEndpointGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroupsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/AsyncAddAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/AsyncAddAssociation.java new file mode 100644 index 000000000000..75d177036218 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/AsyncAddAssociation.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_AddAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncAddAssociation { + + public static void main(String[] args) throws Exception { + asyncAddAssociation(); + } + + public static void asyncAddAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + AddAssociationRegionNetworkFirewallPolicyRequest request = + AddAssociationRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.addAssociationCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_AddAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/AsyncAddAssociationLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/AsyncAddAssociationLRO.java new file mode 100644 index 000000000000..cbfe8b42d7d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/AsyncAddAssociationLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_AddAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncAddAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncAddAssociationLRO(); + } + + public static void asyncAddAssociationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + AddAssociationRegionNetworkFirewallPolicyRequest request = + AddAssociationRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient.addAssociationOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_AddAssociation_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/SyncAddAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/SyncAddAssociation.java new file mode 100644 index 000000000000..98c0fd4c55df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/SyncAddAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_AddAssociation_sync] +import com.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncAddAssociation { + + public static void main(String[] args) throws Exception { + syncAddAssociation(); + } + + public static void syncAddAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + AddAssociationRegionNetworkFirewallPolicyRequest request = + AddAssociationRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setReplaceExistingAssociation(true) + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkFirewallPoliciesClient.addAssociationAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_AddAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/SyncAddAssociationStringStringStringFirewallpolicyassociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/SyncAddAssociationStringStringStringFirewallpolicyassociation.java new file mode 100644 index 000000000000..ac8ad82a2ac4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addassociation/SyncAddAssociationStringStringStringFirewallpolicyassociation.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_AddAssociation_StringStringStringFirewallpolicyassociation_sync] +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncAddAssociationStringStringStringFirewallpolicyassociation { + + public static void main(String[] args) throws Exception { + syncAddAssociationStringStringStringFirewallpolicyassociation(); + } + + public static void syncAddAssociationStringStringStringFirewallpolicyassociation() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyAssociation firewallPolicyAssociationResource = + FirewallPolicyAssociation.newBuilder().build(); + Operation response = + regionNetworkFirewallPoliciesClient + .addAssociationAsync( + project, region, firewallPolicy, firewallPolicyAssociationResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_AddAssociation_StringStringStringFirewallpolicyassociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/AsyncAddRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/AsyncAddRule.java new file mode 100644 index 000000000000..75fb230f649d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/AsyncAddRule.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_AddRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncAddRule { + + public static void main(String[] args) throws Exception { + asyncAddRule(); + } + + public static void asyncAddRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + AddRuleRegionNetworkFirewallPolicyRequest request = + AddRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setMaxPriority(-207235553) + .setMinPriority(267190513) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.addRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_AddRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/AsyncAddRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/AsyncAddRuleLRO.java new file mode 100644 index 000000000000..24c7586ef0e0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/AsyncAddRuleLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_AddRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncAddRuleLRO { + + public static void main(String[] args) throws Exception { + asyncAddRuleLRO(); + } + + public static void asyncAddRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + AddRuleRegionNetworkFirewallPolicyRequest request = + AddRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setMaxPriority(-207235553) + .setMinPriority(267190513) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient.addRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_AddRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/SyncAddRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/SyncAddRule.java new file mode 100644 index 000000000000..cc8465c813d8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/SyncAddRule.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_AddRule_sync] +import com.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncAddRule { + + public static void main(String[] args) throws Exception { + syncAddRule(); + } + + public static void syncAddRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + AddRuleRegionNetworkFirewallPolicyRequest request = + AddRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setMaxPriority(-207235553) + .setMinPriority(267190513) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkFirewallPoliciesClient.addRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_AddRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/SyncAddRuleStringStringStringFirewallpolicyrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/SyncAddRuleStringStringStringFirewallpolicyrule.java new file mode 100644 index 000000000000..83ef877a0fe2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/addrule/SyncAddRuleStringStringStringFirewallpolicyrule.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_AddRule_StringStringStringFirewallpolicyrule_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncAddRuleStringStringStringFirewallpolicyrule { + + public static void main(String[] args) throws Exception { + syncAddRuleStringStringStringFirewallpolicyrule(); + } + + public static void syncAddRuleStringStringStringFirewallpolicyrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule firewallPolicyRuleResource = FirewallPolicyRule.newBuilder().build(); + Operation response = + regionNetworkFirewallPoliciesClient + .addRuleAsync(project, region, firewallPolicy, firewallPolicyRuleResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_AddRule_StringStringStringFirewallpolicyrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/AsyncCloneRules.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/AsyncCloneRules.java new file mode 100644 index 000000000000..4a6f40e3b8b5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/AsyncCloneRules.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_CloneRules_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncCloneRules { + + public static void main(String[] args) throws Exception { + asyncCloneRules(); + } + + public static void asyncCloneRules() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + CloneRulesRegionNetworkFirewallPolicyRequest request = + CloneRulesRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.cloneRulesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_CloneRules_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/AsyncCloneRulesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/AsyncCloneRulesLRO.java new file mode 100644 index 000000000000..4f329d6a454d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/AsyncCloneRulesLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_CloneRules_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncCloneRulesLRO { + + public static void main(String[] args) throws Exception { + asyncCloneRulesLRO(); + } + + public static void asyncCloneRulesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + CloneRulesRegionNetworkFirewallPolicyRequest request = + CloneRulesRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient.cloneRulesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_CloneRules_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/SyncCloneRules.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/SyncCloneRules.java new file mode 100644 index 000000000000..aa90c951c9cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/SyncCloneRules.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_CloneRules_sync] +import com.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncCloneRules { + + public static void main(String[] args) throws Exception { + syncCloneRules(); + } + + public static void syncCloneRules() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + CloneRulesRegionNetworkFirewallPolicyRequest request = + CloneRulesRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSourceFirewallPolicy("sourceFirewallPolicy-593774771") + .build(); + Operation response = regionNetworkFirewallPoliciesClient.cloneRulesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_CloneRules_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/SyncCloneRulesStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/SyncCloneRulesStringStringString.java new file mode 100644 index 000000000000..51081f947ffd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/clonerules/SyncCloneRulesStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_CloneRules_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncCloneRulesStringStringString { + + public static void main(String[] args) throws Exception { + syncCloneRulesStringStringString(); + } + + public static void syncCloneRulesStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = + regionNetworkFirewallPoliciesClient + .cloneRulesAsync(project, region, firewallPolicy) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_CloneRules_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..51fc9e9cb29a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNetworkFirewallPoliciesSettings regionNetworkFirewallPoliciesSettings = + RegionNetworkFirewallPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create(regionNetworkFirewallPoliciesSettings); + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..696e5ce895cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNetworkFirewallPoliciesSettings regionNetworkFirewallPoliciesSettings = + RegionNetworkFirewallPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create(regionNetworkFirewallPoliciesSettings); + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/AsyncDelete.java new file mode 100644 index 000000000000..a439341978c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + DeleteRegionNetworkFirewallPolicyRequest request = + DeleteRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..0dbb51ed30ca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + DeleteRegionNetworkFirewallPolicyRequest request = + DeleteRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/SyncDelete.java new file mode 100644 index 000000000000..191043c3e544 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + DeleteRegionNetworkFirewallPolicyRequest request = + DeleteRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkFirewallPoliciesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..f9f4e4d96d20 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = + regionNetworkFirewallPoliciesClient.deleteAsync(project, region, firewallPolicy).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/AsyncGet.java new file mode 100644 index 000000000000..bc30b8aa245b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetRegionNetworkFirewallPolicyRequest request = + GetRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.getCallable().futureCall(request); + // Do something. + FirewallPolicy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/SyncGet.java new file mode 100644 index 000000000000..04e049ab4056 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Get_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetRegionNetworkFirewallPolicyRequest request = + GetRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + FirewallPolicy response = regionNetworkFirewallPoliciesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..f0cc4cf34a47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Get_StringStringString_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicy response = + regionNetworkFirewallPoliciesClient.get(project, region, firewallPolicy); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/AsyncGetAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/AsyncGetAssociation.java new file mode 100644 index 000000000000..659bc7e9fe6b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/AsyncGetAssociation.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncGetAssociation { + + public static void main(String[] args) throws Exception { + asyncGetAssociation(); + } + + public static void asyncGetAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetAssociationRegionNetworkFirewallPolicyRequest request = + GetAssociationRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.getAssociationCallable().futureCall(request); + // Do something. + FirewallPolicyAssociation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/SyncGetAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/SyncGetAssociation.java new file mode 100644 index 000000000000..cb99a2c371ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/SyncGetAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetAssociation_sync] +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncGetAssociation { + + public static void main(String[] args) throws Exception { + syncGetAssociation(); + } + + public static void syncGetAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetAssociationRegionNetworkFirewallPolicyRequest request = + GetAssociationRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + FirewallPolicyAssociation response = + regionNetworkFirewallPoliciesClient.getAssociation(request); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/SyncGetAssociationStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/SyncGetAssociationStringStringString.java new file mode 100644 index 000000000000..22da30f1f8c1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getassociation/SyncGetAssociationStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetAssociation_StringStringString_sync] +import com.google.cloud.compute.v1.FirewallPolicyAssociation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncGetAssociationStringStringString { + + public static void main(String[] args) throws Exception { + syncGetAssociationStringStringString(); + } + + public static void syncGetAssociationStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyAssociation response = + regionNetworkFirewallPoliciesClient.getAssociation(project, region, firewallPolicy); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetAssociation_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/AsyncGetEffectiveFirewalls.java new file mode 100644 index 000000000000..6e85805633df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/AsyncGetEffectiveFirewalls.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse; + +public class AsyncGetEffectiveFirewalls { + + public static void main(String[] args) throws Exception { + asyncGetEffectiveFirewalls(); + } + + public static void asyncGetEffectiveFirewalls() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request = + GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.getEffectiveFirewallsCallable().futureCall(request); + // Do something. + RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/SyncGetEffectiveFirewalls.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/SyncGetEffectiveFirewalls.java new file mode 100644 index 000000000000..f7637ab656f2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/SyncGetEffectiveFirewalls.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_sync] +import com.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse; + +public class SyncGetEffectiveFirewalls { + + public static void main(String[] args) throws Exception { + syncGetEffectiveFirewalls(); + } + + public static void syncGetEffectiveFirewalls() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request = + GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.newBuilder() + .setNetwork("network1843485230") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse response = + regionNetworkFirewallPoliciesClient.getEffectiveFirewalls(request); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/SyncGetEffectiveFirewallsStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/SyncGetEffectiveFirewallsStringStringString.java new file mode 100644 index 000000000000..9d79792d4d35 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/geteffectivefirewalls/SyncGetEffectiveFirewallsStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_StringStringString_sync] +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse; + +public class SyncGetEffectiveFirewallsStringStringString { + + public static void main(String[] args) throws Exception { + syncGetEffectiveFirewallsStringStringString(); + } + + public static void syncGetEffectiveFirewallsStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String network = "network1843485230"; + RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse response = + regionNetworkFirewallPoliciesClient.getEffectiveFirewalls(project, region, network); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetEffectiveFirewalls_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..5bb8aeaf6bf4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetIamPolicyRegionNetworkFirewallPolicyRequest request = + GetIamPolicyRegionNetworkFirewallPolicyRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..cd4cca5ce0eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetIamPolicyRegionNetworkFirewallPolicyRequest request = + GetIamPolicyRegionNetworkFirewallPolicyRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + Policy response = regionNetworkFirewallPoliciesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..75c754d9b1aa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + Policy response = regionNetworkFirewallPoliciesClient.getIamPolicy(project, region, resource); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/AsyncGetRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/AsyncGetRule.java new file mode 100644 index 000000000000..5893525f619a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/AsyncGetRule.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncGetRule { + + public static void main(String[] args) throws Exception { + asyncGetRule(); + } + + public static void asyncGetRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetRuleRegionNetworkFirewallPolicyRequest request = + GetRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.getRuleCallable().futureCall(request); + // Do something. + FirewallPolicyRule response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/SyncGetRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/SyncGetRule.java new file mode 100644 index 000000000000..06a56ec856fb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/SyncGetRule.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetRule_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncGetRule { + + public static void main(String[] args) throws Exception { + syncGetRule(); + } + + public static void syncGetRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + GetRuleRegionNetworkFirewallPolicyRequest request = + GetRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + FirewallPolicyRule response = regionNetworkFirewallPoliciesClient.getRule(request); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/SyncGetRuleStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/SyncGetRuleStringStringString.java new file mode 100644 index 000000000000..160ec9811c48 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/getrule/SyncGetRuleStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_GetRule_StringStringString_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncGetRuleStringStringString { + + public static void main(String[] args) throws Exception { + syncGetRuleStringStringString(); + } + + public static void syncGetRuleStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule response = + regionNetworkFirewallPoliciesClient.getRule(project, region, firewallPolicy); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_GetRule_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/AsyncInsert.java new file mode 100644 index 000000000000..114f326bdef5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + InsertRegionNetworkFirewallPolicyRequest request = + InsertRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..3bb8250a99c8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + InsertRegionNetworkFirewallPolicyRequest request = + InsertRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/SyncInsert.java new file mode 100644 index 000000000000..931fdc562f2c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Insert_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + InsertRegionNetworkFirewallPolicyRequest request = + InsertRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkFirewallPoliciesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/SyncInsertStringStringFirewallpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/SyncInsertStringStringFirewallpolicy.java new file mode 100644 index 000000000000..67bc11a657c4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/insert/SyncInsertStringStringFirewallpolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Insert_StringStringFirewallpolicy_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncInsertStringStringFirewallpolicy { + + public static void main(String[] args) throws Exception { + syncInsertStringStringFirewallpolicy(); + } + + public static void syncInsertStringStringFirewallpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + FirewallPolicy firewallPolicyResource = FirewallPolicy.newBuilder().build(); + Operation response = + regionNetworkFirewallPoliciesClient + .insertAsync(project, region, firewallPolicyResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Insert_StringStringFirewallpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/AsyncList.java new file mode 100644 index 000000000000..dd380df7a02c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + ListRegionNetworkFirewallPoliciesRequest request = + ListRegionNetworkFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.listPagedCallable().futureCall(request); + // Do something. + for (FirewallPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/AsyncListPaged.java new file mode 100644 index 000000000000..32f6311e8ff6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_List_Paged_async] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.FirewallPolicyList; +import com.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + ListRegionNetworkFirewallPoliciesRequest request = + ListRegionNetworkFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + FirewallPolicyList response = + regionNetworkFirewallPoliciesClient.listCallable().call(request); + for (FirewallPolicy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/SyncList.java new file mode 100644 index 000000000000..aee35c9ad55c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/SyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_List_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + ListRegionNetworkFirewallPoliciesRequest request = + ListRegionNetworkFirewallPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (FirewallPolicy element : + regionNetworkFirewallPoliciesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/SyncListStringString.java new file mode 100644 index 000000000000..9f45da1b6c10 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_List_StringString_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (FirewallPolicy element : + regionNetworkFirewallPoliciesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/AsyncPatch.java new file mode 100644 index 000000000000..018093c7f283 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/AsyncPatch.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + PatchRegionNetworkFirewallPolicyRequest request = + PatchRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..ccc0dd038ec3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + PatchRegionNetworkFirewallPolicyRequest request = + PatchRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/SyncPatch.java new file mode 100644 index 000000000000..8d91a290e413 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Patch_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + PatchRegionNetworkFirewallPolicyRequest request = + PatchRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyResource(FirewallPolicy.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkFirewallPoliciesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/SyncPatchStringStringStringFirewallpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/SyncPatchStringStringStringFirewallpolicy.java new file mode 100644 index 000000000000..073ca644305a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patch/SyncPatchStringStringStringFirewallpolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_Patch_StringStringStringFirewallpolicy_sync] +import com.google.cloud.compute.v1.FirewallPolicy; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncPatchStringStringStringFirewallpolicy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringFirewallpolicy(); + } + + public static void syncPatchStringStringStringFirewallpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicy firewallPolicyResource = FirewallPolicy.newBuilder().build(); + Operation response = + regionNetworkFirewallPoliciesClient + .patchAsync(project, region, firewallPolicy, firewallPolicyResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_Patch_StringStringStringFirewallpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/AsyncPatchRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/AsyncPatchRule.java new file mode 100644 index 000000000000..ef4112fae7dd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/AsyncPatchRule.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_PatchRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncPatchRule { + + public static void main(String[] args) throws Exception { + asyncPatchRule(); + } + + public static void asyncPatchRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + PatchRuleRegionNetworkFirewallPolicyRequest request = + PatchRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.patchRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_PatchRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/AsyncPatchRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/AsyncPatchRuleLRO.java new file mode 100644 index 000000000000..9630d139a43d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/AsyncPatchRuleLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_PatchRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class AsyncPatchRuleLRO { + + public static void main(String[] args) throws Exception { + asyncPatchRuleLRO(); + } + + public static void asyncPatchRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + PatchRuleRegionNetworkFirewallPolicyRequest request = + PatchRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient.patchRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_PatchRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/SyncPatchRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/SyncPatchRule.java new file mode 100644 index 000000000000..a1f7dbe202d6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/SyncPatchRule.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_PatchRule_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncPatchRule { + + public static void main(String[] args) throws Exception { + syncPatchRule(); + } + + public static void syncPatchRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + PatchRuleRegionNetworkFirewallPolicyRequest request = + PatchRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build()) + .setPriority(-1165461084) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkFirewallPoliciesClient.patchRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_PatchRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/SyncPatchRuleStringStringStringFirewallpolicyrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/SyncPatchRuleStringStringStringFirewallpolicyrule.java new file mode 100644 index 000000000000..7a2f794c650c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/patchrule/SyncPatchRuleStringStringStringFirewallpolicyrule.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_PatchRule_StringStringStringFirewallpolicyrule_sync] +import com.google.cloud.compute.v1.FirewallPolicyRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncPatchRuleStringStringStringFirewallpolicyrule { + + public static void main(String[] args) throws Exception { + syncPatchRuleStringStringStringFirewallpolicyrule(); + } + + public static void syncPatchRuleStringStringStringFirewallpolicyrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + FirewallPolicyRule firewallPolicyRuleResource = FirewallPolicyRule.newBuilder().build(); + Operation response = + regionNetworkFirewallPoliciesClient + .patchRuleAsync(project, region, firewallPolicy, firewallPolicyRuleResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_PatchRule_StringStringStringFirewallpolicyrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/AsyncRemoveAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/AsyncRemoveAssociation.java new file mode 100644 index 000000000000..3689e99562c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/AsyncRemoveAssociation.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_RemoveAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveAssociation { + + public static void main(String[] args) throws Exception { + asyncRemoveAssociation(); + } + + public static void asyncRemoveAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + RemoveAssociationRegionNetworkFirewallPolicyRequest request = + RemoveAssociationRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.removeAssociationCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_RemoveAssociation_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java new file mode 100644 index 000000000000..d8acb42653fe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/AsyncRemoveAssociationLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_RemoveAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest; + +public class AsyncRemoveAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveAssociationLRO(); + } + + public static void asyncRemoveAssociationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + RemoveAssociationRegionNetworkFirewallPolicyRequest request = + RemoveAssociationRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient + .removeAssociationOperationCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_RemoveAssociation_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/SyncRemoveAssociation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/SyncRemoveAssociation.java new file mode 100644 index 000000000000..c8bb2cd547cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/SyncRemoveAssociation.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_RemoveAssociation_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest; + +public class SyncRemoveAssociation { + + public static void main(String[] args) throws Exception { + syncRemoveAssociation(); + } + + public static void syncRemoveAssociation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + RemoveAssociationRegionNetworkFirewallPolicyRequest request = + RemoveAssociationRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setName("name3373707") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = + regionNetworkFirewallPoliciesClient.removeAssociationAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_RemoveAssociation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/SyncRemoveAssociationStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/SyncRemoveAssociationStringStringString.java new file mode 100644 index 000000000000..fd56221322ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removeassociation/SyncRemoveAssociationStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_RemoveAssociation_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncRemoveAssociationStringStringString { + + public static void main(String[] args) throws Exception { + syncRemoveAssociationStringStringString(); + } + + public static void syncRemoveAssociationStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = + regionNetworkFirewallPoliciesClient + .removeAssociationAsync(project, region, firewallPolicy) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_RemoveAssociation_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/AsyncRemoveRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/AsyncRemoveRule.java new file mode 100644 index 000000000000..3251186a4966 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/AsyncRemoveRule.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_RemoveRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveRule { + + public static void main(String[] args) throws Exception { + asyncRemoveRule(); + } + + public static void asyncRemoveRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + RemoveRuleRegionNetworkFirewallPolicyRequest request = + RemoveRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.removeRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_RemoveRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/AsyncRemoveRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/AsyncRemoveRuleLRO.java new file mode 100644 index 000000000000..bc405bede2e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/AsyncRemoveRuleLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_RemoveRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest; + +public class AsyncRemoveRuleLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveRuleLRO(); + } + + public static void asyncRemoveRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + RemoveRuleRegionNetworkFirewallPolicyRequest request = + RemoveRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNetworkFirewallPoliciesClient.removeRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_RemoveRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/SyncRemoveRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/SyncRemoveRule.java new file mode 100644 index 000000000000..a4d756344b2d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/SyncRemoveRule.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_RemoveRule_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest; + +public class SyncRemoveRule { + + public static void main(String[] args) throws Exception { + syncRemoveRule(); + } + + public static void syncRemoveRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + RemoveRuleRegionNetworkFirewallPolicyRequest request = + RemoveRuleRegionNetworkFirewallPolicyRequest.newBuilder() + .setFirewallPolicy("firewallPolicy1819692626") + .setPriority(-1165461084) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNetworkFirewallPoliciesClient.removeRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_RemoveRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/SyncRemoveRuleStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/SyncRemoveRuleStringStringString.java new file mode 100644 index 000000000000..12f385ca7d3d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/removerule/SyncRemoveRuleStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_RemoveRule_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; + +public class SyncRemoveRuleStringStringString { + + public static void main(String[] args) throws Exception { + syncRemoveRuleStringStringString(); + } + + public static void syncRemoveRuleStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String firewallPolicy = "firewallPolicy1819692626"; + Operation response = + regionNetworkFirewallPoliciesClient + .removeRuleAsync(project, region, firewallPolicy) + .get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_RemoveRule_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..d818646290c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + SetIamPolicyRegionNetworkFirewallPolicyRequest request = + SetIamPolicyRegionNetworkFirewallPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..414d1481b230 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_SetIamPolicy_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + SetIamPolicyRegionNetworkFirewallPolicyRequest request = + SetIamPolicyRegionNetworkFirewallPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = regionNetworkFirewallPoliciesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java new file mode 100644 index 000000000000..fd2a65a135d4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringRegionsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringRegionsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringRegionsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetPolicyRequest regionSetPolicyRequestResource = + RegionSetPolicyRequest.newBuilder().build(); + Policy response = + regionNetworkFirewallPoliciesClient.setIamPolicy( + project, region, resource, regionSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..e4d5c23d49a9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + TestIamPermissionsRegionNetworkFirewallPolicyRequest request = + TestIamPermissionsRegionNetworkFirewallPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + regionNetworkFirewallPoliciesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..73dcb483dd3b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_TestIamPermissions_sync] +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + TestIamPermissionsRegionNetworkFirewallPolicyRequest request = + TestIamPermissionsRegionNetworkFirewallPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = + regionNetworkFirewallPoliciesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..85424f051684 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpolicies/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPolicies_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient = + RegionNetworkFirewallPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + regionNetworkFirewallPoliciesClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_RegionNetworkFirewallPolicies_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpoliciessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpoliciessettings/get/SyncGet.java new file mode 100644 index 000000000000..368c472c6d47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnetworkfirewallpoliciessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPoliciesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNetworkFirewallPoliciesSettings.Builder regionNetworkFirewallPoliciesSettingsBuilder = + RegionNetworkFirewallPoliciesSettings.newBuilder(); + regionNetworkFirewallPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + regionNetworkFirewallPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionNetworkFirewallPoliciesSettings regionNetworkFirewallPoliciesSettings = + regionNetworkFirewallPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionNetworkFirewallPoliciesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..0636dfb73266 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; +import com.google.cloud.compute.v1.RegionNotificationEndpointsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNotificationEndpointsSettings regionNotificationEndpointsSettings = + RegionNotificationEndpointsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create(regionNotificationEndpointsSettings); + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..76eeb0ba58da --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; +import com.google.cloud.compute.v1.RegionNotificationEndpointsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNotificationEndpointsSettings regionNotificationEndpointsSettings = + RegionNotificationEndpointsSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create(regionNotificationEndpointsSettings); + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/AsyncDelete.java new file mode 100644 index 000000000000..1a154a1141c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + DeleteRegionNotificationEndpointRequest request = + DeleteRegionNotificationEndpointRequest.newBuilder() + .setNotificationEndpoint("notificationEndpoint-354029664") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNotificationEndpointsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..231529351104 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + DeleteRegionNotificationEndpointRequest request = + DeleteRegionNotificationEndpointRequest.newBuilder() + .setNotificationEndpoint("notificationEndpoint-354029664") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNotificationEndpointsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/SyncDelete.java new file mode 100644 index 000000000000..10db0741d69f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + DeleteRegionNotificationEndpointRequest request = + DeleteRegionNotificationEndpointRequest.newBuilder() + .setNotificationEndpoint("notificationEndpoint-354029664") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNotificationEndpointsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..82d34298b44a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String notificationEndpoint = "notificationEndpoint-354029664"; + Operation response = + regionNotificationEndpointsClient + .deleteAsync(project, region, notificationEndpoint) + .get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/AsyncGet.java new file mode 100644 index 000000000000..472b2b8afe21 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionNotificationEndpointRequest; +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + GetRegionNotificationEndpointRequest request = + GetRegionNotificationEndpointRequest.newBuilder() + .setNotificationEndpoint("notificationEndpoint-354029664") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionNotificationEndpointsClient.getCallable().futureCall(request); + // Do something. + NotificationEndpoint response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/SyncGet.java new file mode 100644 index 000000000000..9e0da337d28e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Get_sync] +import com.google.cloud.compute.v1.GetRegionNotificationEndpointRequest; +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + GetRegionNotificationEndpointRequest request = + GetRegionNotificationEndpointRequest.newBuilder() + .setNotificationEndpoint("notificationEndpoint-354029664") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + NotificationEndpoint response = regionNotificationEndpointsClient.get(request); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..29861c7406b6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Get_StringStringString_sync] +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String notificationEndpoint = "notificationEndpoint-354029664"; + NotificationEndpoint response = + regionNotificationEndpointsClient.get(project, region, notificationEndpoint); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/AsyncInsert.java new file mode 100644 index 000000000000..21ef2e96da55 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest; +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + InsertRegionNotificationEndpointRequest request = + InsertRegionNotificationEndpointRequest.newBuilder() + .setNotificationEndpointResource(NotificationEndpoint.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + regionNotificationEndpointsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..8da313b0d275 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest; +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + InsertRegionNotificationEndpointRequest request = + InsertRegionNotificationEndpointRequest.newBuilder() + .setNotificationEndpointResource(NotificationEndpoint.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + regionNotificationEndpointsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/SyncInsert.java new file mode 100644 index 000000000000..457197d584bb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest; +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + InsertRegionNotificationEndpointRequest request = + InsertRegionNotificationEndpointRequest.newBuilder() + .setNotificationEndpointResource(NotificationEndpoint.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = regionNotificationEndpointsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/SyncInsertStringStringNotificationendpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/SyncInsertStringStringNotificationendpoint.java new file mode 100644 index 000000000000..d8af57c48b49 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/insert/SyncInsertStringStringNotificationendpoint.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_Insert_StringStringNotificationendpoint_sync] +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class SyncInsertStringStringNotificationendpoint { + + public static void main(String[] args) throws Exception { + syncInsertStringStringNotificationendpoint(); + } + + public static void syncInsertStringStringNotificationendpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + NotificationEndpoint notificationEndpointResource = NotificationEndpoint.newBuilder().build(); + Operation response = + regionNotificationEndpointsClient + .insertAsync(project, region, notificationEndpointResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_Insert_StringStringNotificationendpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/AsyncList.java new file mode 100644 index 000000000000..9147996f9918 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest; +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + ListRegionNotificationEndpointsRequest request = + ListRegionNotificationEndpointsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionNotificationEndpointsClient.listPagedCallable().futureCall(request); + // Do something. + for (NotificationEndpoint element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/AsyncListPaged.java new file mode 100644 index 000000000000..f575f9c0e220 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/AsyncListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest; +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.NotificationEndpointList; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + ListRegionNotificationEndpointsRequest request = + ListRegionNotificationEndpointsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + NotificationEndpointList response = + regionNotificationEndpointsClient.listCallable().call(request); + for (NotificationEndpoint element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/SyncList.java new file mode 100644 index 000000000000..74007e58d768 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/SyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_List_sync] +import com.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest; +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + ListRegionNotificationEndpointsRequest request = + ListRegionNotificationEndpointsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (NotificationEndpoint element : + regionNotificationEndpointsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/SyncListStringString.java new file mode 100644 index 000000000000..0d2dd292d01a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpoints/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpoints_List_StringString_sync] +import com.google.cloud.compute.v1.NotificationEndpoint; +import com.google.cloud.compute.v1.RegionNotificationEndpointsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionNotificationEndpointsClient regionNotificationEndpointsClient = + RegionNotificationEndpointsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (NotificationEndpoint element : + regionNotificationEndpointsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionNotificationEndpoints_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpointssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpointssettings/get/SyncGet.java new file mode 100644 index 000000000000..9aaac4ee87ed --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionnotificationendpointssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionNotificationEndpointsSettings_Get_sync] +import com.google.cloud.compute.v1.RegionNotificationEndpointsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNotificationEndpointsSettings.Builder regionNotificationEndpointsSettingsBuilder = + RegionNotificationEndpointsSettings.newBuilder(); + regionNotificationEndpointsSettingsBuilder + .getSettings() + .setRetrySettings( + regionNotificationEndpointsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionNotificationEndpointsSettings regionNotificationEndpointsSettings = + regionNotificationEndpointsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionNotificationEndpointsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..4a5bc12c18a8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionOperationsClient; +import com.google.cloud.compute.v1.RegionOperationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionOperationsSettings regionOperationsSettings = + RegionOperationsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionOperationsClient regionOperationsClient = + RegionOperationsClient.create(regionOperationsSettings); + } +} +// [END compute_v1_generated_RegionOperations_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..82ad4350c08a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionOperationsClient; +import com.google.cloud.compute.v1.RegionOperationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionOperationsSettings regionOperationsSettings = + RegionOperationsSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionOperationsClient regionOperationsClient = + RegionOperationsClient.create(regionOperationsSettings); + } +} +// [END compute_v1_generated_RegionOperations_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/AsyncDelete.java new file mode 100644 index 000000000000..04d6e721dc8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionOperationRequest; +import com.google.cloud.compute.v1.DeleteRegionOperationResponse; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + DeleteRegionOperationRequest request = + DeleteRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = + regionOperationsClient.deleteCallable().futureCall(request); + // Do something. + DeleteRegionOperationResponse response = future.get(); + } + } +} +// [END compute_v1_generated_RegionOperations_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/SyncDelete.java new file mode 100644 index 000000000000..dec322193cab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionOperationRequest; +import com.google.cloud.compute.v1.DeleteRegionOperationResponse; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + DeleteRegionOperationRequest request = + DeleteRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + DeleteRegionOperationResponse response = regionOperationsClient.delete(request); + } + } +} +// [END compute_v1_generated_RegionOperations_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..cc62c16c15be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.DeleteRegionOperationResponse; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String operation = "operation1662702951"; + DeleteRegionOperationResponse response = + regionOperationsClient.delete(project, region, operation); + } + } +} +// [END compute_v1_generated_RegionOperations_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/AsyncGet.java new file mode 100644 index 000000000000..99ea6334edba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionOperationRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + GetRegionOperationRequest request = + GetRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionOperationsClient.getCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionOperations_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/SyncGet.java new file mode 100644 index 000000000000..bd1e6db523d4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Get_sync] +import com.google.cloud.compute.v1.GetRegionOperationRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + GetRegionOperationRequest request = + GetRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Operation response = regionOperationsClient.get(request); + } + } +} +// [END compute_v1_generated_RegionOperations_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..c80aafbc2af7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String operation = "operation1662702951"; + Operation response = regionOperationsClient.get(project, region, operation); + } + } +} +// [END compute_v1_generated_RegionOperations_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/AsyncList.java new file mode 100644 index 000000000000..a744298c6b2e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionOperationsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + ListRegionOperationsRequest request = + ListRegionOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = regionOperationsClient.listPagedCallable().futureCall(request); + // Do something. + for (Operation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionOperations_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/AsyncListPaged.java new file mode 100644 index 000000000000..c20192ae54ea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionOperationsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.OperationList; +import com.google.cloud.compute.v1.RegionOperationsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + ListRegionOperationsRequest request = + ListRegionOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + OperationList response = regionOperationsClient.listCallable().call(request); + for (Operation element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionOperations_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/SyncList.java new file mode 100644 index 000000000000..81e81f2fe242 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_List_sync] +import com.google.cloud.compute.v1.ListRegionOperationsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + ListRegionOperationsRequest request = + ListRegionOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (Operation element : regionOperationsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionOperations_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/SyncListStringString.java new file mode 100644 index 000000000000..2238a9b016b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_List_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (Operation element : regionOperationsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionOperations_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/AsyncWait.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/AsyncWait.java new file mode 100644 index 000000000000..9350f42aaa73 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/AsyncWait.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Wait_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; +import com.google.cloud.compute.v1.WaitRegionOperationRequest; + +public class AsyncWait { + + public static void main(String[] args) throws Exception { + asyncWait(); + } + + public static void asyncWait() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + WaitRegionOperationRequest request = + WaitRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionOperationsClient.waitCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionOperations_Wait_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/SyncWait.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/SyncWait.java new file mode 100644 index 000000000000..4f6ad44bff2d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/SyncWait.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Wait_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; +import com.google.cloud.compute.v1.WaitRegionOperationRequest; + +public class SyncWait { + + public static void main(String[] args) throws Exception { + syncWait(); + } + + public static void syncWait() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + WaitRegionOperationRequest request = + WaitRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Operation response = regionOperationsClient.wait(request); + } + } +} +// [END compute_v1_generated_RegionOperations_Wait_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/SyncWaitStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/SyncWaitStringStringString.java new file mode 100644 index 000000000000..a49ef906ab79 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperations/wait/SyncWaitStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperations_Wait_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionOperationsClient; + +public class SyncWaitStringStringString { + + public static void main(String[] args) throws Exception { + syncWaitStringStringString(); + } + + public static void syncWaitStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String operation = "operation1662702951"; + Operation response = regionOperationsClient.wait(project, region, operation); + } + } +} +// [END compute_v1_generated_RegionOperations_Wait_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperationssettings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperationssettings/delete/SyncDelete.java new file mode 100644 index 000000000000..575b7aafccc4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionoperationssettings/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionOperationsSettings_Delete_sync] +import com.google.cloud.compute.v1.RegionOperationsSettings; +import java.time.Duration; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionOperationsSettings.Builder regionOperationsSettingsBuilder = + RegionOperationsSettings.newBuilder(); + regionOperationsSettingsBuilder + .deleteSettings() + .setRetrySettings( + regionOperationsSettingsBuilder + .deleteSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionOperationsSettings regionOperationsSettings = regionOperationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionOperationsSettings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..4dd34a9207f5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Regions_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionsClient; +import com.google.cloud.compute.v1.RegionsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionsSettings regionsSettings = + RegionsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionsClient regionsClient = RegionsClient.create(regionsSettings); + } +} +// [END compute_v1_generated_Regions_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..0838e46ac1e0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Regions_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionsClient; +import com.google.cloud.compute.v1.RegionsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionsSettings regionsSettings = RegionsSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionsClient regionsClient = RegionsClient.create(regionsSettings); + } +} +// [END compute_v1_generated_Regions_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/AsyncGet.java new file mode 100644 index 000000000000..c6cd9611020f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Regions_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionRequest; +import com.google.cloud.compute.v1.Region; +import com.google.cloud.compute.v1.RegionsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionsClient regionsClient = RegionsClient.create()) { + GetRegionRequest request = + GetRegionRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionsClient.getCallable().futureCall(request); + // Do something. + Region response = future.get(); + } + } +} +// [END compute_v1_generated_Regions_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/SyncGet.java new file mode 100644 index 000000000000..0144c2a4390d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Regions_Get_sync] +import com.google.cloud.compute.v1.GetRegionRequest; +import com.google.cloud.compute.v1.Region; +import com.google.cloud.compute.v1.RegionsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionsClient regionsClient = RegionsClient.create()) { + GetRegionRequest request = + GetRegionRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Region response = regionsClient.get(request); + } + } +} +// [END compute_v1_generated_Regions_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/SyncGetStringString.java new file mode 100644 index 000000000000..6b3ec1f5b827 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Regions_Get_StringString_sync] +import com.google.cloud.compute.v1.Region; +import com.google.cloud.compute.v1.RegionsClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionsClient regionsClient = RegionsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Region response = regionsClient.get(project, region); + } + } +} +// [END compute_v1_generated_Regions_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/AsyncList.java new file mode 100644 index 000000000000..6f0cb4d1b2ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Regions_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionsRequest; +import com.google.cloud.compute.v1.Region; +import com.google.cloud.compute.v1.RegionsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionsClient regionsClient = RegionsClient.create()) { + ListRegionsRequest request = + ListRegionsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = regionsClient.listPagedCallable().futureCall(request); + // Do something. + for (Region element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Regions_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/AsyncListPaged.java new file mode 100644 index 000000000000..62a17962a7c6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Regions_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionsRequest; +import com.google.cloud.compute.v1.Region; +import com.google.cloud.compute.v1.RegionList; +import com.google.cloud.compute.v1.RegionsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionsClient regionsClient = RegionsClient.create()) { + ListRegionsRequest request = + ListRegionsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RegionList response = regionsClient.listCallable().call(request); + for (Region element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Regions_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/SyncList.java new file mode 100644 index 000000000000..96ad6f4d0ffa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Regions_List_sync] +import com.google.cloud.compute.v1.ListRegionsRequest; +import com.google.cloud.compute.v1.Region; +import com.google.cloud.compute.v1.RegionsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionsClient regionsClient = RegionsClient.create()) { + ListRegionsRequest request = + ListRegionsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Region element : regionsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Regions_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/SyncListString.java new file mode 100644 index 000000000000..a5c31812d127 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regions/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Regions_List_String_sync] +import com.google.cloud.compute.v1.Region; +import com.google.cloud.compute.v1.RegionsClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionsClient regionsClient = RegionsClient.create()) { + String project = "project-309310695"; + for (Region element : regionsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Regions_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..5b095ab501e3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.RegionSecurityPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSecurityPoliciesSettings regionSecurityPoliciesSettings = + RegionSecurityPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create(regionSecurityPoliciesSettings); + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..34ea81e14061 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.RegionSecurityPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSecurityPoliciesSettings regionSecurityPoliciesSettings = + RegionSecurityPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create(regionSecurityPoliciesSettings); + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/AsyncDelete.java new file mode 100644 index 000000000000..be4ebf2b8b3b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + DeleteRegionSecurityPolicyRequest request = + DeleteRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + ApiFuture future = + regionSecurityPoliciesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..695880a65516 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + DeleteRegionSecurityPolicyRequest request = + DeleteRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + OperationFuture future = + regionSecurityPoliciesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/SyncDelete.java new file mode 100644 index 000000000000..06d7946bc358 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + DeleteRegionSecurityPolicyRequest request = + DeleteRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + Operation response = regionSecurityPoliciesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..16c210ac2798 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String securityPolicy = "securityPolicy-788621166"; + Operation response = + regionSecurityPoliciesClient.deleteAsync(project, region, securityPolicy).get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/AsyncGet.java new file mode 100644 index 000000000000..9d2d40c090df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + GetRegionSecurityPolicyRequest request = + GetRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + ApiFuture future = + regionSecurityPoliciesClient.getCallable().futureCall(request); + // Do something. + SecurityPolicy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/SyncGet.java new file mode 100644 index 000000000000..35095ae050a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Get_sync] +import com.google.cloud.compute.v1.GetRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + GetRegionSecurityPolicyRequest request = + GetRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + SecurityPolicy response = regionSecurityPoliciesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..91c727c5c962 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Get_StringStringString_sync] +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String securityPolicy = "securityPolicy-788621166"; + SecurityPolicy response = regionSecurityPoliciesClient.get(project, region, securityPolicy); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/AsyncInsert.java new file mode 100644 index 000000000000..a88e01bde82c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/AsyncInsert.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + InsertRegionSecurityPolicyRequest request = + InsertRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + regionSecurityPoliciesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..8416d0ba4219 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/AsyncInsertLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + InsertRegionSecurityPolicyRequest request = + InsertRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + regionSecurityPoliciesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/SyncInsert.java new file mode 100644 index 000000000000..b8889460d6e3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + InsertRegionSecurityPolicyRequest request = + InsertRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + Operation response = regionSecurityPoliciesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/SyncInsertStringStringSecuritypolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/SyncInsertStringStringSecuritypolicy.java new file mode 100644 index 000000000000..842ce8ec447d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/insert/SyncInsertStringStringSecuritypolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Insert_StringStringSecuritypolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncInsertStringStringSecuritypolicy { + + public static void main(String[] args) throws Exception { + syncInsertStringStringSecuritypolicy(); + } + + public static void syncInsertStringStringSecuritypolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + SecurityPolicy securityPolicyResource = SecurityPolicy.newBuilder().build(); + Operation response = + regionSecurityPoliciesClient.insertAsync(project, region, securityPolicyResource).get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Insert_StringStringSecuritypolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/AsyncList.java new file mode 100644 index 000000000000..5da6a21753d4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + ListRegionSecurityPoliciesRequest request = + ListRegionSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionSecurityPoliciesClient.listPagedCallable().futureCall(request); + // Do something. + for (SecurityPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/AsyncListPaged.java new file mode 100644 index 000000000000..3f94d0ca0e3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; +import com.google.cloud.compute.v1.SecurityPolicyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + ListRegionSecurityPoliciesRequest request = + ListRegionSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SecurityPolicyList response = regionSecurityPoliciesClient.listCallable().call(request); + for (SecurityPolicy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/SyncList.java new file mode 100644 index 000000000000..08328398d9c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_List_sync] +import com.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + ListRegionSecurityPoliciesRequest request = + ListRegionSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (SecurityPolicy element : regionSecurityPoliciesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/SyncListStringString.java new file mode 100644 index 000000000000..e5fcf0f927d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_List_StringString_sync] +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (SecurityPolicy element : + regionSecurityPoliciesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/AsyncPatch.java new file mode 100644 index 000000000000..05634ad4be58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/AsyncPatch.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + PatchRegionSecurityPolicyRequest request = + PatchRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .build(); + ApiFuture future = + regionSecurityPoliciesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..dcfa30d8ddf0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + PatchRegionSecurityPolicyRequest request = + PatchRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .build(); + OperationFuture future = + regionSecurityPoliciesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/SyncPatch.java new file mode 100644 index 000000000000..70493db7994b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + PatchRegionSecurityPolicyRequest request = + PatchRegionSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .build(); + Operation response = regionSecurityPoliciesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/SyncPatchStringStringStringSecuritypolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/SyncPatchStringStringStringSecuritypolicy.java new file mode 100644 index 000000000000..1c37774608da --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypolicies/patch/SyncPatchStringStringStringSecuritypolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPolicies_Patch_StringStringStringSecuritypolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncPatchStringStringStringSecuritypolicy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringSecuritypolicy(); + } + + public static void syncPatchStringStringStringSecuritypolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSecurityPoliciesClient regionSecurityPoliciesClient = + RegionSecurityPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String securityPolicy = "securityPolicy-788621166"; + SecurityPolicy securityPolicyResource = SecurityPolicy.newBuilder().build(); + Operation response = + regionSecurityPoliciesClient + .patchAsync(project, region, securityPolicy, securityPolicyResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionSecurityPolicies_Patch_StringStringStringSecuritypolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypoliciessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypoliciessettings/get/SyncGet.java new file mode 100644 index 000000000000..a0072c03fe95 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsecuritypoliciessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSecurityPoliciesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionSecurityPoliciesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSecurityPoliciesSettings.Builder regionSecurityPoliciesSettingsBuilder = + RegionSecurityPoliciesSettings.newBuilder(); + regionSecurityPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + regionSecurityPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionSecurityPoliciesSettings regionSecurityPoliciesSettings = + regionSecurityPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionSecurityPoliciesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionssettings/get/SyncGet.java new file mode 100644 index 000000000000..5c5764ed11fb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionsSettings_Get_sync] +import com.google.cloud.compute.v1.RegionsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionsSettings.Builder regionsSettingsBuilder = RegionsSettings.newBuilder(); + regionsSettingsBuilder + .getSettings() + .setRetrySettings( + regionsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionsSettings regionsSettings = regionsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a068e1295d76 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.RegionSslCertificatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSslCertificatesSettings regionSslCertificatesSettings = + RegionSslCertificatesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create(regionSslCertificatesSettings); + } +} +// [END compute_v1_generated_RegionSslCertificates_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..072cc75b4556 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.RegionSslCertificatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSslCertificatesSettings regionSslCertificatesSettings = + RegionSslCertificatesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create(regionSslCertificatesSettings); + } +} +// [END compute_v1_generated_RegionSslCertificates_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/AsyncDelete.java new file mode 100644 index 000000000000..e97719d7873c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionSslCertificateRequest; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + DeleteRegionSslCertificateRequest request = + DeleteRegionSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslCertificate("sslCertificate-1304941589") + .build(); + ApiFuture future = + regionSslCertificatesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..b12a7050ae4c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionSslCertificateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + DeleteRegionSslCertificateRequest request = + DeleteRegionSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslCertificate("sslCertificate-1304941589") + .build(); + OperationFuture future = + regionSslCertificatesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/SyncDelete.java new file mode 100644 index 000000000000..705f70063a46 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionSslCertificateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + DeleteRegionSslCertificateRequest request = + DeleteRegionSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslCertificate("sslCertificate-1304941589") + .build(); + Operation response = regionSslCertificatesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..7b9d4406c75b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String sslCertificate = "sslCertificate-1304941589"; + Operation response = + regionSslCertificatesClient.deleteAsync(project, region, sslCertificate).get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/AsyncGet.java new file mode 100644 index 000000000000..d01044f723f8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionSslCertificateRequest; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + GetRegionSslCertificateRequest request = + GetRegionSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setSslCertificate("sslCertificate-1304941589") + .build(); + ApiFuture future = + regionSslCertificatesClient.getCallable().futureCall(request); + // Do something. + SslCertificate response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/SyncGet.java new file mode 100644 index 000000000000..f398b7ee8353 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Get_sync] +import com.google.cloud.compute.v1.GetRegionSslCertificateRequest; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + GetRegionSslCertificateRequest request = + GetRegionSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setSslCertificate("sslCertificate-1304941589") + .build(); + SslCertificate response = regionSslCertificatesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..d05cdb014bb0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Get_StringStringString_sync] +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String sslCertificate = "sslCertificate-1304941589"; + SslCertificate response = regionSslCertificatesClient.get(project, region, sslCertificate); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/AsyncInsert.java new file mode 100644 index 000000000000..5080d1beb6a8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionSslCertificateRequest; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + InsertRegionSslCertificateRequest request = + InsertRegionSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslCertificateResource(SslCertificate.newBuilder().build()) + .build(); + ApiFuture future = + regionSslCertificatesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..72960442c3e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionSslCertificateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + InsertRegionSslCertificateRequest request = + InsertRegionSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslCertificateResource(SslCertificate.newBuilder().build()) + .build(); + OperationFuture future = + regionSslCertificatesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/SyncInsert.java new file mode 100644 index 000000000000..a783dcf07d61 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionSslCertificateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + InsertRegionSslCertificateRequest request = + InsertRegionSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslCertificateResource(SslCertificate.newBuilder().build()) + .build(); + Operation response = regionSslCertificatesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/SyncInsertStringStringSslcertificate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/SyncInsertStringStringSslcertificate.java new file mode 100644 index 000000000000..b6fbdb5ce8ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/insert/SyncInsertStringStringSslcertificate.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_Insert_StringStringSslcertificate_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class SyncInsertStringStringSslcertificate { + + public static void main(String[] args) throws Exception { + syncInsertStringStringSslcertificate(); + } + + public static void syncInsertStringStringSslcertificate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + SslCertificate sslCertificateResource = SslCertificate.newBuilder().build(); + Operation response = + regionSslCertificatesClient.insertAsync(project, region, sslCertificateResource).get(); + } + } +} +// [END compute_v1_generated_RegionSslCertificates_Insert_StringStringSslcertificate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/AsyncList.java new file mode 100644 index 000000000000..3ca6b4f49937 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionSslCertificatesRequest; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + ListRegionSslCertificatesRequest request = + ListRegionSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionSslCertificatesClient.listPagedCallable().futureCall(request); + // Do something. + for (SslCertificate element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSslCertificates_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/AsyncListPaged.java new file mode 100644 index 000000000000..c600f82e69b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionSslCertificatesRequest; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificateList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + ListRegionSslCertificatesRequest request = + ListRegionSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SslCertificateList response = regionSslCertificatesClient.listCallable().call(request); + for (SslCertificate element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionSslCertificates_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/SyncList.java new file mode 100644 index 000000000000..8aa3cf702903 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_List_sync] +import com.google.cloud.compute.v1.ListRegionSslCertificatesRequest; +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + ListRegionSslCertificatesRequest request = + ListRegionSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (SslCertificate element : regionSslCertificatesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSslCertificates_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/SyncListStringString.java new file mode 100644 index 000000000000..a08792f49f91 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificates/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificates_List_StringString_sync] +import com.google.cloud.compute.v1.RegionSslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificate; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslCertificatesClient regionSslCertificatesClient = + RegionSslCertificatesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (SslCertificate element : + regionSslCertificatesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSslCertificates_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificatessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificatessettings/get/SyncGet.java new file mode 100644 index 000000000000..0e7448893f0a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslcertificatessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslCertificatesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionSslCertificatesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSslCertificatesSettings.Builder regionSslCertificatesSettingsBuilder = + RegionSslCertificatesSettings.newBuilder(); + regionSslCertificatesSettingsBuilder + .getSettings() + .setRetrySettings( + regionSslCertificatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionSslCertificatesSettings regionSslCertificatesSettings = + regionSslCertificatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionSslCertificatesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..2ef084d3c8bb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.RegionSslPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSslPoliciesSettings regionSslPoliciesSettings = + RegionSslPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionSslPoliciesClient regionSslPoliciesClient = + RegionSslPoliciesClient.create(regionSslPoliciesSettings); + } +} +// [END compute_v1_generated_RegionSslPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..95499abf6c47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.RegionSslPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSslPoliciesSettings regionSslPoliciesSettings = + RegionSslPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionSslPoliciesClient regionSslPoliciesClient = + RegionSslPoliciesClient.create(regionSslPoliciesSettings); + } +} +// [END compute_v1_generated_RegionSslPolicies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/AsyncDelete.java new file mode 100644 index 000000000000..765985d6d9e8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionSslPolicyRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + DeleteRegionSslPolicyRequest request = + DeleteRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .build(); + ApiFuture future = regionSslPoliciesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..bcb517ba9672 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionSslPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + DeleteRegionSslPolicyRequest request = + DeleteRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .build(); + OperationFuture future = + regionSslPoliciesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/SyncDelete.java new file mode 100644 index 000000000000..91a277ce996b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionSslPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + DeleteRegionSslPolicyRequest request = + DeleteRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .build(); + Operation response = regionSslPoliciesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..849dab328667 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String sslPolicy = "sslPolicy618174046"; + Operation response = regionSslPoliciesClient.deleteAsync(project, region, sslPolicy).get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/AsyncGet.java new file mode 100644 index 000000000000..a094e23cb336 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionSslPolicyRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + GetRegionSslPolicyRequest request = + GetRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setSslPolicy("sslPolicy618174046") + .build(); + ApiFuture future = regionSslPoliciesClient.getCallable().futureCall(request); + // Do something. + SslPolicy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/SyncGet.java new file mode 100644 index 000000000000..b700854abb10 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Get_sync] +import com.google.cloud.compute.v1.GetRegionSslPolicyRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + GetRegionSslPolicyRequest request = + GetRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setSslPolicy("sslPolicy618174046") + .build(); + SslPolicy response = regionSslPoliciesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..143e07eeee95 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Get_StringStringString_sync] +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String sslPolicy = "sslPolicy618174046"; + SslPolicy response = regionSslPoliciesClient.get(project, region, sslPolicy); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/AsyncInsert.java new file mode 100644 index 000000000000..5a13dc558287 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionSslPolicyRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + InsertRegionSslPolicyRequest request = + InsertRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + ApiFuture future = regionSslPoliciesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..e0ceede6cb85 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionSslPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + InsertRegionSslPolicyRequest request = + InsertRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + OperationFuture future = + regionSslPoliciesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/SyncInsert.java new file mode 100644 index 000000000000..e3ad08ed1011 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionSslPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + InsertRegionSslPolicyRequest request = + InsertRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + Operation response = regionSslPoliciesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/SyncInsertStringStringSslpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/SyncInsertStringStringSslpolicy.java new file mode 100644 index 000000000000..1e6d089bc52b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/insert/SyncInsertStringStringSslpolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Insert_StringStringSslpolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncInsertStringStringSslpolicy { + + public static void main(String[] args) throws Exception { + syncInsertStringStringSslpolicy(); + } + + public static void syncInsertStringStringSslpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + SslPolicy sslPolicyResource = SslPolicy.newBuilder().build(); + Operation response = + regionSslPoliciesClient.insertAsync(project, region, sslPolicyResource).get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Insert_StringStringSslpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/AsyncList.java new file mode 100644 index 000000000000..2e1073ab28aa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionSslPoliciesRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + ListRegionSslPoliciesRequest request = + ListRegionSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = regionSslPoliciesClient.listPagedCallable().futureCall(request); + // Do something. + for (SslPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSslPolicies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/AsyncListPaged.java new file mode 100644 index 000000000000..6eafc4c580f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionSslPoliciesRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesList; +import com.google.cloud.compute.v1.SslPolicy; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + ListRegionSslPoliciesRequest request = + ListRegionSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SslPoliciesList response = regionSslPoliciesClient.listCallable().call(request); + for (SslPolicy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionSslPolicies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/SyncList.java new file mode 100644 index 000000000000..2a0945885b8c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_List_sync] +import com.google.cloud.compute.v1.ListRegionSslPoliciesRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + ListRegionSslPoliciesRequest request = + ListRegionSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (SslPolicy element : regionSslPoliciesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSslPolicies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/SyncListStringString.java new file mode 100644 index 000000000000..1034fca8476b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_List_StringString_sync] +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (SslPolicy element : regionSslPoliciesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionSslPolicies_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/AsyncListAvailableFeatures.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/AsyncListAvailableFeatures.java new file mode 100644 index 000000000000..99043d87cb01 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/AsyncListAvailableFeatures.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_ListAvailableFeatures_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse; + +public class AsyncListAvailableFeatures { + + public static void main(String[] args) throws Exception { + asyncListAvailableFeatures(); + } + + public static void asyncListAvailableFeatures() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + ListAvailableFeaturesRegionSslPoliciesRequest request = + ListAvailableFeaturesRegionSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionSslPoliciesClient.listAvailableFeaturesCallable().futureCall(request); + // Do something. + SslPoliciesListAvailableFeaturesResponse response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_ListAvailableFeatures_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/SyncListAvailableFeatures.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/SyncListAvailableFeatures.java new file mode 100644 index 000000000000..753dec1d66e7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/SyncListAvailableFeatures.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_ListAvailableFeatures_sync] +import com.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse; + +public class SyncListAvailableFeatures { + + public static void main(String[] args) throws Exception { + syncListAvailableFeatures(); + } + + public static void syncListAvailableFeatures() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + ListAvailableFeaturesRegionSslPoliciesRequest request = + ListAvailableFeaturesRegionSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + SslPoliciesListAvailableFeaturesResponse response = + regionSslPoliciesClient.listAvailableFeatures(request); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_ListAvailableFeatures_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/SyncListAvailableFeaturesStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/SyncListAvailableFeaturesStringString.java new file mode 100644 index 000000000000..bb4427b5e1e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/listavailablefeatures/SyncListAvailableFeaturesStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_ListAvailableFeatures_StringString_sync] +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse; + +public class SyncListAvailableFeaturesStringString { + + public static void main(String[] args) throws Exception { + syncListAvailableFeaturesStringString(); + } + + public static void syncListAvailableFeaturesStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + SslPoliciesListAvailableFeaturesResponse response = + regionSslPoliciesClient.listAvailableFeatures(project, region); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_ListAvailableFeatures_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/AsyncPatch.java new file mode 100644 index 000000000000..98539d871019 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchRegionSslPolicyRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + PatchRegionSslPolicyRequest request = + PatchRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + ApiFuture future = regionSslPoliciesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..acc16be44942 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionSslPolicyRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + PatchRegionSslPolicyRequest request = + PatchRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + OperationFuture future = + regionSslPoliciesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/SyncPatch.java new file mode 100644 index 000000000000..3df32c8eec8c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionSslPolicyRequest; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + PatchRegionSslPolicyRequest request = + PatchRegionSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + Operation response = regionSslPoliciesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/SyncPatchStringStringStringSslpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/SyncPatchStringStringStringSslpolicy.java new file mode 100644 index 000000000000..c5c07c5ad1be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpolicies/patch/SyncPatchStringStringStringSslpolicy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPolicies_Patch_StringStringStringSslpolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncPatchStringStringStringSslpolicy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringSslpolicy(); + } + + public static void syncPatchStringStringStringSslpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String sslPolicy = "sslPolicy618174046"; + SslPolicy sslPolicyResource = SslPolicy.newBuilder().build(); + Operation response = + regionSslPoliciesClient.patchAsync(project, region, sslPolicy, sslPolicyResource).get(); + } + } +} +// [END compute_v1_generated_RegionSslPolicies_Patch_StringStringStringSslpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpoliciessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpoliciessettings/get/SyncGet.java new file mode 100644 index 000000000000..f024b48a7c10 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionsslpoliciessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionSslPoliciesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionSslPoliciesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSslPoliciesSettings.Builder regionSslPoliciesSettingsBuilder = + RegionSslPoliciesSettings.newBuilder(); + regionSslPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + regionSslPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionSslPoliciesSettings regionSslPoliciesSettings = regionSslPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionSslPoliciesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..48b61c18f132 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetHttpProxiesSettings regionTargetHttpProxiesSettings = + RegionTargetHttpProxiesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create(regionTargetHttpProxiesSettings); + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7086027d61e3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetHttpProxiesSettings regionTargetHttpProxiesSettings = + RegionTargetHttpProxiesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create(regionTargetHttpProxiesSettings); + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/AsyncDelete.java new file mode 100644 index 000000000000..1df72ce18981 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + DeleteRegionTargetHttpProxyRequest request = + DeleteRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + ApiFuture future = + regionTargetHttpProxiesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..d319b88eaa40 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + DeleteRegionTargetHttpProxyRequest request = + DeleteRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + OperationFuture future = + regionTargetHttpProxiesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/SyncDelete.java new file mode 100644 index 000000000000..006d00b7d7bd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + DeleteRegionTargetHttpProxyRequest request = + DeleteRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + Operation response = regionTargetHttpProxiesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..c7683b4a8cc7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetHttpProxy = "targetHttpProxy-1944074187"; + Operation response = + regionTargetHttpProxiesClient.deleteAsync(project, region, targetHttpProxy).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/AsyncGet.java new file mode 100644 index 000000000000..0957ec59c60b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + GetRegionTargetHttpProxyRequest request = + GetRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + ApiFuture future = + regionTargetHttpProxiesClient.getCallable().futureCall(request); + // Do something. + TargetHttpProxy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/SyncGet.java new file mode 100644 index 000000000000..144663cc70d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Get_sync] +import com.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + GetRegionTargetHttpProxyRequest request = + GetRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + TargetHttpProxy response = regionTargetHttpProxiesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..98b951ff343e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Get_StringStringString_sync] +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetHttpProxy = "targetHttpProxy-1944074187"; + TargetHttpProxy response = + regionTargetHttpProxiesClient.get(project, region, targetHttpProxy); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/AsyncInsert.java new file mode 100644 index 000000000000..96661addc7a1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + InsertRegionTargetHttpProxyRequest request = + InsertRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + ApiFuture future = + regionTargetHttpProxiesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..dd7b0ea1a2ec --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + InsertRegionTargetHttpProxyRequest request = + InsertRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + OperationFuture future = + regionTargetHttpProxiesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/SyncInsert.java new file mode 100644 index 000000000000..ff415be31c94 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + InsertRegionTargetHttpProxyRequest request = + InsertRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + Operation response = regionTargetHttpProxiesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/SyncInsertStringStringTargethttpproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/SyncInsertStringStringTargethttpproxy.java new file mode 100644 index 000000000000..577a9ff7bb53 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/insert/SyncInsertStringStringTargethttpproxy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_Insert_StringStringTargethttpproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncInsertStringStringTargethttpproxy { + + public static void main(String[] args) throws Exception { + syncInsertStringStringTargethttpproxy(); + } + + public static void syncInsertStringStringTargethttpproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + TargetHttpProxy targetHttpProxyResource = TargetHttpProxy.newBuilder().build(); + Operation response = + regionTargetHttpProxiesClient.insertAsync(project, region, targetHttpProxyResource).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_Insert_StringStringTargethttpproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/AsyncList.java new file mode 100644 index 000000000000..cf2139b4aa32 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + ListRegionTargetHttpProxiesRequest request = + ListRegionTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionTargetHttpProxiesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetHttpProxy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/AsyncListPaged.java new file mode 100644 index 000000000000..d2e0dcec6bbf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; +import com.google.cloud.compute.v1.TargetHttpProxyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + ListRegionTargetHttpProxiesRequest request = + ListRegionTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetHttpProxyList response = regionTargetHttpProxiesClient.listCallable().call(request); + for (TargetHttpProxy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/SyncList.java new file mode 100644 index 000000000000..870473931c51 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_List_sync] +import com.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + ListRegionTargetHttpProxiesRequest request = + ListRegionTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (TargetHttpProxy element : regionTargetHttpProxiesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/SyncListStringString.java new file mode 100644 index 000000000000..67df74862f66 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_List_StringString_sync] +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (TargetHttpProxy element : + regionTargetHttpProxiesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/AsyncSetUrlMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/AsyncSetUrlMap.java new file mode 100644 index 000000000000..7e14cc67c201 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/AsyncSetUrlMap.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_SetUrlMap_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.UrlMapReference; +import com.google.longrunning.Operation; + +public class AsyncSetUrlMap { + + public static void main(String[] args) throws Exception { + asyncSetUrlMap(); + } + + public static void asyncSetUrlMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + SetUrlMapRegionTargetHttpProxyRequest request = + SetUrlMapRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + ApiFuture future = + regionTargetHttpProxiesClient.setUrlMapCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_SetUrlMap_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/AsyncSetUrlMapLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/AsyncSetUrlMapLRO.java new file mode 100644 index 000000000000..477de92712b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/AsyncSetUrlMapLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_SetUrlMap_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.UrlMapReference; + +public class AsyncSetUrlMapLRO { + + public static void main(String[] args) throws Exception { + asyncSetUrlMapLRO(); + } + + public static void asyncSetUrlMapLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + SetUrlMapRegionTargetHttpProxyRequest request = + SetUrlMapRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + OperationFuture future = + regionTargetHttpProxiesClient.setUrlMapOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_SetUrlMap_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/SyncSetUrlMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/SyncSetUrlMap.java new file mode 100644 index 000000000000..54b859f5a30a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/SyncSetUrlMap.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_SetUrlMap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest; +import com.google.cloud.compute.v1.UrlMapReference; + +public class SyncSetUrlMap { + + public static void main(String[] args) throws Exception { + syncSetUrlMap(); + } + + public static void syncSetUrlMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + SetUrlMapRegionTargetHttpProxyRequest request = + SetUrlMapRegionTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + Operation response = regionTargetHttpProxiesClient.setUrlMapAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_SetUrlMap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/SyncSetUrlMapStringStringStringUrlmapreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/SyncSetUrlMapStringStringStringUrlmapreference.java new file mode 100644 index 000000000000..ab437e77c05c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxies/seturlmap/SyncSetUrlMapStringStringStringUrlmapreference.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxies_SetUrlMap_StringStringStringUrlmapreference_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; + +public class SyncSetUrlMapStringStringStringUrlmapreference { + + public static void main(String[] args) throws Exception { + syncSetUrlMapStringStringStringUrlmapreference(); + } + + public static void syncSetUrlMapStringStringStringUrlmapreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpProxiesClient regionTargetHttpProxiesClient = + RegionTargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetHttpProxy = "targetHttpProxy-1944074187"; + UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build(); + Operation response = + regionTargetHttpProxiesClient + .setUrlMapAsync(project, region, targetHttpProxy, urlMapReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpProxies_SetUrlMap_StringStringStringUrlmapreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxiessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxiessettings/get/SyncGet.java new file mode 100644 index 000000000000..a3dfd9fec5eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpproxiessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpProxiesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionTargetHttpProxiesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetHttpProxiesSettings.Builder regionTargetHttpProxiesSettingsBuilder = + RegionTargetHttpProxiesSettings.newBuilder(); + regionTargetHttpProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + regionTargetHttpProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionTargetHttpProxiesSettings regionTargetHttpProxiesSettings = + regionTargetHttpProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionTargetHttpProxiesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..af272334dc3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetHttpsProxiesSettings regionTargetHttpsProxiesSettings = + RegionTargetHttpsProxiesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create(regionTargetHttpsProxiesSettings); + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..779227679b0e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetHttpsProxiesSettings regionTargetHttpsProxiesSettings = + RegionTargetHttpsProxiesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create(regionTargetHttpsProxiesSettings); + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/AsyncDelete.java new file mode 100644 index 000000000000..411c97221ca3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + DeleteRegionTargetHttpsProxyRequest request = + DeleteRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = + regionTargetHttpsProxiesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..0b3495cba519 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + DeleteRegionTargetHttpsProxyRequest request = + DeleteRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + OperationFuture future = + regionTargetHttpsProxiesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/SyncDelete.java new file mode 100644 index 000000000000..62aa28f29001 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + DeleteRegionTargetHttpsProxyRequest request = + DeleteRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + Operation response = regionTargetHttpsProxiesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..9af33f6c1038 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + Operation response = + regionTargetHttpsProxiesClient.deleteAsync(project, region, targetHttpsProxy).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/AsyncGet.java new file mode 100644 index 000000000000..404430c94485 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + GetRegionTargetHttpsProxyRequest request = + GetRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = + regionTargetHttpsProxiesClient.getCallable().futureCall(request); + // Do something. + TargetHttpsProxy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/SyncGet.java new file mode 100644 index 000000000000..531f26943da9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Get_sync] +import com.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + GetRegionTargetHttpsProxyRequest request = + GetRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + TargetHttpsProxy response = regionTargetHttpsProxiesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..96f324337bd8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Get_StringStringString_sync] +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + TargetHttpsProxy response = + regionTargetHttpsProxiesClient.get(project, region, targetHttpsProxy); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/AsyncInsert.java new file mode 100644 index 000000000000..ddd16803fbcc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + InsertRegionTargetHttpsProxyRequest request = + InsertRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + ApiFuture future = + regionTargetHttpsProxiesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..7c5397b02fb0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + InsertRegionTargetHttpsProxyRequest request = + InsertRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + OperationFuture future = + regionTargetHttpsProxiesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/SyncInsert.java new file mode 100644 index 000000000000..8278d5a39c59 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + InsertRegionTargetHttpsProxyRequest request = + InsertRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + Operation response = regionTargetHttpsProxiesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/SyncInsertStringStringTargethttpsproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/SyncInsertStringStringTargethttpsproxy.java new file mode 100644 index 000000000000..12c583e556f2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/insert/SyncInsertStringStringTargethttpsproxy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Insert_StringStringTargethttpsproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncInsertStringStringTargethttpsproxy { + + public static void main(String[] args) throws Exception { + syncInsertStringStringTargethttpsproxy(); + } + + public static void syncInsertStringStringTargethttpsproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build(); + Operation response = + regionTargetHttpsProxiesClient + .insertAsync(project, region, targetHttpsProxyResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Insert_StringStringTargethttpsproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/AsyncList.java new file mode 100644 index 000000000000..042a0c3fe5fb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + ListRegionTargetHttpsProxiesRequest request = + ListRegionTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionTargetHttpsProxiesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetHttpsProxy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/AsyncListPaged.java new file mode 100644 index 000000000000..aebcec86ee5d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; +import com.google.cloud.compute.v1.TargetHttpsProxyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + ListRegionTargetHttpsProxiesRequest request = + ListRegionTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetHttpsProxyList response = regionTargetHttpsProxiesClient.listCallable().call(request); + for (TargetHttpsProxy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/SyncList.java new file mode 100644 index 000000000000..3e67d92e6b05 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_List_sync] +import com.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + ListRegionTargetHttpsProxiesRequest request = + ListRegionTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (TargetHttpsProxy element : regionTargetHttpsProxiesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/SyncListStringString.java new file mode 100644 index 000000000000..eee0f0e8ff69 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_List_StringString_sync] +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (TargetHttpsProxy element : + regionTargetHttpsProxiesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/AsyncPatch.java new file mode 100644 index 000000000000..56a6edab1eff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/AsyncPatch.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + PatchRegionTargetHttpsProxyRequest request = + PatchRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + ApiFuture future = + regionTargetHttpsProxiesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..c2f8e1c2b89a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + PatchRegionTargetHttpsProxyRequest request = + PatchRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + OperationFuture future = + regionTargetHttpsProxiesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/SyncPatch.java new file mode 100644 index 000000000000..a536080663d4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + PatchRegionTargetHttpsProxyRequest request = + PatchRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + Operation response = regionTargetHttpsProxiesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/SyncPatchStringStringStringTargethttpsproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/SyncPatchStringStringStringTargethttpsproxy.java new file mode 100644 index 000000000000..bc9168359b28 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/patch/SyncPatchStringStringStringTargethttpsproxy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_Patch_StringStringStringTargethttpsproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncPatchStringStringStringTargethttpsproxy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringTargethttpsproxy(); + } + + public static void syncPatchStringStringStringTargethttpsproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build(); + Operation response = + regionTargetHttpsProxiesClient + .patchAsync(project, region, targetHttpsProxy, targetHttpsProxyResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_Patch_StringStringStringTargethttpsproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/AsyncSetSslCertificates.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/AsyncSetSslCertificates.java new file mode 100644 index 000000000000..e37311f85455 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/AsyncSetSslCertificates.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_SetSslCertificates_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest; +import com.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest; +import com.google.longrunning.Operation; + +public class AsyncSetSslCertificates { + + public static void main(String[] args) throws Exception { + asyncSetSslCertificates(); + } + + public static void asyncSetSslCertificates() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + SetSslCertificatesRegionTargetHttpsProxyRequest request = + SetSslCertificatesRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionTargetHttpsProxiesSetSslCertificatesRequestResource( + RegionTargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = + regionTargetHttpsProxiesClient.setSslCertificatesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_SetSslCertificates_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java new file mode 100644 index 000000000000..1ac9c8b072f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_SetSslCertificates_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest; +import com.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest; + +public class AsyncSetSslCertificatesLRO { + + public static void main(String[] args) throws Exception { + asyncSetSslCertificatesLRO(); + } + + public static void asyncSetSslCertificatesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + SetSslCertificatesRegionTargetHttpsProxyRequest request = + SetSslCertificatesRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionTargetHttpsProxiesSetSslCertificatesRequestResource( + RegionTargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + OperationFuture future = + regionTargetHttpsProxiesClient.setSslCertificatesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_SetSslCertificates_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/SyncSetSslCertificates.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/SyncSetSslCertificates.java new file mode 100644 index 000000000000..b57a640deedf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/SyncSetSslCertificates.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_SetSslCertificates_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest; +import com.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest; + +public class SyncSetSslCertificates { + + public static void main(String[] args) throws Exception { + syncSetSslCertificates(); + } + + public static void syncSetSslCertificates() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + SetSslCertificatesRegionTargetHttpsProxyRequest request = + SetSslCertificatesRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionTargetHttpsProxiesSetSslCertificatesRequestResource( + RegionTargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + Operation response = regionTargetHttpsProxiesClient.setSslCertificatesAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_SetSslCertificates_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/SyncSetSslCertificatesStringStringStringRegiontargethttpsproxiessetsslcertificatesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/SyncSetSslCertificatesStringStringStringRegiontargethttpsproxiessetsslcertificatesrequest.java new file mode 100644 index 000000000000..88122b336819 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/setsslcertificates/SyncSetSslCertificatesStringStringStringRegiontargethttpsproxiessetsslcertificatesrequest.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_SetSslCertificates_StringStringStringRegiontargethttpsproxiessetsslcertificatesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest; + +public +class SyncSetSslCertificatesStringStringStringRegiontargethttpsproxiessetsslcertificatesrequest { + + public static void main(String[] args) throws Exception { + syncSetSslCertificatesStringStringStringRegiontargethttpsproxiessetsslcertificatesrequest(); + } + + public static void + syncSetSslCertificatesStringStringStringRegiontargethttpsproxiessetsslcertificatesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + RegionTargetHttpsProxiesSetSslCertificatesRequest + regionTargetHttpsProxiesSetSslCertificatesRequestResource = + RegionTargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build(); + Operation response = + regionTargetHttpsProxiesClient + .setSslCertificatesAsync( + project, + region, + targetHttpsProxy, + regionTargetHttpsProxiesSetSslCertificatesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_SetSslCertificates_StringStringStringRegiontargethttpsproxiessetsslcertificatesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/AsyncSetUrlMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/AsyncSetUrlMap.java new file mode 100644 index 000000000000..346ccb6b47e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/AsyncSetUrlMap.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_SetUrlMap_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.UrlMapReference; +import com.google.longrunning.Operation; + +public class AsyncSetUrlMap { + + public static void main(String[] args) throws Exception { + asyncSetUrlMap(); + } + + public static void asyncSetUrlMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + SetUrlMapRegionTargetHttpsProxyRequest request = + SetUrlMapRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + ApiFuture future = + regionTargetHttpsProxiesClient.setUrlMapCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_SetUrlMap_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/AsyncSetUrlMapLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/AsyncSetUrlMapLRO.java new file mode 100644 index 000000000000..b398a152492c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/AsyncSetUrlMapLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_SetUrlMap_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.UrlMapReference; + +public class AsyncSetUrlMapLRO { + + public static void main(String[] args) throws Exception { + asyncSetUrlMapLRO(); + } + + public static void asyncSetUrlMapLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + SetUrlMapRegionTargetHttpsProxyRequest request = + SetUrlMapRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + OperationFuture future = + regionTargetHttpsProxiesClient.setUrlMapOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_SetUrlMap_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/SyncSetUrlMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/SyncSetUrlMap.java new file mode 100644 index 000000000000..d7c095f00104 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/SyncSetUrlMap.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_SetUrlMap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.UrlMapReference; + +public class SyncSetUrlMap { + + public static void main(String[] args) throws Exception { + syncSetUrlMap(); + } + + public static void syncSetUrlMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + SetUrlMapRegionTargetHttpsProxyRequest request = + SetUrlMapRegionTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + Operation response = regionTargetHttpsProxiesClient.setUrlMapAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_SetUrlMap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/SyncSetUrlMapStringStringStringUrlmapreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/SyncSetUrlMapStringStringStringUrlmapreference.java new file mode 100644 index 000000000000..97db8b1497c5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxies/seturlmap/SyncSetUrlMapStringStringStringUrlmapreference.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxies_SetUrlMap_StringStringStringUrlmapreference_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; + +public class SyncSetUrlMapStringStringStringUrlmapreference { + + public static void main(String[] args) throws Exception { + syncSetUrlMapStringStringStringUrlmapreference(); + } + + public static void syncSetUrlMapStringStringStringUrlmapreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetHttpsProxiesClient regionTargetHttpsProxiesClient = + RegionTargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build(); + Operation response = + regionTargetHttpsProxiesClient + .setUrlMapAsync(project, region, targetHttpsProxy, urlMapReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_RegionTargetHttpsProxies_SetUrlMap_StringStringStringUrlmapreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxiessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxiessettings/get/SyncGet.java new file mode 100644 index 000000000000..c57a8e0cc7d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargethttpsproxiessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxiesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionTargetHttpsProxiesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetHttpsProxiesSettings.Builder regionTargetHttpsProxiesSettingsBuilder = + RegionTargetHttpsProxiesSettings.newBuilder(); + regionTargetHttpsProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + regionTargetHttpsProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionTargetHttpsProxiesSettings regionTargetHttpsProxiesSettings = + regionTargetHttpsProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionTargetHttpsProxiesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..7ad6bd299e33 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetTcpProxiesSettings regionTargetTcpProxiesSettings = + RegionTargetTcpProxiesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create(regionTargetTcpProxiesSettings); + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..48a1b3a1c4f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetTcpProxiesSettings regionTargetTcpProxiesSettings = + RegionTargetTcpProxiesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create(regionTargetTcpProxiesSettings); + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/AsyncDelete.java new file mode 100644 index 000000000000..8ec94c720185 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/AsyncDelete.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + DeleteRegionTargetTcpProxyRequest request = + DeleteRegionTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + ApiFuture future = + regionTargetTcpProxiesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..fa6bda79ccc9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/AsyncDeleteLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + DeleteRegionTargetTcpProxyRequest request = + DeleteRegionTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + OperationFuture future = + regionTargetTcpProxiesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/SyncDelete.java new file mode 100644 index 000000000000..0f9826952233 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + DeleteRegionTargetTcpProxyRequest request = + DeleteRegionTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + Operation response = regionTargetTcpProxiesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..29deadb83bb9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetTcpProxy = "targetTcpProxy-337144898"; + Operation response = + regionTargetTcpProxiesClient.deleteAsync(project, region, targetTcpProxy).get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/AsyncGet.java new file mode 100644 index 000000000000..08f4924f65cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionTargetTcpProxyRequest; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + GetRegionTargetTcpProxyRequest request = + GetRegionTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + ApiFuture future = + regionTargetTcpProxiesClient.getCallable().futureCall(request); + // Do something. + TargetTcpProxy response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/SyncGet.java new file mode 100644 index 000000000000..38064bb11258 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Get_sync] +import com.google.cloud.compute.v1.GetRegionTargetTcpProxyRequest; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + GetRegionTargetTcpProxyRequest request = + GetRegionTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + TargetTcpProxy response = regionTargetTcpProxiesClient.get(request); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..fba32150dfa7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Get_StringStringString_sync] +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetTcpProxy = "targetTcpProxy-337144898"; + TargetTcpProxy response = regionTargetTcpProxiesClient.get(project, region, targetTcpProxy); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/AsyncInsert.java new file mode 100644 index 000000000000..fffd0012b2cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/AsyncInsert.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + InsertRegionTargetTcpProxyRequest request = + InsertRegionTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build()) + .build(); + ApiFuture future = + regionTargetTcpProxiesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..aaeb6ca38937 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/AsyncInsertLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + InsertRegionTargetTcpProxyRequest request = + InsertRegionTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build()) + .build(); + OperationFuture future = + regionTargetTcpProxiesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/SyncInsert.java new file mode 100644 index 000000000000..2b687b269296 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + InsertRegionTargetTcpProxyRequest request = + InsertRegionTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build()) + .build(); + Operation response = regionTargetTcpProxiesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/SyncInsertStringStringTargettcpproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/SyncInsertStringStringTargettcpproxy.java new file mode 100644 index 000000000000..5b99463d75a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/insert/SyncInsertStringStringTargettcpproxy.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_Insert_StringStringTargettcpproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncInsertStringStringTargettcpproxy { + + public static void main(String[] args) throws Exception { + syncInsertStringStringTargettcpproxy(); + } + + public static void syncInsertStringStringTargettcpproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + TargetTcpProxy targetTcpProxyResource = TargetTcpProxy.newBuilder().build(); + Operation response = + regionTargetTcpProxiesClient.insertAsync(project, region, targetTcpProxyResource).get(); + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_Insert_StringStringTargettcpproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/AsyncList.java new file mode 100644 index 000000000000..54b89617fced --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/AsyncList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + ListRegionTargetTcpProxiesRequest request = + ListRegionTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + regionTargetTcpProxiesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetTcpProxy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/AsyncListPaged.java new file mode 100644 index 000000000000..6f558e75f3e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/AsyncListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; +import com.google.cloud.compute.v1.TargetTcpProxyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + ListRegionTargetTcpProxiesRequest request = + ListRegionTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetTcpProxyList response = regionTargetTcpProxiesClient.listCallable().call(request); + for (TargetTcpProxy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/SyncList.java new file mode 100644 index 000000000000..07ab6f2c48ff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/SyncList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_List_sync] +import com.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + ListRegionTargetTcpProxiesRequest request = + ListRegionTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (TargetTcpProxy element : regionTargetTcpProxiesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/SyncListStringString.java new file mode 100644 index 000000000000..ce0898a1ba52 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxies/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxies_List_StringString_sync] +import com.google.cloud.compute.v1.RegionTargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient = + RegionTargetTcpProxiesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (TargetTcpProxy element : + regionTargetTcpProxiesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionTargetTcpProxies_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxiessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxiessettings/get/SyncGet.java new file mode 100644 index 000000000000..145dc789e65e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regiontargettcpproxiessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionTargetTcpProxiesSettings_Get_sync] +import com.google.cloud.compute.v1.RegionTargetTcpProxiesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetTcpProxiesSettings.Builder regionTargetTcpProxiesSettingsBuilder = + RegionTargetTcpProxiesSettings.newBuilder(); + regionTargetTcpProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + regionTargetTcpProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionTargetTcpProxiesSettings regionTargetTcpProxiesSettings = + regionTargetTcpProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionTargetTcpProxiesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..7fb714cbd399 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.RegionUrlMapsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionUrlMapsSettings regionUrlMapsSettings = + RegionUrlMapsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create(regionUrlMapsSettings); + } +} +// [END compute_v1_generated_RegionUrlMaps_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..cc06748b0882 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.RegionUrlMapsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionUrlMapsSettings regionUrlMapsSettings = + RegionUrlMapsSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create(regionUrlMapsSettings); + } +} +// [END compute_v1_generated_RegionUrlMaps_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/AsyncDelete.java new file mode 100644 index 000000000000..306c86210403 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRegionUrlMapRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + DeleteRegionUrlMapRequest request = + DeleteRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + ApiFuture future = regionUrlMapsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..b3abaf833358 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRegionUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + DeleteRegionUrlMapRequest request = + DeleteRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + OperationFuture future = + regionUrlMapsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/SyncDelete.java new file mode 100644 index 000000000000..ddf4a790205c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Delete_sync] +import com.google.cloud.compute.v1.DeleteRegionUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + DeleteRegionUrlMapRequest request = + DeleteRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + Operation response = regionUrlMapsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..d9a354eafd00 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String urlMap = "urlMap-836780691"; + Operation response = regionUrlMapsClient.deleteAsync(project, region, urlMap).get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/AsyncGet.java new file mode 100644 index 000000000000..3da5aece889b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRegionUrlMapRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + GetRegionUrlMapRequest request = + GetRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setUrlMap("urlMap-836780691") + .build(); + ApiFuture future = regionUrlMapsClient.getCallable().futureCall(request); + // Do something. + UrlMap response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/SyncGet.java new file mode 100644 index 000000000000..241d819f99d1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Get_sync] +import com.google.cloud.compute.v1.GetRegionUrlMapRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + GetRegionUrlMapRequest request = + GetRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setUrlMap("urlMap-836780691") + .build(); + UrlMap response = regionUrlMapsClient.get(request); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..fa54055b1e86 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Get_StringStringString_sync] +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String urlMap = "urlMap-836780691"; + UrlMap response = regionUrlMapsClient.get(project, region, urlMap); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/AsyncInsert.java new file mode 100644 index 000000000000..99f83c78da9f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRegionUrlMapRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + InsertRegionUrlMapRequest request = + InsertRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + ApiFuture future = regionUrlMapsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..b7a10e68d8b1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRegionUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + InsertRegionUrlMapRequest request = + InsertRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + OperationFuture future = + regionUrlMapsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/SyncInsert.java new file mode 100644 index 000000000000..7cc397801237 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Insert_sync] +import com.google.cloud.compute.v1.InsertRegionUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + InsertRegionUrlMapRequest request = + InsertRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + Operation response = regionUrlMapsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/SyncInsertStringStringUrlmap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/SyncInsertStringStringUrlmap.java new file mode 100644 index 000000000000..855ac6817b3b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/insert/SyncInsertStringStringUrlmap.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Insert_StringStringUrlmap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncInsertStringStringUrlmap { + + public static void main(String[] args) throws Exception { + syncInsertStringStringUrlmap(); + } + + public static void syncInsertStringStringUrlmap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + UrlMap urlMapResource = UrlMap.newBuilder().build(); + Operation response = regionUrlMapsClient.insertAsync(project, region, urlMapResource).get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Insert_StringStringUrlmap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/AsyncList.java new file mode 100644 index 000000000000..da433ba12c38 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRegionUrlMapsRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + ListRegionUrlMapsRequest request = + ListRegionUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = regionUrlMapsClient.listPagedCallable().futureCall(request); + // Do something. + for (UrlMap element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionUrlMaps_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/AsyncListPaged.java new file mode 100644 index 000000000000..f6bb1e87eebe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_List_Paged_async] +import com.google.cloud.compute.v1.ListRegionUrlMapsRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + ListRegionUrlMapsRequest request = + ListRegionUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + UrlMapList response = regionUrlMapsClient.listCallable().call(request); + for (UrlMap element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_RegionUrlMaps_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/SyncList.java new file mode 100644 index 000000000000..1016cf7c3127 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_List_sync] +import com.google.cloud.compute.v1.ListRegionUrlMapsRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + ListRegionUrlMapsRequest request = + ListRegionUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (UrlMap element : regionUrlMapsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionUrlMaps_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/SyncListStringString.java new file mode 100644 index 000000000000..75d019e08d50 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_List_StringString_sync] +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (UrlMap element : regionUrlMapsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_RegionUrlMaps_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/AsyncPatch.java new file mode 100644 index 000000000000..9593ba11555d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchRegionUrlMapRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + PatchRegionUrlMapRequest request = + PatchRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + ApiFuture future = regionUrlMapsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..1878bf929c4c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionUrlMapRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + PatchRegionUrlMapRequest request = + PatchRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + OperationFuture future = + regionUrlMapsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/SyncPatch.java new file mode 100644 index 000000000000..43c2ac2814a7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRegionUrlMapRequest; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + PatchRegionUrlMapRequest request = + PatchRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + Operation response = regionUrlMapsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/SyncPatchStringStringStringUrlmap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/SyncPatchStringStringStringUrlmap.java new file mode 100644 index 000000000000..7df6d1f55813 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/patch/SyncPatchStringStringStringUrlmap.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Patch_StringStringStringUrlmap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncPatchStringStringStringUrlmap { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringUrlmap(); + } + + public static void syncPatchStringStringStringUrlmap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String urlMap = "urlMap-836780691"; + UrlMap urlMapResource = UrlMap.newBuilder().build(); + Operation response = + regionUrlMapsClient.patchAsync(project, region, urlMap, urlMapResource).get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Patch_StringStringStringUrlmap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/AsyncUpdate.java new file mode 100644 index 000000000000..59bcc8b205a7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/AsyncUpdate.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UpdateRegionUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + UpdateRegionUrlMapRequest request = + UpdateRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + ApiFuture future = regionUrlMapsClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..b6f5681ee0b3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/AsyncUpdateLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UpdateRegionUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + UpdateRegionUrlMapRequest request = + UpdateRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + OperationFuture future = + regionUrlMapsClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/SyncUpdate.java new file mode 100644 index 000000000000..32474c6172c1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Update_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UpdateRegionUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + UpdateRegionUrlMapRequest request = + UpdateRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + Operation response = regionUrlMapsClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/SyncUpdateStringStringStringUrlmap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/SyncUpdateStringStringStringUrlmap.java new file mode 100644 index 000000000000..bda15ec4d2d4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/update/SyncUpdateStringStringStringUrlmap.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Update_StringStringStringUrlmap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.UrlMap; + +public class SyncUpdateStringStringStringUrlmap { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringUrlmap(); + } + + public static void syncUpdateStringStringStringUrlmap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String urlMap = "urlMap-836780691"; + UrlMap urlMapResource = UrlMap.newBuilder().build(); + Operation response = + regionUrlMapsClient.updateAsync(project, region, urlMap, urlMapResource).get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Update_StringStringStringUrlmap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/AsyncValidate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/AsyncValidate.java new file mode 100644 index 000000000000..9751de32be25 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/AsyncValidate.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Validate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.RegionUrlMapsValidateRequest; +import com.google.cloud.compute.v1.UrlMapsValidateResponse; +import com.google.cloud.compute.v1.ValidateRegionUrlMapRequest; + +public class AsyncValidate { + + public static void main(String[] args) throws Exception { + asyncValidate(); + } + + public static void asyncValidate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + ValidateRegionUrlMapRequest request = + ValidateRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionUrlMapsValidateRequestResource( + RegionUrlMapsValidateRequest.newBuilder().build()) + .setUrlMap("urlMap-836780691") + .build(); + ApiFuture future = + regionUrlMapsClient.validateCallable().futureCall(request); + // Do something. + UrlMapsValidateResponse response = future.get(); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Validate_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/SyncValidate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/SyncValidate.java new file mode 100644 index 000000000000..4d836f4c35d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/SyncValidate.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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Validate_sync] +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.RegionUrlMapsValidateRequest; +import com.google.cloud.compute.v1.UrlMapsValidateResponse; +import com.google.cloud.compute.v1.ValidateRegionUrlMapRequest; + +public class SyncValidate { + + public static void main(String[] args) throws Exception { + syncValidate(); + } + + public static void syncValidate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + ValidateRegionUrlMapRequest request = + ValidateRegionUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionUrlMapsValidateRequestResource( + RegionUrlMapsValidateRequest.newBuilder().build()) + .setUrlMap("urlMap-836780691") + .build(); + UrlMapsValidateResponse response = regionUrlMapsClient.validate(request); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Validate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/SyncValidateStringStringStringRegionurlmapsvalidaterequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/SyncValidateStringStringStringRegionurlmapsvalidaterequest.java new file mode 100644 index 000000000000..222600e45860 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmaps/validate/SyncValidateStringStringStringRegionurlmapsvalidaterequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMaps_Validate_StringStringStringRegionurlmapsvalidaterequest_sync] +import com.google.cloud.compute.v1.RegionUrlMapsClient; +import com.google.cloud.compute.v1.RegionUrlMapsValidateRequest; +import com.google.cloud.compute.v1.UrlMapsValidateResponse; + +public class SyncValidateStringStringStringRegionurlmapsvalidaterequest { + + public static void main(String[] args) throws Exception { + syncValidateStringStringStringRegionurlmapsvalidaterequest(); + } + + public static void syncValidateStringStringStringRegionurlmapsvalidaterequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String urlMap = "urlMap-836780691"; + RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource = + RegionUrlMapsValidateRequest.newBuilder().build(); + UrlMapsValidateResponse response = + regionUrlMapsClient.validate( + project, region, urlMap, regionUrlMapsValidateRequestResource); + } + } +} +// [END compute_v1_generated_RegionUrlMaps_Validate_StringStringStringRegionurlmapsvalidaterequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmapssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmapssettings/get/SyncGet.java new file mode 100644 index 000000000000..0ca2518b83d5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regionurlmapssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RegionUrlMapsSettings_Get_sync] +import com.google.cloud.compute.v1.RegionUrlMapsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionUrlMapsSettings.Builder regionUrlMapsSettingsBuilder = RegionUrlMapsSettings.newBuilder(); + regionUrlMapsSettingsBuilder + .getSettings() + .setRetrySettings( + regionUrlMapsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionUrlMapsSettings regionUrlMapsSettings = regionUrlMapsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionUrlMapsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..29114b7a4cee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListReservationsRequest; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + AggregatedListReservationsRequest request = + AggregatedListReservationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + reservationsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Reservations_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..f313f918a7f0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListReservationsRequest; +import com.google.cloud.compute.v1.ReservationAggregatedList; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + AggregatedListReservationsRequest request = + AggregatedListReservationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ReservationAggregatedList response = + reservationsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Reservations_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..48f670238f47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListReservationsRequest; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + AggregatedListReservationsRequest request = + AggregatedListReservationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + reservationsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Reservations_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..312a6f9755f8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_AggregatedList_String_sync] +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + reservationsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Reservations_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..6ae1f383bbb1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ReservationsSettings reservationsSettings = + ReservationsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ReservationsClient reservationsClient = ReservationsClient.create(reservationsSettings); + } +} +// [END compute_v1_generated_Reservations_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e97ed446fc0b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ReservationsSettings reservationsSettings = + ReservationsSettings.newBuilder().setEndpoint(myEndpoint).build(); + ReservationsClient reservationsClient = ReservationsClient.create(reservationsSettings); + } +} +// [END compute_v1_generated_Reservations_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/AsyncDelete.java new file mode 100644 index 000000000000..282a8feecbd8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteReservationRequest; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + DeleteReservationRequest request = + DeleteReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setZone("zone3744684") + .build(); + ApiFuture future = reservationsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..23d09347f7ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteReservationRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + DeleteReservationRequest request = + DeleteReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setZone("zone3744684") + .build(); + OperationFuture future = + reservationsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/SyncDelete.java new file mode 100644 index 000000000000..d3c0f6648969 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Delete_sync] +import com.google.cloud.compute.v1.DeleteReservationRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + DeleteReservationRequest request = + DeleteReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setZone("zone3744684") + .build(); + Operation response = reservationsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Reservations_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..7d1b25062c9c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String reservation = "reservation-1563081780"; + Operation response = reservationsClient.deleteAsync(project, zone, reservation).get(); + } + } +} +// [END compute_v1_generated_Reservations_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/AsyncGet.java new file mode 100644 index 000000000000..baa1f309ca07 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetReservationRequest; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + GetReservationRequest request = + GetReservationRequest.newBuilder() + .setProject("project-309310695") + .setReservation("reservation-1563081780") + .setZone("zone3744684") + .build(); + ApiFuture future = reservationsClient.getCallable().futureCall(request); + // Do something. + Reservation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/SyncGet.java new file mode 100644 index 000000000000..14d62d83b4e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Get_sync] +import com.google.cloud.compute.v1.GetReservationRequest; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + GetReservationRequest request = + GetReservationRequest.newBuilder() + .setProject("project-309310695") + .setReservation("reservation-1563081780") + .setZone("zone3744684") + .build(); + Reservation response = reservationsClient.get(request); + } + } +} +// [END compute_v1_generated_Reservations_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..d954d5d2ccce --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String reservation = "reservation-1563081780"; + Reservation response = reservationsClient.get(project, zone, reservation); + } + } +} +// [END compute_v1_generated_Reservations_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..676452ebdd6f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyReservationRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ReservationsClient; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + GetIamPolicyReservationRequest request = + GetIamPolicyReservationRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + ApiFuture future = reservationsClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..9379b8887665 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyReservationRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + GetIamPolicyReservationRequest request = + GetIamPolicyReservationRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .build(); + Policy response = reservationsClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_Reservations_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..b60e17dacd98 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + Policy response = reservationsClient.getIamPolicy(project, zone, resource); + } + } +} +// [END compute_v1_generated_Reservations_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/AsyncInsert.java new file mode 100644 index 000000000000..8e26a58ec7ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertReservationRequest; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + InsertReservationRequest request = + InsertReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservationResource(Reservation.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = reservationsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..f61b6a8df41f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertReservationRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + InsertReservationRequest request = + InsertReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservationResource(Reservation.newBuilder().build()) + .setZone("zone3744684") + .build(); + OperationFuture future = + reservationsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/SyncInsert.java new file mode 100644 index 000000000000..2a484ac0c666 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Insert_sync] +import com.google.cloud.compute.v1.InsertReservationRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + InsertReservationRequest request = + InsertReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservationResource(Reservation.newBuilder().build()) + .setZone("zone3744684") + .build(); + Operation response = reservationsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Reservations_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/SyncInsertStringStringReservation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/SyncInsertStringStringReservation.java new file mode 100644 index 000000000000..a34ae1e68c77 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/insert/SyncInsertStringStringReservation.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Insert_StringStringReservation_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncInsertStringStringReservation { + + public static void main(String[] args) throws Exception { + syncInsertStringStringReservation(); + } + + public static void syncInsertStringStringReservation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + Reservation reservationResource = Reservation.newBuilder().build(); + Operation response = reservationsClient.insertAsync(project, zone, reservationResource).get(); + } + } +} +// [END compute_v1_generated_Reservations_Insert_StringStringReservation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/AsyncList.java new file mode 100644 index 000000000000..560ce0e3d55c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListReservationsRequest; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + ListReservationsRequest request = + ListReservationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = reservationsClient.listPagedCallable().futureCall(request); + // Do something. + for (Reservation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Reservations_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/AsyncListPaged.java new file mode 100644 index 000000000000..b174f1279e16 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_List_Paged_async] +import com.google.cloud.compute.v1.ListReservationsRequest; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationList; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + ListReservationsRequest request = + ListReservationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + ReservationList response = reservationsClient.listCallable().call(request); + for (Reservation element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Reservations_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/SyncList.java new file mode 100644 index 000000000000..9d760d0d39bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_List_sync] +import com.google.cloud.compute.v1.ListReservationsRequest; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + ListReservationsRequest request = + ListReservationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (Reservation element : reservationsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Reservations_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/SyncListStringString.java new file mode 100644 index 000000000000..3531e7e2e295 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_List_StringString_sync] +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (Reservation element : reservationsClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Reservations_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/AsyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/AsyncResize.java new file mode 100644 index 000000000000..ea6765858ad5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/AsyncResize.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Resize_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsResizeRequest; +import com.google.cloud.compute.v1.ResizeReservationRequest; +import com.google.longrunning.Operation; + +public class AsyncResize { + + public static void main(String[] args) throws Exception { + asyncResize(); + } + + public static void asyncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + ResizeReservationRequest request = + ResizeReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setReservationsResizeRequestResource(ReservationsResizeRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = reservationsClient.resizeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Resize_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/AsyncResizeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/AsyncResizeLRO.java new file mode 100644 index 000000000000..1ae019df9587 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/AsyncResizeLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Resize_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsResizeRequest; +import com.google.cloud.compute.v1.ResizeReservationRequest; + +public class AsyncResizeLRO { + + public static void main(String[] args) throws Exception { + asyncResizeLRO(); + } + + public static void asyncResizeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + ResizeReservationRequest request = + ResizeReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setReservationsResizeRequestResource(ReservationsResizeRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + OperationFuture future = + reservationsClient.resizeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Resize_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/SyncResize.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/SyncResize.java new file mode 100644 index 000000000000..17935643a6b1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/SyncResize.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Resize_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsResizeRequest; +import com.google.cloud.compute.v1.ResizeReservationRequest; + +public class SyncResize { + + public static void main(String[] args) throws Exception { + syncResize(); + } + + public static void syncResize() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + ResizeReservationRequest request = + ResizeReservationRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setReservationsResizeRequestResource(ReservationsResizeRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + Operation response = reservationsClient.resizeAsync(request).get(); + } + } +} +// [END compute_v1_generated_Reservations_Resize_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/SyncResizeStringStringStringReservationsresizerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/SyncResizeStringStringStringReservationsresizerequest.java new file mode 100644 index 000000000000..18f3ec57f3e0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/resize/SyncResizeStringStringStringReservationsresizerequest.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Resize_StringStringStringReservationsresizerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ReservationsResizeRequest; + +public class SyncResizeStringStringStringReservationsresizerequest { + + public static void main(String[] args) throws Exception { + syncResizeStringStringStringReservationsresizerequest(); + } + + public static void syncResizeStringStringStringReservationsresizerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String reservation = "reservation-1563081780"; + ReservationsResizeRequest reservationsResizeRequestResource = + ReservationsResizeRequest.newBuilder().build(); + Operation response = + reservationsClient + .resizeAsync(project, zone, reservation, reservationsResizeRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Reservations_Resize_StringStringStringReservationsresizerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..1e3f6e5601bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.SetIamPolicyReservationRequest; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + SetIamPolicyReservationRequest request = + SetIamPolicyReservationRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build()) + .build(); + ApiFuture future = reservationsClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..1b2150bf8597 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_SetIamPolicy_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.SetIamPolicyReservationRequest; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + SetIamPolicyReservationRequest request = + SetIamPolicyReservationRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setZone("zone3744684") + .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build()) + .build(); + Policy response = reservationsClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_Reservations_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.java new file mode 100644 index 000000000000..91bdead37fe0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/setiampolicy/SyncSetIamPolicyStringStringStringZonesetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_SetIamPolicy_StringStringStringZonesetpolicyrequest_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.ZoneSetPolicyRequest; + +public class SyncSetIamPolicyStringStringStringZonesetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringZonesetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringZonesetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build(); + Policy response = + reservationsClient.setIamPolicy(project, zone, resource, zoneSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_Reservations_SetIamPolicy_StringStringStringZonesetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..98a78901b387 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.TestIamPermissionsReservationRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + TestIamPermissionsReservationRequest request = + TestIamPermissionsReservationRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = + reservationsClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..e6a8b70583a5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_TestIamPermissions_sync] +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.TestIamPermissionsReservationRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + TestIamPermissionsReservationRequest request = + TestIamPermissionsReservationRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .setZone("zone3744684") + .build(); + TestPermissionsResponse response = reservationsClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_Reservations_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..2fc84b43b54e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + reservationsClient.testIamPermissions( + project, zone, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_Reservations_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/AsyncUpdate.java new file mode 100644 index 000000000000..ddafbd50e0d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/AsyncUpdate.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.UpdateReservationRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + UpdateReservationRequest request = + UpdateReservationRequest.newBuilder() + .setPaths("paths106438894") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setReservationResource(Reservation.newBuilder().build()) + .setUpdateMask("updateMask-296147115") + .setZone("zone3744684") + .build(); + ApiFuture future = reservationsClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..47e197473090 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/AsyncUpdateLRO.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.UpdateReservationRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + UpdateReservationRequest request = + UpdateReservationRequest.newBuilder() + .setPaths("paths106438894") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setReservationResource(Reservation.newBuilder().build()) + .setUpdateMask("updateMask-296147115") + .setZone("zone3744684") + .build(); + OperationFuture future = + reservationsClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Reservations_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/SyncUpdate.java new file mode 100644 index 000000000000..337f869558c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Update_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; +import com.google.cloud.compute.v1.UpdateReservationRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + UpdateReservationRequest request = + UpdateReservationRequest.newBuilder() + .setPaths("paths106438894") + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setReservation("reservation-1563081780") + .setReservationResource(Reservation.newBuilder().build()) + .setUpdateMask("updateMask-296147115") + .setZone("zone3744684") + .build(); + Operation response = reservationsClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_Reservations_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/SyncUpdateStringStringStringReservation.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/SyncUpdateStringStringStringReservation.java new file mode 100644 index 000000000000..af0b170e92ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservations/update/SyncUpdateStringStringStringReservation.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.compute.v1.samples; + +// [START compute_v1_generated_Reservations_Update_StringStringStringReservation_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Reservation; +import com.google.cloud.compute.v1.ReservationsClient; + +public class SyncUpdateStringStringStringReservation { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringReservation(); + } + + public static void syncUpdateStringStringStringReservation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReservationsClient reservationsClient = ReservationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String reservation = "reservation-1563081780"; + Reservation reservationResource = Reservation.newBuilder().build(); + Operation response = + reservationsClient.updateAsync(project, zone, reservation, reservationResource).get(); + } + } +} +// [END compute_v1_generated_Reservations_Update_StringStringStringReservation_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservationssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservationssettings/get/SyncGet.java new file mode 100644 index 000000000000..db2157640fa9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/reservationssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ReservationsSettings_Get_sync] +import com.google.cloud.compute.v1.ReservationsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ReservationsSettings.Builder reservationsSettingsBuilder = ReservationsSettings.newBuilder(); + reservationsSettingsBuilder + .getSettings() + .setRetrySettings( + reservationsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ReservationsSettings reservationsSettings = reservationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ReservationsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..1e888df24259 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePoliciesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + AggregatedListResourcePoliciesRequest request = + AggregatedListResourcePoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + resourcePoliciesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ResourcePolicies_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..0a3b4153b6e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePoliciesScopedList; +import com.google.cloud.compute.v1.ResourcePolicyAggregatedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + AggregatedListResourcePoliciesRequest request = + AggregatedListResourcePoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ResourcePolicyAggregatedList response = + resourcePoliciesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_ResourcePolicies_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..7f01f053ec53 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePoliciesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + AggregatedListResourcePoliciesRequest request = + AggregatedListResourcePoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + resourcePoliciesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ResourcePolicies_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..20e5d48f6ea3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_AggregatedList_String_sync] +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePoliciesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + resourcePoliciesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ResourcePolicies_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..8e93e7edc4db --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ResourcePoliciesSettings resourcePoliciesSettings = + ResourcePoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ResourcePoliciesClient resourcePoliciesClient = + ResourcePoliciesClient.create(resourcePoliciesSettings); + } +} +// [END compute_v1_generated_ResourcePolicies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..aa3491c3dd61 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ResourcePoliciesSettings resourcePoliciesSettings = + ResourcePoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + ResourcePoliciesClient resourcePoliciesClient = + ResourcePoliciesClient.create(resourcePoliciesSettings); + } +} +// [END compute_v1_generated_ResourcePolicies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/AsyncDelete.java new file mode 100644 index 000000000000..60b563ebcbbb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteResourcePolicyRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + DeleteResourcePolicyRequest request = + DeleteResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setResourcePolicy("resourcePolicy-130903328") + .build(); + ApiFuture future = resourcePoliciesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..49a45a5259b5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteResourcePolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResourcePoliciesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + DeleteResourcePolicyRequest request = + DeleteResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setResourcePolicy("resourcePolicy-130903328") + .build(); + OperationFuture future = + resourcePoliciesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/SyncDelete.java new file mode 100644 index 000000000000..18d48b479861 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Delete_sync] +import com.google.cloud.compute.v1.DeleteResourcePolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResourcePoliciesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + DeleteResourcePolicyRequest request = + DeleteResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setResourcePolicy("resourcePolicy-130903328") + .build(); + Operation response = resourcePoliciesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..aa944abd234d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResourcePoliciesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resourcePolicy = "resourcePolicy-130903328"; + Operation response = + resourcePoliciesClient.deleteAsync(project, region, resourcePolicy).get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/AsyncGet.java new file mode 100644 index 000000000000..cad5ac9f85ee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetResourcePolicyRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + GetResourcePolicyRequest request = + GetResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResourcePolicy("resourcePolicy-130903328") + .build(); + ApiFuture future = resourcePoliciesClient.getCallable().futureCall(request); + // Do something. + ResourcePolicy response = future.get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/SyncGet.java new file mode 100644 index 000000000000..2cd62f8da2a7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Get_sync] +import com.google.cloud.compute.v1.GetResourcePolicyRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + GetResourcePolicyRequest request = + GetResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResourcePolicy("resourcePolicy-130903328") + .build(); + ResourcePolicy response = resourcePoliciesClient.get(request); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..18f0dbf4af3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Get_StringStringString_sync] +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resourcePolicy = "resourcePolicy-130903328"; + ResourcePolicy response = resourcePoliciesClient.get(project, region, resourcePolicy); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..422d7e53e76a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ResourcePoliciesClient; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + GetIamPolicyResourcePolicyRequest request = + GetIamPolicyResourcePolicyRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + ApiFuture future = resourcePoliciesClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..38eb81a012aa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ResourcePoliciesClient; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + GetIamPolicyResourcePolicyRequest request = + GetIamPolicyResourcePolicyRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + Policy response = resourcePoliciesClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_ResourcePolicies_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..87571b5060e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ResourcePoliciesClient; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + Policy response = resourcePoliciesClient.getIamPolicy(project, region, resource); + } + } +} +// [END compute_v1_generated_ResourcePolicies_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/AsyncInsert.java new file mode 100644 index 000000000000..8e84a90ac773 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertResourcePolicyRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + InsertResourcePolicyRequest request = + InsertResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setResourcePolicyResource(ResourcePolicy.newBuilder().build()) + .build(); + ApiFuture future = resourcePoliciesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..24fdcb2e4299 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertResourcePolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + InsertResourcePolicyRequest request = + InsertResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setResourcePolicyResource(ResourcePolicy.newBuilder().build()) + .build(); + OperationFuture future = + resourcePoliciesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/SyncInsert.java new file mode 100644 index 000000000000..e51d02eb2bfa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Insert_sync] +import com.google.cloud.compute.v1.InsertResourcePolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + InsertResourcePolicyRequest request = + InsertResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setResourcePolicyResource(ResourcePolicy.newBuilder().build()) + .build(); + Operation response = resourcePoliciesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/SyncInsertStringStringResourcepolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/SyncInsertStringStringResourcepolicy.java new file mode 100644 index 000000000000..de7e3c824fab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/insert/SyncInsertStringStringResourcepolicy.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_Insert_StringStringResourcepolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class SyncInsertStringStringResourcepolicy { + + public static void main(String[] args) throws Exception { + syncInsertStringStringResourcepolicy(); + } + + public static void syncInsertStringStringResourcepolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + ResourcePolicy resourcePolicyResource = ResourcePolicy.newBuilder().build(); + Operation response = + resourcePoliciesClient.insertAsync(project, region, resourcePolicyResource).get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_Insert_StringStringResourcepolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/AsyncList.java new file mode 100644 index 000000000000..869c192e48dc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListResourcePoliciesRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + ListResourcePoliciesRequest request = + ListResourcePoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + resourcePoliciesClient.listPagedCallable().futureCall(request); + // Do something. + for (ResourcePolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ResourcePolicies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/AsyncListPaged.java new file mode 100644 index 000000000000..5b6faf1d6899 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_List_Paged_async] +import com.google.cloud.compute.v1.ListResourcePoliciesRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; +import com.google.cloud.compute.v1.ResourcePolicyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + ListResourcePoliciesRequest request = + ListResourcePoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ResourcePolicyList response = resourcePoliciesClient.listCallable().call(request); + for (ResourcePolicy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_ResourcePolicies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/SyncList.java new file mode 100644 index 000000000000..3d65d6c9882f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_List_sync] +import com.google.cloud.compute.v1.ListResourcePoliciesRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + ListResourcePoliciesRequest request = + ListResourcePoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (ResourcePolicy element : resourcePoliciesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ResourcePolicies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/SyncListStringString.java new file mode 100644 index 000000000000..ce661b1e3972 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_List_StringString_sync] +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.ResourcePolicy; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (ResourcePolicy element : resourcePoliciesClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ResourcePolicies_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..bfc02d5a72bb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + SetIamPolicyResourcePolicyRequest request = + SetIamPolicyResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = resourcePoliciesClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..6305f23d2a45 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_SetIamPolicy_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + SetIamPolicyResourcePolicyRequest request = + SetIamPolicyResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = resourcePoliciesClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_ResourcePolicies_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java new file mode 100644 index 000000000000..139a5d511722 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.ResourcePoliciesClient; + +public class SyncSetIamPolicyStringStringStringRegionsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringRegionsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringRegionsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetPolicyRequest regionSetPolicyRequestResource = + RegionSetPolicyRequest.newBuilder().build(); + Policy response = + resourcePoliciesClient.setIamPolicy( + project, region, resource, regionSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_ResourcePolicies_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..b9e4f2f8df84 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + TestIamPermissionsResourcePolicyRequest request = + TestIamPermissionsResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + resourcePoliciesClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_ResourcePolicies_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..6b2f88b83fb2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_TestIamPermissions_sync] +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + TestIamPermissionsResourcePolicyRequest request = + TestIamPermissionsResourcePolicyRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = resourcePoliciesClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_ResourcePolicies_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..9be7ecea9380 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepolicies/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePolicies_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.ResourcePoliciesClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + resourcePoliciesClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_ResourcePolicies_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepoliciessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepoliciessettings/get/SyncGet.java new file mode 100644 index 000000000000..d98da2e5ae74 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/resourcepoliciessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ResourcePoliciesSettings_Get_sync] +import com.google.cloud.compute.v1.ResourcePoliciesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ResourcePoliciesSettings.Builder resourcePoliciesSettingsBuilder = + ResourcePoliciesSettings.newBuilder(); + resourcePoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + resourcePoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ResourcePoliciesSettings resourcePoliciesSettings = resourcePoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ResourcePoliciesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..38e45cf59ce0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListRoutersRequest; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + AggregatedListRoutersRequest request = + AggregatedListRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + routersClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..382f07748caf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListRoutersRequest; +import com.google.cloud.compute.v1.RouterAggregatedList; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + AggregatedListRoutersRequest request = + AggregatedListRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RouterAggregatedList response = routersClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Routers_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..9f8980c4958f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListRoutersRequest; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + AggregatedListRoutersRequest request = + AggregatedListRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + routersClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..76ec8219d3d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_AggregatedList_String_sync] +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + routersClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..db4fae2c04ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RoutersSettings routersSettings = + RoutersSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RoutersClient routersClient = RoutersClient.create(routersSettings); + } +} +// [END compute_v1_generated_Routers_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..74669af35d89 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RoutersSettings routersSettings = RoutersSettings.newBuilder().setEndpoint(myEndpoint).build(); + RoutersClient routersClient = RoutersClient.create(routersSettings); + } +} +// [END compute_v1_generated_Routers_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/AsyncDelete.java new file mode 100644 index 000000000000..253630bd9201 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRouterRequest; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + DeleteRouterRequest request = + DeleteRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .build(); + ApiFuture future = routersClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..b2a878569049 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRouterRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RoutersClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + DeleteRouterRequest request = + DeleteRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .build(); + OperationFuture future = + routersClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/SyncDelete.java new file mode 100644 index 000000000000..193e74b81fe3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Delete_sync] +import com.google.cloud.compute.v1.DeleteRouterRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + DeleteRouterRequest request = + DeleteRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .build(); + Operation response = routersClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Routers_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..c0a3fdde4e37 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String router = "router-925132983"; + Operation response = routersClient.deleteAsync(project, region, router).get(); + } + } +} +// [END compute_v1_generated_Routers_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/AsyncGet.java new file mode 100644 index 000000000000..cbafcdc8eb30 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRouterRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + GetRouterRequest request = + GetRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRouter("router-925132983") + .build(); + ApiFuture future = routersClient.getCallable().futureCall(request); + // Do something. + Router response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/SyncGet.java new file mode 100644 index 000000000000..911d5c95f7ea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Get_sync] +import com.google.cloud.compute.v1.GetRouterRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + GetRouterRequest request = + GetRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRouter("router-925132983") + .build(); + Router response = routersClient.get(request); + } + } +} +// [END compute_v1_generated_Routers_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..1bd9abe0ced2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String router = "router-925132983"; + Router response = routersClient.get(project, region, router); + } + } +} +// [END compute_v1_generated_Routers_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/AsyncGetNatMappingInfo.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/AsyncGetNatMappingInfo.java new file mode 100644 index 000000000000..67846bdb8243 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/AsyncGetNatMappingInfo.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_GetNatMappingInfo_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.VmEndpointNatMappings; + +public class AsyncGetNatMappingInfo { + + public static void main(String[] args) throws Exception { + asyncGetNatMappingInfo(); + } + + public static void asyncGetNatMappingInfo() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + GetNatMappingInfoRoutersRequest request = + GetNatMappingInfoRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .setRouter("router-925132983") + .build(); + ApiFuture future = + routersClient.getNatMappingInfoPagedCallable().futureCall(request); + // Do something. + for (VmEndpointNatMappings element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_GetNatMappingInfo_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/AsyncGetNatMappingInfoPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/AsyncGetNatMappingInfoPaged.java new file mode 100644 index 000000000000..5523d1f103bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/AsyncGetNatMappingInfoPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_GetNatMappingInfo_Paged_async] +import com.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.VmEndpointNatMappings; +import com.google.cloud.compute.v1.VmEndpointNatMappingsList; +import com.google.common.base.Strings; + +public class AsyncGetNatMappingInfoPaged { + + public static void main(String[] args) throws Exception { + asyncGetNatMappingInfoPaged(); + } + + public static void asyncGetNatMappingInfoPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + GetNatMappingInfoRoutersRequest request = + GetNatMappingInfoRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .setRouter("router-925132983") + .build(); + while (true) { + VmEndpointNatMappingsList response = + routersClient.getNatMappingInfoCallable().call(request); + for (VmEndpointNatMappings element : response.getResultList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Routers_GetNatMappingInfo_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/SyncGetNatMappingInfo.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/SyncGetNatMappingInfo.java new file mode 100644 index 000000000000..67323ac1ad99 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/SyncGetNatMappingInfo.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_GetNatMappingInfo_sync] +import com.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.VmEndpointNatMappings; + +public class SyncGetNatMappingInfo { + + public static void main(String[] args) throws Exception { + syncGetNatMappingInfo(); + } + + public static void syncGetNatMappingInfo() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + GetNatMappingInfoRoutersRequest request = + GetNatMappingInfoRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .setRouter("router-925132983") + .build(); + for (VmEndpointNatMappings element : routersClient.getNatMappingInfo(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_GetNatMappingInfo_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/SyncGetNatMappingInfoStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/SyncGetNatMappingInfoStringStringString.java new file mode 100644 index 000000000000..df32a90171bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getnatmappinginfo/SyncGetNatMappingInfoStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_GetNatMappingInfo_StringStringString_sync] +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.VmEndpointNatMappings; + +public class SyncGetNatMappingInfoStringStringString { + + public static void main(String[] args) throws Exception { + syncGetNatMappingInfoStringStringString(); + } + + public static void syncGetNatMappingInfoStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String router = "router-925132983"; + for (VmEndpointNatMappings element : + routersClient.getNatMappingInfo(project, region, router).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_GetNatMappingInfo_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/AsyncGetRouterStatus.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/AsyncGetRouterStatus.java new file mode 100644 index 000000000000..d4491db3baad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/AsyncGetRouterStatus.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_GetRouterStatus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRouterStatusRouterRequest; +import com.google.cloud.compute.v1.RouterStatusResponse; +import com.google.cloud.compute.v1.RoutersClient; + +public class AsyncGetRouterStatus { + + public static void main(String[] args) throws Exception { + asyncGetRouterStatus(); + } + + public static void asyncGetRouterStatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + GetRouterStatusRouterRequest request = + GetRouterStatusRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRouter("router-925132983") + .build(); + ApiFuture future = + routersClient.getRouterStatusCallable().futureCall(request); + // Do something. + RouterStatusResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_GetRouterStatus_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/SyncGetRouterStatus.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/SyncGetRouterStatus.java new file mode 100644 index 000000000000..cabac0139e9a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/SyncGetRouterStatus.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_GetRouterStatus_sync] +import com.google.cloud.compute.v1.GetRouterStatusRouterRequest; +import com.google.cloud.compute.v1.RouterStatusResponse; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncGetRouterStatus { + + public static void main(String[] args) throws Exception { + syncGetRouterStatus(); + } + + public static void syncGetRouterStatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + GetRouterStatusRouterRequest request = + GetRouterStatusRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRouter("router-925132983") + .build(); + RouterStatusResponse response = routersClient.getRouterStatus(request); + } + } +} +// [END compute_v1_generated_Routers_GetRouterStatus_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/SyncGetRouterStatusStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/SyncGetRouterStatusStringStringString.java new file mode 100644 index 000000000000..ac0ac113e285 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/getrouterstatus/SyncGetRouterStatusStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_GetRouterStatus_StringStringString_sync] +import com.google.cloud.compute.v1.RouterStatusResponse; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncGetRouterStatusStringStringString { + + public static void main(String[] args) throws Exception { + syncGetRouterStatusStringStringString(); + } + + public static void syncGetRouterStatusStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String router = "router-925132983"; + RouterStatusResponse response = routersClient.getRouterStatus(project, region, router); + } + } +} +// [END compute_v1_generated_Routers_GetRouterStatus_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/AsyncInsert.java new file mode 100644 index 000000000000..a85c7e4641b1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRouterRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + InsertRouterRequest request = + InsertRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouterResource(Router.newBuilder().build()) + .build(); + ApiFuture future = routersClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..54cdd787202d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRouterRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + InsertRouterRequest request = + InsertRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouterResource(Router.newBuilder().build()) + .build(); + OperationFuture future = + routersClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/SyncInsert.java new file mode 100644 index 000000000000..5ce18f229b74 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Insert_sync] +import com.google.cloud.compute.v1.InsertRouterRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + InsertRouterRequest request = + InsertRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouterResource(Router.newBuilder().build()) + .build(); + Operation response = routersClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Routers_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/SyncInsertStringStringRouter.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/SyncInsertStringStringRouter.java new file mode 100644 index 000000000000..cc6503240575 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/insert/SyncInsertStringStringRouter.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Insert_StringStringRouter_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncInsertStringStringRouter { + + public static void main(String[] args) throws Exception { + syncInsertStringStringRouter(); + } + + public static void syncInsertStringStringRouter() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Router routerResource = Router.newBuilder().build(); + Operation response = routersClient.insertAsync(project, region, routerResource).get(); + } + } +} +// [END compute_v1_generated_Routers_Insert_StringStringRouter_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/AsyncList.java new file mode 100644 index 000000000000..0555a102987e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRoutersRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + ListRoutersRequest request = + ListRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = routersClient.listPagedCallable().futureCall(request); + // Do something. + for (Router element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/AsyncListPaged.java new file mode 100644 index 000000000000..3f976cc6ac97 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_List_Paged_async] +import com.google.cloud.compute.v1.ListRoutersRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RouterList; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + ListRoutersRequest request = + ListRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RouterList response = routersClient.listCallable().call(request); + for (Router element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Routers_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/SyncList.java new file mode 100644 index 000000000000..bc21b9a6f425 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_List_sync] +import com.google.cloud.compute.v1.ListRoutersRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + ListRoutersRequest request = + ListRoutersRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (Router element : routersClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/SyncListStringString.java new file mode 100644 index 000000000000..81b77997eaba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_List_StringString_sync] +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (Router element : routersClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routers_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/AsyncPatch.java new file mode 100644 index 000000000000..612d2c8f77e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchRouterRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + PatchRouterRequest request = + PatchRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .setRouterResource(Router.newBuilder().build()) + .build(); + ApiFuture future = routersClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..71b2b2fba03e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRouterRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + PatchRouterRequest request = + PatchRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .setRouterResource(Router.newBuilder().build()) + .build(); + OperationFuture future = + routersClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/SyncPatch.java new file mode 100644 index 000000000000..c23ba4d587e9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRouterRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + PatchRouterRequest request = + PatchRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .setRouterResource(Router.newBuilder().build()) + .build(); + Operation response = routersClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_Routers_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/SyncPatchStringStringStringRouter.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/SyncPatchStringStringStringRouter.java new file mode 100644 index 000000000000..545d811b64ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/patch/SyncPatchStringStringStringRouter.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Patch_StringStringStringRouter_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncPatchStringStringStringRouter { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringRouter(); + } + + public static void syncPatchStringStringStringRouter() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String router = "router-925132983"; + Router routerResource = Router.newBuilder().build(); + Operation response = routersClient.patchAsync(project, region, router, routerResource).get(); + } + } +} +// [END compute_v1_generated_Routers_Patch_StringStringStringRouter_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/AsyncPreview.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/AsyncPreview.java new file mode 100644 index 000000000000..af7833dcb3d1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/AsyncPreview.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Preview_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PreviewRouterRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersPreviewResponse; + +public class AsyncPreview { + + public static void main(String[] args) throws Exception { + asyncPreview(); + } + + public static void asyncPreview() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + PreviewRouterRequest request = + PreviewRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRouter("router-925132983") + .setRouterResource(Router.newBuilder().build()) + .build(); + ApiFuture future = + routersClient.previewCallable().futureCall(request); + // Do something. + RoutersPreviewResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Preview_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/SyncPreview.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/SyncPreview.java new file mode 100644 index 000000000000..72a6b98ca578 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/SyncPreview.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Preview_sync] +import com.google.cloud.compute.v1.PreviewRouterRequest; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersPreviewResponse; + +public class SyncPreview { + + public static void main(String[] args) throws Exception { + syncPreview(); + } + + public static void syncPreview() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + PreviewRouterRequest request = + PreviewRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRouter("router-925132983") + .setRouterResource(Router.newBuilder().build()) + .build(); + RoutersPreviewResponse response = routersClient.preview(request); + } + } +} +// [END compute_v1_generated_Routers_Preview_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/SyncPreviewStringStringStringRouter.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/SyncPreviewStringStringStringRouter.java new file mode 100644 index 000000000000..52603ef003f6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/preview/SyncPreviewStringStringStringRouter.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Preview_StringStringStringRouter_sync] +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.RoutersPreviewResponse; + +public class SyncPreviewStringStringStringRouter { + + public static void main(String[] args) throws Exception { + syncPreviewStringStringStringRouter(); + } + + public static void syncPreviewStringStringStringRouter() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String router = "router-925132983"; + Router routerResource = Router.newBuilder().build(); + RoutersPreviewResponse response = + routersClient.preview(project, region, router, routerResource); + } + } +} +// [END compute_v1_generated_Routers_Preview_StringStringStringRouter_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/AsyncUpdate.java new file mode 100644 index 000000000000..f98490c0ea05 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/AsyncUpdate.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.UpdateRouterRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + UpdateRouterRequest request = + UpdateRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .setRouterResource(Router.newBuilder().build()) + .build(); + ApiFuture future = routersClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..87ec9a27c0ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/AsyncUpdateLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.UpdateRouterRequest; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + UpdateRouterRequest request = + UpdateRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .setRouterResource(Router.newBuilder().build()) + .build(); + OperationFuture future = + routersClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routers_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/SyncUpdate.java new file mode 100644 index 000000000000..d1dce0dec67d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Update_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; +import com.google.cloud.compute.v1.UpdateRouterRequest; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + UpdateRouterRequest request = + UpdateRouterRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setRouter("router-925132983") + .setRouterResource(Router.newBuilder().build()) + .build(); + Operation response = routersClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_Routers_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/SyncUpdateStringStringStringRouter.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/SyncUpdateStringStringStringRouter.java new file mode 100644 index 000000000000..f1252b14e8f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routers/update/SyncUpdateStringStringStringRouter.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.compute.v1.samples; + +// [START compute_v1_generated_Routers_Update_StringStringStringRouter_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Router; +import com.google.cloud.compute.v1.RoutersClient; + +public class SyncUpdateStringStringStringRouter { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringStringRouter(); + } + + public static void syncUpdateStringStringStringRouter() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutersClient routersClient = RoutersClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String router = "router-925132983"; + Router routerResource = Router.newBuilder().build(); + Operation response = routersClient.updateAsync(project, region, router, routerResource).get(); + } + } +} +// [END compute_v1_generated_Routers_Update_StringStringStringRouter_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routerssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routerssettings/get/SyncGet.java new file mode 100644 index 000000000000..86be81addb25 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routerssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RoutersSettings_Get_sync] +import com.google.cloud.compute.v1.RoutersSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RoutersSettings.Builder routersSettingsBuilder = RoutersSettings.newBuilder(); + routersSettingsBuilder + .getSettings() + .setRetrySettings( + routersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RoutersSettings routersSettings = routersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RoutersSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b873eb32626a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.RoutesClient; +import com.google.cloud.compute.v1.RoutesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RoutesSettings routesSettings = + RoutesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RoutesClient routesClient = RoutesClient.create(routesSettings); + } +} +// [END compute_v1_generated_Routes_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7feee097983d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.RoutesClient; +import com.google.cloud.compute.v1.RoutesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RoutesSettings routesSettings = RoutesSettings.newBuilder().setEndpoint(myEndpoint).build(); + RoutesClient routesClient = RoutesClient.create(routesSettings); + } +} +// [END compute_v1_generated_Routes_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/AsyncDelete.java new file mode 100644 index 000000000000..a1ecaee13f52 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteRouteRequest; +import com.google.cloud.compute.v1.RoutesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + DeleteRouteRequest request = + DeleteRouteRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setRoute("route108704329") + .build(); + ApiFuture future = routesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routes_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..01af0bb9606e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteRouteRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RoutesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + DeleteRouteRequest request = + DeleteRouteRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setRoute("route108704329") + .build(); + OperationFuture future = + routesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routes_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/SyncDelete.java new file mode 100644 index 000000000000..11627bfab174 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Delete_sync] +import com.google.cloud.compute.v1.DeleteRouteRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RoutesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + DeleteRouteRequest request = + DeleteRouteRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setRoute("route108704329") + .build(); + Operation response = routesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Routes_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..26700464a7a8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RoutesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + String project = "project-309310695"; + String route = "route108704329"; + Operation response = routesClient.deleteAsync(project, route).get(); + } + } +} +// [END compute_v1_generated_Routes_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/AsyncGet.java new file mode 100644 index 000000000000..ee77612d5121 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRouteRequest; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + GetRouteRequest request = + GetRouteRequest.newBuilder() + .setProject("project-309310695") + .setRoute("route108704329") + .build(); + ApiFuture future = routesClient.getCallable().futureCall(request); + // Do something. + Route response = future.get(); + } + } +} +// [END compute_v1_generated_Routes_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/SyncGet.java new file mode 100644 index 000000000000..135d122040eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Get_sync] +import com.google.cloud.compute.v1.GetRouteRequest; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + GetRouteRequest request = + GetRouteRequest.newBuilder() + .setProject("project-309310695") + .setRoute("route108704329") + .build(); + Route response = routesClient.get(request); + } + } +} +// [END compute_v1_generated_Routes_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/SyncGetStringString.java new file mode 100644 index 000000000000..098a3496d0fe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Get_StringString_sync] +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + String project = "project-309310695"; + String route = "route108704329"; + Route response = routesClient.get(project, route); + } + } +} +// [END compute_v1_generated_Routes_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/AsyncInsert.java new file mode 100644 index 000000000000..471f16c0e3a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertRouteRequest; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + InsertRouteRequest request = + InsertRouteRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setRouteResource(Route.newBuilder().build()) + .build(); + ApiFuture future = routesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routes_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..2ae027a4bf58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertRouteRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + InsertRouteRequest request = + InsertRouteRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setRouteResource(Route.newBuilder().build()) + .build(); + OperationFuture future = + routesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Routes_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/SyncInsert.java new file mode 100644 index 000000000000..cad16380eaa2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Insert_sync] +import com.google.cloud.compute.v1.InsertRouteRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + InsertRouteRequest request = + InsertRouteRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setRouteResource(Route.newBuilder().build()) + .build(); + Operation response = routesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Routes_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/SyncInsertStringRoute.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/SyncInsertStringRoute.java new file mode 100644 index 000000000000..dcb9efaf0789 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/insert/SyncInsertStringRoute.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_Insert_StringRoute_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class SyncInsertStringRoute { + + public static void main(String[] args) throws Exception { + syncInsertStringRoute(); + } + + public static void syncInsertStringRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + String project = "project-309310695"; + Route routeResource = Route.newBuilder().build(); + Operation response = routesClient.insertAsync(project, routeResource).get(); + } + } +} +// [END compute_v1_generated_Routes_Insert_StringRoute_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/AsyncList.java new file mode 100644 index 000000000000..1c2a3580bbc0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routes_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListRoutesRequest; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + ListRoutesRequest request = + ListRoutesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = routesClient.listPagedCallable().futureCall(request); + // Do something. + for (Route element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routes_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/AsyncListPaged.java new file mode 100644 index 000000000000..0b86f5f8cc51 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Routes_List_Paged_async] +import com.google.cloud.compute.v1.ListRoutesRequest; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RouteList; +import com.google.cloud.compute.v1.RoutesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + ListRoutesRequest request = + ListRoutesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + RouteList response = routesClient.listCallable().call(request); + for (Route element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Routes_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/SyncList.java new file mode 100644 index 000000000000..e1a14fcb16c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_List_sync] +import com.google.cloud.compute.v1.ListRoutesRequest; +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + ListRoutesRequest request = + ListRoutesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Route element : routesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routes_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/SyncListString.java new file mode 100644 index 000000000000..88ee1cad3758 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routes/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Routes_List_String_sync] +import com.google.cloud.compute.v1.Route; +import com.google.cloud.compute.v1.RoutesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RoutesClient routesClient = RoutesClient.create()) { + String project = "project-309310695"; + for (Route element : routesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Routes_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routessettings/get/SyncGet.java new file mode 100644 index 000000000000..f6badcea4ce9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/routessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_RoutesSettings_Get_sync] +import com.google.cloud.compute.v1.RoutesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RoutesSettings.Builder routesSettingsBuilder = RoutesSettings.newBuilder(); + routesSettingsBuilder + .getSettings() + .setRetrySettings( + routesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RoutesSettings routesSettings = routesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RoutesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/AsyncAddRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/AsyncAddRule.java new file mode 100644 index 000000000000..20391534ebee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/AsyncAddRule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_AddRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; +import com.google.longrunning.Operation; + +public class AsyncAddRule { + + public static void main(String[] args) throws Exception { + asyncAddRule(); + } + + public static void asyncAddRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + AddRuleSecurityPolicyRequest request = + AddRuleSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyRuleResource(SecurityPolicyRule.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = securityPoliciesClient.addRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_AddRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/AsyncAddRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/AsyncAddRuleLRO.java new file mode 100644 index 000000000000..9a0d2ecc178c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/AsyncAddRuleLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_AddRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class AsyncAddRuleLRO { + + public static void main(String[] args) throws Exception { + asyncAddRuleLRO(); + } + + public static void asyncAddRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + AddRuleSecurityPolicyRequest request = + AddRuleSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyRuleResource(SecurityPolicyRule.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + securityPoliciesClient.addRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_AddRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/SyncAddRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/SyncAddRule.java new file mode 100644 index 000000000000..9807f8dacb2a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/SyncAddRule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_AddRule_sync] +import com.google.cloud.compute.v1.AddRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class SyncAddRule { + + public static void main(String[] args) throws Exception { + syncAddRule(); + } + + public static void syncAddRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + AddRuleSecurityPolicyRequest request = + AddRuleSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyRuleResource(SecurityPolicyRule.newBuilder().build()) + .setValidateOnly(true) + .build(); + Operation response = securityPoliciesClient.addRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_AddRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/SyncAddRuleStringStringSecuritypolicyrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/SyncAddRuleStringStringSecuritypolicyrule.java new file mode 100644 index 000000000000..5eea4a1d4674 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/addrule/SyncAddRuleStringStringSecuritypolicyrule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_AddRule_StringStringSecuritypolicyrule_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class SyncAddRuleStringStringSecuritypolicyrule { + + public static void main(String[] args) throws Exception { + syncAddRuleStringStringSecuritypolicyrule(); + } + + public static void syncAddRuleStringStringSecuritypolicyrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + String securityPolicy = "securityPolicy-788621166"; + SecurityPolicyRule securityPolicyRuleResource = SecurityPolicyRule.newBuilder().build(); + Operation response = + securityPoliciesClient + .addRuleAsync(project, securityPolicy, securityPolicyRuleResource) + .get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_AddRule_StringStringSecuritypolicyrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..eb660de26d95 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + AggregatedListSecurityPoliciesRequest request = + AggregatedListSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + securityPoliciesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SecurityPolicies_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..e2d09e0955c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest; +import com.google.cloud.compute.v1.SecurityPoliciesAggregatedList; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + AggregatedListSecurityPoliciesRequest request = + AggregatedListSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SecurityPoliciesAggregatedList response = + securityPoliciesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_SecurityPolicies_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..bdd8b6f05a94 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + AggregatedListSecurityPoliciesRequest request = + AggregatedListSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + securityPoliciesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SecurityPolicies_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..c82ceb2c3f32 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_AggregatedList_String_sync] +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + securityPoliciesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SecurityPolicies_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..fab85bfe5d08 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SecurityPoliciesSettings securityPoliciesSettings = + SecurityPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SecurityPoliciesClient securityPoliciesClient = + SecurityPoliciesClient.create(securityPoliciesSettings); + } +} +// [END compute_v1_generated_SecurityPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..371fcdced6e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SecurityPoliciesSettings securityPoliciesSettings = + SecurityPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + SecurityPoliciesClient securityPoliciesClient = + SecurityPoliciesClient.create(securityPoliciesSettings); + } +} +// [END compute_v1_generated_SecurityPolicies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/AsyncDelete.java new file mode 100644 index 000000000000..290f07736532 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + DeleteSecurityPolicyRequest request = + DeleteSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + ApiFuture future = securityPoliciesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..ca48ef1320fc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + DeleteSecurityPolicyRequest request = + DeleteSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + OperationFuture future = + securityPoliciesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/SyncDelete.java new file mode 100644 index 000000000000..f661a60da961 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Delete_sync] +import com.google.cloud.compute.v1.DeleteSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + DeleteSecurityPolicyRequest request = + DeleteSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + Operation response = securityPoliciesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..b1fd537a9878 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + String securityPolicy = "securityPolicy-788621166"; + Operation response = securityPoliciesClient.deleteAsync(project, securityPolicy).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/AsyncGet.java new file mode 100644 index 000000000000..5aa0ccbaaf4a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + GetSecurityPolicyRequest request = + GetSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + ApiFuture future = securityPoliciesClient.getCallable().futureCall(request); + // Do something. + SecurityPolicy response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/SyncGet.java new file mode 100644 index 000000000000..e3c07d1775e7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Get_sync] +import com.google.cloud.compute.v1.GetSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + GetSecurityPolicyRequest request = + GetSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + SecurityPolicy response = securityPoliciesClient.get(request); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/SyncGetStringString.java new file mode 100644 index 000000000000..a4807d73712b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Get_StringString_sync] +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + String securityPolicy = "securityPolicy-788621166"; + SecurityPolicy response = securityPoliciesClient.get(project, securityPolicy); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/AsyncGetRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/AsyncGetRule.java new file mode 100644 index 000000000000..5e2d4b872e75 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/AsyncGetRule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_GetRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class AsyncGetRule { + + public static void main(String[] args) throws Exception { + asyncGetRule(); + } + + public static void asyncGetRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + GetRuleSecurityPolicyRequest request = + GetRuleSecurityPolicyRequest.newBuilder() + .setPriority(-1165461084) + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + ApiFuture future = + securityPoliciesClient.getRuleCallable().futureCall(request); + // Do something. + SecurityPolicyRule response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_GetRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/SyncGetRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/SyncGetRule.java new file mode 100644 index 000000000000..75fc572b7aa9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/SyncGetRule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_GetRule_sync] +import com.google.cloud.compute.v1.GetRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class SyncGetRule { + + public static void main(String[] args) throws Exception { + syncGetRule(); + } + + public static void syncGetRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + GetRuleSecurityPolicyRequest request = + GetRuleSecurityPolicyRequest.newBuilder() + .setPriority(-1165461084) + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + SecurityPolicyRule response = securityPoliciesClient.getRule(request); + } + } +} +// [END compute_v1_generated_SecurityPolicies_GetRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/SyncGetRuleStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/SyncGetRuleStringString.java new file mode 100644 index 000000000000..881a09b40279 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/getrule/SyncGetRuleStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_GetRule_StringString_sync] +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class SyncGetRuleStringString { + + public static void main(String[] args) throws Exception { + syncGetRuleStringString(); + } + + public static void syncGetRuleStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + String securityPolicy = "securityPolicy-788621166"; + SecurityPolicyRule response = securityPoliciesClient.getRule(project, securityPolicy); + } + } +} +// [END compute_v1_generated_SecurityPolicies_GetRule_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/AsyncInsert.java new file mode 100644 index 000000000000..c108ca19be43 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + InsertSecurityPolicyRequest request = + InsertSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = securityPoliciesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..5d80e393e12a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + InsertSecurityPolicyRequest request = + InsertSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + securityPoliciesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/SyncInsert.java new file mode 100644 index 000000000000..77fa9ff94a20 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Insert_sync] +import com.google.cloud.compute.v1.InsertSecurityPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + InsertSecurityPolicyRequest request = + InsertSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .setValidateOnly(true) + .build(); + Operation response = securityPoliciesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/SyncInsertStringSecuritypolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/SyncInsertStringSecuritypolicy.java new file mode 100644 index 000000000000..385a8e8ad2c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/insert/SyncInsertStringSecuritypolicy.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Insert_StringSecuritypolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncInsertStringSecuritypolicy { + + public static void main(String[] args) throws Exception { + syncInsertStringSecuritypolicy(); + } + + public static void syncInsertStringSecuritypolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + SecurityPolicy securityPolicyResource = SecurityPolicy.newBuilder().build(); + Operation response = + securityPoliciesClient.insertAsync(project, securityPolicyResource).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Insert_StringSecuritypolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/AsyncList.java new file mode 100644 index 000000000000..de82563cd21a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListSecurityPoliciesRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + ListSecurityPoliciesRequest request = + ListSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + securityPoliciesClient.listPagedCallable().futureCall(request); + // Do something. + for (SecurityPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SecurityPolicies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/AsyncListPaged.java new file mode 100644 index 000000000000..0c6d8df77aad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_List_Paged_async] +import com.google.cloud.compute.v1.ListSecurityPoliciesRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; +import com.google.cloud.compute.v1.SecurityPolicyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + ListSecurityPoliciesRequest request = + ListSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SecurityPolicyList response = securityPoliciesClient.listCallable().call(request); + for (SecurityPolicy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_SecurityPolicies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/SyncList.java new file mode 100644 index 000000000000..17285aa3a5fb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_List_sync] +import com.google.cloud.compute.v1.ListSecurityPoliciesRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + ListSecurityPoliciesRequest request = + ListSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (SecurityPolicy element : securityPoliciesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SecurityPolicies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/SyncListString.java new file mode 100644 index 000000000000..746d4931c894 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_List_String_sync] +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + for (SecurityPolicy element : securityPoliciesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SecurityPolicies_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/AsyncListPreconfiguredExpressionSets.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/AsyncListPreconfiguredExpressionSets.java new file mode 100644 index 000000000000..4d2a7ff6f912 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/AsyncListPreconfiguredExpressionSets.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_ListPreconfiguredExpressionSets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse; + +public class AsyncListPreconfiguredExpressionSets { + + public static void main(String[] args) throws Exception { + asyncListPreconfiguredExpressionSets(); + } + + public static void asyncListPreconfiguredExpressionSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + ListPreconfiguredExpressionSetsSecurityPoliciesRequest request = + ListPreconfiguredExpressionSetsSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + securityPoliciesClient.listPreconfiguredExpressionSetsCallable().futureCall(request); + // Do something. + SecurityPoliciesListPreconfiguredExpressionSetsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_ListPreconfiguredExpressionSets_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/SyncListPreconfiguredExpressionSets.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/SyncListPreconfiguredExpressionSets.java new file mode 100644 index 000000000000..c6dbe4113a0a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/SyncListPreconfiguredExpressionSets.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_ListPreconfiguredExpressionSets_sync] +import com.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse; + +public class SyncListPreconfiguredExpressionSets { + + public static void main(String[] args) throws Exception { + syncListPreconfiguredExpressionSets(); + } + + public static void syncListPreconfiguredExpressionSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + ListPreconfiguredExpressionSetsSecurityPoliciesRequest request = + ListPreconfiguredExpressionSetsSecurityPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + SecurityPoliciesListPreconfiguredExpressionSetsResponse response = + securityPoliciesClient.listPreconfiguredExpressionSets(request); + } + } +} +// [END compute_v1_generated_SecurityPolicies_ListPreconfiguredExpressionSets_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/SyncListPreconfiguredExpressionSetsString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/SyncListPreconfiguredExpressionSetsString.java new file mode 100644 index 000000000000..443f177683fe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/listpreconfiguredexpressionsets/SyncListPreconfiguredExpressionSetsString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_ListPreconfiguredExpressionSets_String_sync] +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse; + +public class SyncListPreconfiguredExpressionSetsString { + + public static void main(String[] args) throws Exception { + syncListPreconfiguredExpressionSetsString(); + } + + public static void syncListPreconfiguredExpressionSetsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + SecurityPoliciesListPreconfiguredExpressionSetsResponse response = + securityPoliciesClient.listPreconfiguredExpressionSets(project); + } + } +} +// [END compute_v1_generated_SecurityPolicies_ListPreconfiguredExpressionSets_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/AsyncPatch.java new file mode 100644 index 000000000000..31a4ed2de90d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + PatchSecurityPolicyRequest request = + PatchSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .build(); + ApiFuture future = securityPoliciesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..08ee33a850ee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + PatchSecurityPolicyRequest request = + PatchSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .build(); + OperationFuture future = + securityPoliciesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/SyncPatch.java new file mode 100644 index 000000000000..3a4d08cd51a7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + PatchSecurityPolicyRequest request = + PatchSecurityPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyResource(SecurityPolicy.newBuilder().build()) + .build(); + Operation response = securityPoliciesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/SyncPatchStringStringSecuritypolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/SyncPatchStringStringSecuritypolicy.java new file mode 100644 index 000000000000..c8fd727d4253 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patch/SyncPatchStringStringSecuritypolicy.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_Patch_StringStringSecuritypolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicy; + +public class SyncPatchStringStringSecuritypolicy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringSecuritypolicy(); + } + + public static void syncPatchStringStringSecuritypolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + String securityPolicy = "securityPolicy-788621166"; + SecurityPolicy securityPolicyResource = SecurityPolicy.newBuilder().build(); + Operation response = + securityPoliciesClient.patchAsync(project, securityPolicy, securityPolicyResource).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_Patch_StringStringSecuritypolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/AsyncPatchRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/AsyncPatchRule.java new file mode 100644 index 000000000000..3e43057cb57f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/AsyncPatchRule.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_PatchRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; +import com.google.longrunning.Operation; + +public class AsyncPatchRule { + + public static void main(String[] args) throws Exception { + asyncPatchRule(); + } + + public static void asyncPatchRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + PatchRuleSecurityPolicyRequest request = + PatchRuleSecurityPolicyRequest.newBuilder() + .setPriority(-1165461084) + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyRuleResource(SecurityPolicyRule.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = securityPoliciesClient.patchRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_PatchRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/AsyncPatchRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/AsyncPatchRuleLRO.java new file mode 100644 index 000000000000..0540a3d84f44 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/AsyncPatchRuleLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_PatchRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class AsyncPatchRuleLRO { + + public static void main(String[] args) throws Exception { + asyncPatchRuleLRO(); + } + + public static void asyncPatchRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + PatchRuleSecurityPolicyRequest request = + PatchRuleSecurityPolicyRequest.newBuilder() + .setPriority(-1165461084) + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyRuleResource(SecurityPolicyRule.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + securityPoliciesClient.patchRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_PatchRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/SyncPatchRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/SyncPatchRule.java new file mode 100644 index 000000000000..a283219c5e01 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/SyncPatchRule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_PatchRule_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class SyncPatchRule { + + public static void main(String[] args) throws Exception { + syncPatchRule(); + } + + public static void syncPatchRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + PatchRuleSecurityPolicyRequest request = + PatchRuleSecurityPolicyRequest.newBuilder() + .setPriority(-1165461084) + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .setSecurityPolicyRuleResource(SecurityPolicyRule.newBuilder().build()) + .setValidateOnly(true) + .build(); + Operation response = securityPoliciesClient.patchRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_PatchRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/SyncPatchRuleStringStringSecuritypolicyrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/SyncPatchRuleStringStringSecuritypolicyrule.java new file mode 100644 index 000000000000..9759e0413f15 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/patchrule/SyncPatchRuleStringStringSecuritypolicyrule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_PatchRule_StringStringSecuritypolicyrule_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SecurityPolicyRule; + +public class SyncPatchRuleStringStringSecuritypolicyrule { + + public static void main(String[] args) throws Exception { + syncPatchRuleStringStringSecuritypolicyrule(); + } + + public static void syncPatchRuleStringStringSecuritypolicyrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + String securityPolicy = "securityPolicy-788621166"; + SecurityPolicyRule securityPolicyRuleResource = SecurityPolicyRule.newBuilder().build(); + Operation response = + securityPoliciesClient + .patchRuleAsync(project, securityPolicy, securityPolicyRuleResource) + .get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_PatchRule_StringStringSecuritypolicyrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/AsyncRemoveRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/AsyncRemoveRule.java new file mode 100644 index 000000000000..b899b6a8619b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/AsyncRemoveRule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_RemoveRule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncRemoveRule { + + public static void main(String[] args) throws Exception { + asyncRemoveRule(); + } + + public static void asyncRemoveRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + RemoveRuleSecurityPolicyRequest request = + RemoveRuleSecurityPolicyRequest.newBuilder() + .setPriority(-1165461084) + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + ApiFuture future = securityPoliciesClient.removeRuleCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_RemoveRule_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/AsyncRemoveRuleLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/AsyncRemoveRuleLRO.java new file mode 100644 index 000000000000..57ca74d752f2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/AsyncRemoveRuleLRO.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_RemoveRule_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; + +public class AsyncRemoveRuleLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveRuleLRO(); + } + + public static void asyncRemoveRuleLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + RemoveRuleSecurityPolicyRequest request = + RemoveRuleSecurityPolicyRequest.newBuilder() + .setPriority(-1165461084) + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + OperationFuture future = + securityPoliciesClient.removeRuleOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_RemoveRule_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/SyncRemoveRule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/SyncRemoveRule.java new file mode 100644 index 000000000000..ca459e098b3a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/SyncRemoveRule.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_RemoveRule_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; + +public class SyncRemoveRule { + + public static void main(String[] args) throws Exception { + syncRemoveRule(); + } + + public static void syncRemoveRule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + RemoveRuleSecurityPolicyRequest request = + RemoveRuleSecurityPolicyRequest.newBuilder() + .setPriority(-1165461084) + .setProject("project-309310695") + .setSecurityPolicy("securityPolicy-788621166") + .build(); + Operation response = securityPoliciesClient.removeRuleAsync(request).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_RemoveRule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/SyncRemoveRuleStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/SyncRemoveRuleStringString.java new file mode 100644 index 000000000000..32c1d6412a78 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/removerule/SyncRemoveRuleStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_RemoveRule_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; + +public class SyncRemoveRuleStringString { + + public static void main(String[] args) throws Exception { + syncRemoveRuleStringString(); + } + + public static void syncRemoveRuleStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + String securityPolicy = "securityPolicy-788621166"; + Operation response = securityPoliciesClient.removeRuleAsync(project, securityPolicy).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_RemoveRule_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..177938b00409 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/AsyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + SetLabelsSecurityPolicyRequest request = + SetLabelsSecurityPolicyRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = securityPoliciesClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..4eced6729328 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/AsyncSetLabelsLRO.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + SetLabelsSecurityPolicyRequest request = + SetLabelsSecurityPolicyRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + OperationFuture future = + securityPoliciesClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..8ad172125c0d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/SyncSetLabels.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_SetLabels_sync] +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; +import com.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + SetLabelsSecurityPolicyRequest request = + SetLabelsSecurityPolicyRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Operation response = securityPoliciesClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java new file mode 100644 index 000000000000..662fd1331866 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypolicies/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPolicies_SetLabels_StringStringGlobalsetlabelsrequest_sync] +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SecurityPoliciesClient; + +public class SyncSetLabelsStringStringGlobalsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringGlobalsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringGlobalsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetLabelsRequest globalSetLabelsRequestResource = + GlobalSetLabelsRequest.newBuilder().build(); + Operation response = + securityPoliciesClient + .setLabelsAsync(project, resource, globalSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_SecurityPolicies_SetLabels_StringStringGlobalsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypoliciessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypoliciessettings/get/SyncGet.java new file mode 100644 index 000000000000..6bcd1ce34194 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/securitypoliciessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_SecurityPoliciesSettings_Get_sync] +import com.google.cloud.compute.v1.SecurityPoliciesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SecurityPoliciesSettings.Builder securityPoliciesSettingsBuilder = + SecurityPoliciesSettings.newBuilder(); + securityPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + securityPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SecurityPoliciesSettings securityPoliciesSettings = securityPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SecurityPoliciesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..91aa61cdb5c4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.ServiceAttachmentsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + AggregatedListServiceAttachmentsRequest request = + AggregatedListServiceAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + serviceAttachmentsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ServiceAttachments_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..bba8c4cab1c2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest; +import com.google.cloud.compute.v1.ServiceAttachmentAggregatedList; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.ServiceAttachmentsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + AggregatedListServiceAttachmentsRequest request = + AggregatedListServiceAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ServiceAttachmentAggregatedList response = + serviceAttachmentsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_ServiceAttachments_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..834574c6969b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.ServiceAttachmentsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + AggregatedListServiceAttachmentsRequest request = + AggregatedListServiceAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + serviceAttachmentsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ServiceAttachments_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..e38f7b80ea0d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_AggregatedList_String_sync] +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.ServiceAttachmentsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + serviceAttachmentsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ServiceAttachments_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..e0e4b9d8496e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.ServiceAttachmentsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ServiceAttachmentsSettings serviceAttachmentsSettings = + ServiceAttachmentsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ServiceAttachmentsClient serviceAttachmentsClient = + ServiceAttachmentsClient.create(serviceAttachmentsSettings); + } +} +// [END compute_v1_generated_ServiceAttachments_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..6bd7dd230516 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.ServiceAttachmentsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ServiceAttachmentsSettings serviceAttachmentsSettings = + ServiceAttachmentsSettings.newBuilder().setEndpoint(myEndpoint).build(); + ServiceAttachmentsClient serviceAttachmentsClient = + ServiceAttachmentsClient.create(serviceAttachmentsSettings); + } +} +// [END compute_v1_generated_ServiceAttachments_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/AsyncDelete.java new file mode 100644 index 000000000000..c335872eddef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteServiceAttachmentRequest; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + DeleteServiceAttachmentRequest request = + DeleteServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachment("serviceAttachment-398467656") + .build(); + ApiFuture future = serviceAttachmentsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..e94766c19546 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteServiceAttachmentRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + DeleteServiceAttachmentRequest request = + DeleteServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachment("serviceAttachment-398467656") + .build(); + OperationFuture future = + serviceAttachmentsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/SyncDelete.java new file mode 100644 index 000000000000..917a19130120 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Delete_sync] +import com.google.cloud.compute.v1.DeleteServiceAttachmentRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + DeleteServiceAttachmentRequest request = + DeleteServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachment("serviceAttachment-398467656") + .build(); + Operation response = serviceAttachmentsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..b8baacb42c4e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String serviceAttachment = "serviceAttachment-398467656"; + Operation response = + serviceAttachmentsClient.deleteAsync(project, region, serviceAttachment).get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/AsyncGet.java new file mode 100644 index 000000000000..19d4814dd792 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetServiceAttachmentRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + GetServiceAttachmentRequest request = + GetServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setServiceAttachment("serviceAttachment-398467656") + .build(); + ApiFuture future = + serviceAttachmentsClient.getCallable().futureCall(request); + // Do something. + ServiceAttachment response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/SyncGet.java new file mode 100644 index 000000000000..ddbfd8c7364c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Get_sync] +import com.google.cloud.compute.v1.GetServiceAttachmentRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + GetServiceAttachmentRequest request = + GetServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setServiceAttachment("serviceAttachment-398467656") + .build(); + ServiceAttachment response = serviceAttachmentsClient.get(request); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..0f6ef901cb75 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Get_StringStringString_sync] +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String serviceAttachment = "serviceAttachment-398467656"; + ServiceAttachment response = serviceAttachmentsClient.get(project, region, serviceAttachment); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..f7472c5af3b9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicyServiceAttachmentRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + GetIamPolicyServiceAttachmentRequest request = + GetIamPolicyServiceAttachmentRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + ApiFuture future = + serviceAttachmentsClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..d2b948b9317e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicyServiceAttachmentRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + GetIamPolicyServiceAttachmentRequest request = + GetIamPolicyServiceAttachmentRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + Policy response = serviceAttachmentsClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_ServiceAttachments_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..4cb2fbf11b95 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + Policy response = serviceAttachmentsClient.getIamPolicy(project, region, resource); + } + } +} +// [END compute_v1_generated_ServiceAttachments_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/AsyncInsert.java new file mode 100644 index 000000000000..f754e050c8ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertServiceAttachmentRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + InsertServiceAttachmentRequest request = + InsertServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachmentResource(ServiceAttachment.newBuilder().build()) + .build(); + ApiFuture future = serviceAttachmentsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..14ce5c6cbca0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertServiceAttachmentRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + InsertServiceAttachmentRequest request = + InsertServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachmentResource(ServiceAttachment.newBuilder().build()) + .build(); + OperationFuture future = + serviceAttachmentsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/SyncInsert.java new file mode 100644 index 000000000000..8e99ccaae0a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Insert_sync] +import com.google.cloud.compute.v1.InsertServiceAttachmentRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + InsertServiceAttachmentRequest request = + InsertServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachmentResource(ServiceAttachment.newBuilder().build()) + .build(); + Operation response = serviceAttachmentsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/SyncInsertStringStringServiceattachment.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/SyncInsertStringStringServiceattachment.java new file mode 100644 index 000000000000..e6e17ea6896b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/insert/SyncInsertStringStringServiceattachment.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Insert_StringStringServiceattachment_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncInsertStringStringServiceattachment { + + public static void main(String[] args) throws Exception { + syncInsertStringStringServiceattachment(); + } + + public static void syncInsertStringStringServiceattachment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + ServiceAttachment serviceAttachmentResource = ServiceAttachment.newBuilder().build(); + Operation response = + serviceAttachmentsClient.insertAsync(project, region, serviceAttachmentResource).get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Insert_StringStringServiceattachment_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/AsyncList.java new file mode 100644 index 000000000000..43cc4d2635af --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListServiceAttachmentsRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + ListServiceAttachmentsRequest request = + ListServiceAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + serviceAttachmentsClient.listPagedCallable().futureCall(request); + // Do something. + for (ServiceAttachment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ServiceAttachments_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/AsyncListPaged.java new file mode 100644 index 000000000000..119ac8c3a49a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_List_Paged_async] +import com.google.cloud.compute.v1.ListServiceAttachmentsRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentList; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + ListServiceAttachmentsRequest request = + ListServiceAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ServiceAttachmentList response = serviceAttachmentsClient.listCallable().call(request); + for (ServiceAttachment element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_ServiceAttachments_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/SyncList.java new file mode 100644 index 000000000000..743136bc6ecb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_List_sync] +import com.google.cloud.compute.v1.ListServiceAttachmentsRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + ListServiceAttachmentsRequest request = + ListServiceAttachmentsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (ServiceAttachment element : serviceAttachmentsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ServiceAttachments_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/SyncListStringString.java new file mode 100644 index 000000000000..c316b0f0475a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_List_StringString_sync] +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (ServiceAttachment element : + serviceAttachmentsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ServiceAttachments_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/AsyncPatch.java new file mode 100644 index 000000000000..767df253b236 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/AsyncPatch.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchServiceAttachmentRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + PatchServiceAttachmentRequest request = + PatchServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachment("serviceAttachment-398467656") + .setServiceAttachmentResource(ServiceAttachment.newBuilder().build()) + .build(); + ApiFuture future = serviceAttachmentsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..24229d96d3df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/AsyncPatchLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchServiceAttachmentRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + PatchServiceAttachmentRequest request = + PatchServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachment("serviceAttachment-398467656") + .setServiceAttachmentResource(ServiceAttachment.newBuilder().build()) + .build(); + OperationFuture future = + serviceAttachmentsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/SyncPatch.java new file mode 100644 index 000000000000..61f3cfeebe0f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchServiceAttachmentRequest; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + PatchServiceAttachmentRequest request = + PatchServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setServiceAttachment("serviceAttachment-398467656") + .setServiceAttachmentResource(ServiceAttachment.newBuilder().build()) + .build(); + Operation response = serviceAttachmentsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/SyncPatchStringStringStringServiceattachment.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/SyncPatchStringStringStringServiceattachment.java new file mode 100644 index 000000000000..7a977653044c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/patch/SyncPatchStringStringStringServiceattachment.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_Patch_StringStringStringServiceattachment_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ServiceAttachment; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncPatchStringStringStringServiceattachment { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringServiceattachment(); + } + + public static void syncPatchStringStringStringServiceattachment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String serviceAttachment = "serviceAttachment-398467656"; + ServiceAttachment serviceAttachmentResource = ServiceAttachment.newBuilder().build(); + Operation response = + serviceAttachmentsClient + .patchAsync(project, region, serviceAttachment, serviceAttachmentResource) + .get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_Patch_StringStringStringServiceattachment_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..4c83f2c1164a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.SetIamPolicyServiceAttachmentRequest; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + SetIamPolicyServiceAttachmentRequest request = + SetIamPolicyServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = + serviceAttachmentsClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..ce36d9ab8008 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_SetIamPolicy_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.SetIamPolicyServiceAttachmentRequest; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + SetIamPolicyServiceAttachmentRequest request = + SetIamPolicyServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = serviceAttachmentsClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_ServiceAttachments_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java new file mode 100644 index 000000000000..be3286d9a6c2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; + +public class SyncSetIamPolicyStringStringStringRegionsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringRegionsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringRegionsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetPolicyRequest regionSetPolicyRequestResource = + RegionSetPolicyRequest.newBuilder().build(); + Policy response = + serviceAttachmentsClient.setIamPolicy( + project, region, resource, regionSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_ServiceAttachments_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..fbcad76e9f00 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.TestIamPermissionsServiceAttachmentRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + TestIamPermissionsServiceAttachmentRequest request = + TestIamPermissionsServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + serviceAttachmentsClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_ServiceAttachments_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..c2b3a0c7cae6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_TestIamPermissions_sync] +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.TestIamPermissionsServiceAttachmentRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + TestIamPermissionsServiceAttachmentRequest request = + TestIamPermissionsServiceAttachmentRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = serviceAttachmentsClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_ServiceAttachments_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..d953821291d1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachments/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachments_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.ServiceAttachmentsClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + serviceAttachmentsClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_ServiceAttachments_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachmentssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachmentssettings/get/SyncGet.java new file mode 100644 index 000000000000..8e3f19b3edcd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/serviceattachmentssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ServiceAttachmentsSettings_Get_sync] +import com.google.cloud.compute.v1.ServiceAttachmentsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ServiceAttachmentsSettings.Builder serviceAttachmentsSettingsBuilder = + ServiceAttachmentsSettings.newBuilder(); + serviceAttachmentsSettingsBuilder + .getSettings() + .setRetrySettings( + serviceAttachmentsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ServiceAttachmentsSettings serviceAttachmentsSettings = + serviceAttachmentsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ServiceAttachmentsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..1b34e97681cd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.cloud.compute.v1.SnapshotsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SnapshotsSettings snapshotsSettings = + SnapshotsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SnapshotsClient snapshotsClient = SnapshotsClient.create(snapshotsSettings); + } +} +// [END compute_v1_generated_Snapshots_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e9d39d2b987f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.cloud.compute.v1.SnapshotsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SnapshotsSettings snapshotsSettings = + SnapshotsSettings.newBuilder().setEndpoint(myEndpoint).build(); + SnapshotsClient snapshotsClient = SnapshotsClient.create(snapshotsSettings); + } +} +// [END compute_v1_generated_Snapshots_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/AsyncDelete.java new file mode 100644 index 000000000000..7b173824aace --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteSnapshotRequest; +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + DeleteSnapshotRequest request = + DeleteSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshot("snapshot284874180") + .build(); + ApiFuture future = snapshotsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..072a6b142ba6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteSnapshotRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + DeleteSnapshotRequest request = + DeleteSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshot("snapshot284874180") + .build(); + OperationFuture future = + snapshotsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/SyncDelete.java new file mode 100644 index 000000000000..ce1af57e91d9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Delete_sync] +import com.google.cloud.compute.v1.DeleteSnapshotRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + DeleteSnapshotRequest request = + DeleteSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshot("snapshot284874180") + .build(); + Operation response = snapshotsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Snapshots_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..f9c4ea08078c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + String project = "project-309310695"; + String snapshot = "snapshot284874180"; + Operation response = snapshotsClient.deleteAsync(project, snapshot).get(); + } + } +} +// [END compute_v1_generated_Snapshots_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/AsyncGet.java new file mode 100644 index 000000000000..b1b6dea5a15c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetSnapshotRequest; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + GetSnapshotRequest request = + GetSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setSnapshot("snapshot284874180") + .build(); + ApiFuture future = snapshotsClient.getCallable().futureCall(request); + // Do something. + Snapshot response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/SyncGet.java new file mode 100644 index 000000000000..f7c191a525e5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Get_sync] +import com.google.cloud.compute.v1.GetSnapshotRequest; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + GetSnapshotRequest request = + GetSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setSnapshot("snapshot284874180") + .build(); + Snapshot response = snapshotsClient.get(request); + } + } +} +// [END compute_v1_generated_Snapshots_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/SyncGetStringString.java new file mode 100644 index 000000000000..a47b48c2410e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Get_StringString_sync] +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + String project = "project-309310695"; + String snapshot = "snapshot284874180"; + Snapshot response = snapshotsClient.get(project, snapshot); + } + } +} +// [END compute_v1_generated_Snapshots_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..d470ac030483 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicySnapshotRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + GetIamPolicySnapshotRequest request = + GetIamPolicySnapshotRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = snapshotsClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..f99a94c033dc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/SyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicySnapshotRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + GetIamPolicySnapshotRequest request = + GetIamPolicySnapshotRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = snapshotsClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_Snapshots_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/SyncGetIamPolicyStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/SyncGetIamPolicyStringString.java new file mode 100644 index 000000000000..37e08bffe27f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/getiampolicy/SyncGetIamPolicyStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_GetIamPolicy_StringString_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncGetIamPolicyStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringString(); + } + + public static void syncGetIamPolicyStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + Policy response = snapshotsClient.getIamPolicy(project, resource); + } + } +} +// [END compute_v1_generated_Snapshots_GetIamPolicy_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/AsyncInsert.java new file mode 100644 index 000000000000..8e8bd27dfc1b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertSnapshotRequest; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + InsertSnapshotRequest request = + InsertSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .build(); + ApiFuture future = snapshotsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..ee83330cd8ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertSnapshotRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + InsertSnapshotRequest request = + InsertSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .build(); + OperationFuture future = + snapshotsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/SyncInsert.java new file mode 100644 index 000000000000..7ac2dada0d34 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Insert_sync] +import com.google.cloud.compute.v1.InsertSnapshotRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + InsertSnapshotRequest request = + InsertSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSnapshotResource(Snapshot.newBuilder().build()) + .build(); + Operation response = snapshotsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Snapshots_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/SyncInsertStringSnapshot.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/SyncInsertStringSnapshot.java new file mode 100644 index 000000000000..da976ee4e04f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/insert/SyncInsertStringSnapshot.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_Insert_StringSnapshot_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncInsertStringSnapshot { + + public static void main(String[] args) throws Exception { + syncInsertStringSnapshot(); + } + + public static void syncInsertStringSnapshot() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + String project = "project-309310695"; + Snapshot snapshotResource = Snapshot.newBuilder().build(); + Operation response = snapshotsClient.insertAsync(project, snapshotResource).get(); + } + } +} +// [END compute_v1_generated_Snapshots_Insert_StringSnapshot_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/AsyncList.java new file mode 100644 index 000000000000..14595dde17f8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListSnapshotsRequest; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + ListSnapshotsRequest request = + ListSnapshotsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = snapshotsClient.listPagedCallable().futureCall(request); + // Do something. + for (Snapshot element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Snapshots_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/AsyncListPaged.java new file mode 100644 index 000000000000..7bd38e6fa014 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_List_Paged_async] +import com.google.cloud.compute.v1.ListSnapshotsRequest; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotList; +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + ListSnapshotsRequest request = + ListSnapshotsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SnapshotList response = snapshotsClient.listCallable().call(request); + for (Snapshot element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Snapshots_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/SyncList.java new file mode 100644 index 000000000000..043550accb60 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_List_sync] +import com.google.cloud.compute.v1.ListSnapshotsRequest; +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + ListSnapshotsRequest request = + ListSnapshotsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Snapshot element : snapshotsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Snapshots_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/SyncListString.java new file mode 100644 index 000000000000..56639add475d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_List_String_sync] +import com.google.cloud.compute.v1.Snapshot; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + String project = "project-309310695"; + for (Snapshot element : snapshotsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Snapshots_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..567bffaa2413 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicySnapshotRequest; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + SetIamPolicySnapshotRequest request = + SetIamPolicySnapshotRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = snapshotsClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..082f7cea8ab7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_SetIamPolicy_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SetIamPolicySnapshotRequest; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + SetIamPolicySnapshotRequest request = + SetIamPolicySnapshotRequest.newBuilder() + .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Policy response = snapshotsClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_Snapshots_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.java new file mode 100644 index 000000000000..61ed7aed6dac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setiampolicy/SyncSetIamPolicyStringStringGlobalsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] +import com.google.cloud.compute.v1.GlobalSetPolicyRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncSetIamPolicyStringStringGlobalsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringGlobalsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringGlobalsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetPolicyRequest globalSetPolicyRequestResource = + GlobalSetPolicyRequest.newBuilder().build(); + Policy response = + snapshotsClient.setIamPolicy(project, resource, globalSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_Snapshots_SetIamPolicy_StringStringGlobalsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..e5b4de7a9f92 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/AsyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsSnapshotRequest; +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + SetLabelsSnapshotRequest request = + SetLabelsSnapshotRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + ApiFuture future = snapshotsClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..5c39ac69483c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/AsyncSetLabelsLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsSnapshotRequest; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + SetLabelsSnapshotRequest request = + SetLabelsSnapshotRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + OperationFuture future = + snapshotsClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..874e53080d71 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/SyncSetLabels.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_SetLabels_sync] +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetLabelsSnapshotRequest; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + SetLabelsSnapshotRequest request = + SetLabelsSnapshotRequest.newBuilder() + .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build()) + .setProject("project-309310695") + .setResource("resource-341064690") + .build(); + Operation response = snapshotsClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_Snapshots_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.java new file mode 100644 index 000000000000..32ad354028bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/setlabels/SyncSetLabelsStringStringGlobalsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_SetLabels_StringStringGlobalsetlabelsrequest_sync] +import com.google.cloud.compute.v1.GlobalSetLabelsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SnapshotsClient; + +public class SyncSetLabelsStringStringGlobalsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringGlobalsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringGlobalsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + GlobalSetLabelsRequest globalSetLabelsRequestResource = + GlobalSetLabelsRequest.newBuilder().build(); + Operation response = + snapshotsClient.setLabelsAsync(project, resource, globalSetLabelsRequestResource).get(); + } + } +} +// [END compute_v1_generated_Snapshots_SetLabels_StringStringGlobalsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..d2f71284e08e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/AsyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.cloud.compute.v1.TestIamPermissionsSnapshotRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + TestIamPermissionsSnapshotRequest request = + TestIamPermissionsSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + snapshotsClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Snapshots_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..f760e3d49c69 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_TestIamPermissions_sync] +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.cloud.compute.v1.TestIamPermissionsSnapshotRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + TestIamPermissionsSnapshotRequest request = + TestIamPermissionsSnapshotRequest.newBuilder() + .setProject("project-309310695") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = snapshotsClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_Snapshots_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..35b86f40b03c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshots/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Snapshots_TestIamPermissions_StringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.SnapshotsClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringTestpermissionsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SnapshotsClient snapshotsClient = SnapshotsClient.create()) { + String project = "project-309310695"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + snapshotsClient.testIamPermissions(project, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_Snapshots_TestIamPermissions_StringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshotssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshotssettings/get/SyncGet.java new file mode 100644 index 000000000000..67865844c2cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/snapshotssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SnapshotsSettings_Get_sync] +import com.google.cloud.compute.v1.SnapshotsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SnapshotsSettings.Builder snapshotsSettingsBuilder = SnapshotsSettings.newBuilder(); + snapshotsSettingsBuilder + .getSettings() + .setRetrySettings( + snapshotsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SnapshotsSettings snapshotsSettings = snapshotsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SnapshotsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..195c65aed117 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListSslCertificatesRequest; +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificatesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + AggregatedListSslCertificatesRequest request = + AggregatedListSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + sslCertificatesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslCertificates_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..a46a9fa32b16 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListSslCertificatesRequest; +import com.google.cloud.compute.v1.SslCertificateAggregatedList; +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificatesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + AggregatedListSslCertificatesRequest request = + AggregatedListSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SslCertificateAggregatedList response = + sslCertificatesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_SslCertificates_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..a9d00a9847da --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListSslCertificatesRequest; +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificatesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + AggregatedListSslCertificatesRequest request = + AggregatedListSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + sslCertificatesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslCertificates_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..679d59e6bf8a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_AggregatedList_String_sync] +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificatesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + sslCertificatesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslCertificates_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..06237d391402 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SslCertificatesSettings sslCertificatesSettings = + SslCertificatesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SslCertificatesClient sslCertificatesClient = + SslCertificatesClient.create(sslCertificatesSettings); + } +} +// [END compute_v1_generated_SslCertificates_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..8667166e9c78 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.cloud.compute.v1.SslCertificatesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SslCertificatesSettings sslCertificatesSettings = + SslCertificatesSettings.newBuilder().setEndpoint(myEndpoint).build(); + SslCertificatesClient sslCertificatesClient = + SslCertificatesClient.create(sslCertificatesSettings); + } +} +// [END compute_v1_generated_SslCertificates_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/AsyncDelete.java new file mode 100644 index 000000000000..9a1738ebbe62 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteSslCertificateRequest; +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + DeleteSslCertificateRequest request = + DeleteSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslCertificate("sslCertificate-1304941589") + .build(); + ApiFuture future = sslCertificatesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..d1118493548c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteSslCertificateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + DeleteSslCertificateRequest request = + DeleteSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslCertificate("sslCertificate-1304941589") + .build(); + OperationFuture future = + sslCertificatesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/SyncDelete.java new file mode 100644 index 000000000000..097bb3db3565 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Delete_sync] +import com.google.cloud.compute.v1.DeleteSslCertificateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + DeleteSslCertificateRequest request = + DeleteSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslCertificate("sslCertificate-1304941589") + .build(); + Operation response = sslCertificatesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..20c0434a54cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + String project = "project-309310695"; + String sslCertificate = "sslCertificate-1304941589"; + Operation response = sslCertificatesClient.deleteAsync(project, sslCertificate).get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/AsyncGet.java new file mode 100644 index 000000000000..aee46b731528 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetSslCertificateRequest; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + GetSslCertificateRequest request = + GetSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setSslCertificate("sslCertificate-1304941589") + .build(); + ApiFuture future = sslCertificatesClient.getCallable().futureCall(request); + // Do something. + SslCertificate response = future.get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/SyncGet.java new file mode 100644 index 000000000000..8e753a529121 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Get_sync] +import com.google.cloud.compute.v1.GetSslCertificateRequest; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + GetSslCertificateRequest request = + GetSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setSslCertificate("sslCertificate-1304941589") + .build(); + SslCertificate response = sslCertificatesClient.get(request); + } + } +} +// [END compute_v1_generated_SslCertificates_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/SyncGetStringString.java new file mode 100644 index 000000000000..a717e3f22003 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Get_StringString_sync] +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + String project = "project-309310695"; + String sslCertificate = "sslCertificate-1304941589"; + SslCertificate response = sslCertificatesClient.get(project, sslCertificate); + } + } +} +// [END compute_v1_generated_SslCertificates_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/AsyncInsert.java new file mode 100644 index 000000000000..8e3dfa3d58a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertSslCertificateRequest; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + InsertSslCertificateRequest request = + InsertSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslCertificateResource(SslCertificate.newBuilder().build()) + .build(); + ApiFuture future = sslCertificatesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..206d91578aef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertSslCertificateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + InsertSslCertificateRequest request = + InsertSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslCertificateResource(SslCertificate.newBuilder().build()) + .build(); + OperationFuture future = + sslCertificatesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/SyncInsert.java new file mode 100644 index 000000000000..239b086aefdc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Insert_sync] +import com.google.cloud.compute.v1.InsertSslCertificateRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + InsertSslCertificateRequest request = + InsertSslCertificateRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslCertificateResource(SslCertificate.newBuilder().build()) + .build(); + Operation response = sslCertificatesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/SyncInsertStringSslcertificate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/SyncInsertStringSslcertificate.java new file mode 100644 index 000000000000..c9f116066cd5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/insert/SyncInsertStringSslcertificate.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_Insert_StringSslcertificate_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class SyncInsertStringSslcertificate { + + public static void main(String[] args) throws Exception { + syncInsertStringSslcertificate(); + } + + public static void syncInsertStringSslcertificate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + String project = "project-309310695"; + SslCertificate sslCertificateResource = SslCertificate.newBuilder().build(); + Operation response = sslCertificatesClient.insertAsync(project, sslCertificateResource).get(); + } + } +} +// [END compute_v1_generated_SslCertificates_Insert_StringSslcertificate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/AsyncList.java new file mode 100644 index 000000000000..500f64ff9b95 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListSslCertificatesRequest; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + ListSslCertificatesRequest request = + ListSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + sslCertificatesClient.listPagedCallable().futureCall(request); + // Do something. + for (SslCertificate element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslCertificates_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/AsyncListPaged.java new file mode 100644 index 000000000000..d199f06fc965 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_List_Paged_async] +import com.google.cloud.compute.v1.ListSslCertificatesRequest; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificateList; +import com.google.cloud.compute.v1.SslCertificatesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + ListSslCertificatesRequest request = + ListSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SslCertificateList response = sslCertificatesClient.listCallable().call(request); + for (SslCertificate element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_SslCertificates_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/SyncList.java new file mode 100644 index 000000000000..25eb93aee35b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_List_sync] +import com.google.cloud.compute.v1.ListSslCertificatesRequest; +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + ListSslCertificatesRequest request = + ListSslCertificatesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (SslCertificate element : sslCertificatesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslCertificates_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/SyncListString.java new file mode 100644 index 000000000000..5f0854a5d03d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificates/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificates_List_String_sync] +import com.google.cloud.compute.v1.SslCertificate; +import com.google.cloud.compute.v1.SslCertificatesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslCertificatesClient sslCertificatesClient = SslCertificatesClient.create()) { + String project = "project-309310695"; + for (SslCertificate element : sslCertificatesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslCertificates_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificatessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificatessettings/get/SyncGet.java new file mode 100644 index 000000000000..b508bc387eab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslcertificatessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_SslCertificatesSettings_Get_sync] +import com.google.cloud.compute.v1.SslCertificatesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SslCertificatesSettings.Builder sslCertificatesSettingsBuilder = + SslCertificatesSettings.newBuilder(); + sslCertificatesSettingsBuilder + .getSettings() + .setRetrySettings( + sslCertificatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SslCertificatesSettings sslCertificatesSettings = sslCertificatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SslCertificatesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..21863fe75eac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListSslPoliciesRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + AggregatedListSslPoliciesRequest request = + AggregatedListSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + sslPoliciesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslPolicies_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..185de25cc487 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListSslPoliciesRequest; +import com.google.cloud.compute.v1.SslPoliciesAggregatedList; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + AggregatedListSslPoliciesRequest request = + AggregatedListSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SslPoliciesAggregatedList response = + sslPoliciesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_SslPolicies_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..0f71279230d5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListSslPoliciesRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + AggregatedListSslPoliciesRequest request = + AggregatedListSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + sslPoliciesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslPolicies_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..feb8a7798bd3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_AggregatedList_String_sync] +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + sslPoliciesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslPolicies_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..37d66cf1eb36 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SslPoliciesSettings sslPoliciesSettings = + SslPoliciesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create(sslPoliciesSettings); + } +} +// [END compute_v1_generated_SslPolicies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..c7de28c835a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SslPoliciesSettings sslPoliciesSettings = + SslPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); + SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create(sslPoliciesSettings); + } +} +// [END compute_v1_generated_SslPolicies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/AsyncDelete.java new file mode 100644 index 000000000000..beedbad9faf5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteSslPolicyRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + DeleteSslPolicyRequest request = + DeleteSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .build(); + ApiFuture future = sslPoliciesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..48d8b2b24610 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteSslPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPoliciesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + DeleteSslPolicyRequest request = + DeleteSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .build(); + OperationFuture future = + sslPoliciesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/SyncDelete.java new file mode 100644 index 000000000000..e7cb7b58c244 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Delete_sync] +import com.google.cloud.compute.v1.DeleteSslPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPoliciesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + DeleteSslPolicyRequest request = + DeleteSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .build(); + Operation response = sslPoliciesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..40a174ee3995 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPoliciesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + String project = "project-309310695"; + String sslPolicy = "sslPolicy618174046"; + Operation response = sslPoliciesClient.deleteAsync(project, sslPolicy).get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/AsyncGet.java new file mode 100644 index 000000000000..03d887c8257c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetSslPolicyRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + GetSslPolicyRequest request = + GetSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setSslPolicy("sslPolicy618174046") + .build(); + ApiFuture future = sslPoliciesClient.getCallable().futureCall(request); + // Do something. + SslPolicy response = future.get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/SyncGet.java new file mode 100644 index 000000000000..c1e0ad919dae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Get_sync] +import com.google.cloud.compute.v1.GetSslPolicyRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + GetSslPolicyRequest request = + GetSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setSslPolicy("sslPolicy618174046") + .build(); + SslPolicy response = sslPoliciesClient.get(request); + } + } +} +// [END compute_v1_generated_SslPolicies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/SyncGetStringString.java new file mode 100644 index 000000000000..04927492b54f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Get_StringString_sync] +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + String project = "project-309310695"; + String sslPolicy = "sslPolicy618174046"; + SslPolicy response = sslPoliciesClient.get(project, sslPolicy); + } + } +} +// [END compute_v1_generated_SslPolicies_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/AsyncInsert.java new file mode 100644 index 000000000000..67b8e28b4fed --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertSslPolicyRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + InsertSslPolicyRequest request = + InsertSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + ApiFuture future = sslPoliciesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..565062a9c435 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertSslPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + InsertSslPolicyRequest request = + InsertSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + OperationFuture future = + sslPoliciesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/SyncInsert.java new file mode 100644 index 000000000000..f8e83abe6481 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Insert_sync] +import com.google.cloud.compute.v1.InsertSslPolicyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + InsertSslPolicyRequest request = + InsertSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + Operation response = sslPoliciesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/SyncInsertStringSslpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/SyncInsertStringSslpolicy.java new file mode 100644 index 000000000000..4d646a01c48f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/insert/SyncInsertStringSslpolicy.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Insert_StringSslpolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncInsertStringSslpolicy { + + public static void main(String[] args) throws Exception { + syncInsertStringSslpolicy(); + } + + public static void syncInsertStringSslpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + String project = "project-309310695"; + SslPolicy sslPolicyResource = SslPolicy.newBuilder().build(); + Operation response = sslPoliciesClient.insertAsync(project, sslPolicyResource).get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Insert_StringSslpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/AsyncList.java new file mode 100644 index 000000000000..89a1ae835d8f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListSslPoliciesRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + ListSslPoliciesRequest request = + ListSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = sslPoliciesClient.listPagedCallable().futureCall(request); + // Do something. + for (SslPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslPolicies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/AsyncListPaged.java new file mode 100644 index 000000000000..37402f6a19c4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_List_Paged_async] +import com.google.cloud.compute.v1.ListSslPoliciesRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesList; +import com.google.cloud.compute.v1.SslPolicy; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + ListSslPoliciesRequest request = + ListSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SslPoliciesList response = sslPoliciesClient.listCallable().call(request); + for (SslPolicy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_SslPolicies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/SyncList.java new file mode 100644 index 000000000000..44a738a14e51 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_List_sync] +import com.google.cloud.compute.v1.ListSslPoliciesRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + ListSslPoliciesRequest request = + ListSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (SslPolicy element : sslPoliciesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslPolicies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/SyncListString.java new file mode 100644 index 000000000000..d4477527ee48 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_List_String_sync] +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + String project = "project-309310695"; + for (SslPolicy element : sslPoliciesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_SslPolicies_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/AsyncListAvailableFeatures.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/AsyncListAvailableFeatures.java new file mode 100644 index 000000000000..562a55b22b46 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/AsyncListAvailableFeatures.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_ListAvailableFeatures_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse; + +public class AsyncListAvailableFeatures { + + public static void main(String[] args) throws Exception { + asyncListAvailableFeatures(); + } + + public static void asyncListAvailableFeatures() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + ListAvailableFeaturesSslPoliciesRequest request = + ListAvailableFeaturesSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + sslPoliciesClient.listAvailableFeaturesCallable().futureCall(request); + // Do something. + SslPoliciesListAvailableFeaturesResponse response = future.get(); + } + } +} +// [END compute_v1_generated_SslPolicies_ListAvailableFeatures_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/SyncListAvailableFeatures.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/SyncListAvailableFeatures.java new file mode 100644 index 000000000000..22167c22908d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/SyncListAvailableFeatures.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_ListAvailableFeatures_sync] +import com.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse; + +public class SyncListAvailableFeatures { + + public static void main(String[] args) throws Exception { + syncListAvailableFeatures(); + } + + public static void syncListAvailableFeatures() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + ListAvailableFeaturesSslPoliciesRequest request = + ListAvailableFeaturesSslPoliciesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + SslPoliciesListAvailableFeaturesResponse response = + sslPoliciesClient.listAvailableFeatures(request); + } + } +} +// [END compute_v1_generated_SslPolicies_ListAvailableFeatures_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/SyncListAvailableFeaturesString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/SyncListAvailableFeaturesString.java new file mode 100644 index 000000000000..402368e96f8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/listavailablefeatures/SyncListAvailableFeaturesString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_ListAvailableFeatures_String_sync] +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse; + +public class SyncListAvailableFeaturesString { + + public static void main(String[] args) throws Exception { + syncListAvailableFeaturesString(); + } + + public static void syncListAvailableFeaturesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + String project = "project-309310695"; + SslPoliciesListAvailableFeaturesResponse response = + sslPoliciesClient.listAvailableFeatures(project); + } + } +} +// [END compute_v1_generated_SslPolicies_ListAvailableFeatures_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/AsyncPatch.java new file mode 100644 index 000000000000..96e5e2e9c24a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchSslPolicyRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + PatchSslPolicyRequest request = + PatchSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + ApiFuture future = sslPoliciesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..0930e2028d8f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchSslPolicyRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + PatchSslPolicyRequest request = + PatchSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + OperationFuture future = + sslPoliciesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/SyncPatch.java new file mode 100644 index 000000000000..f09eeaba5483 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchSslPolicyRequest; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + PatchSslPolicyRequest request = + PatchSslPolicyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicy("sslPolicy618174046") + .setSslPolicyResource(SslPolicy.newBuilder().build()) + .build(); + Operation response = sslPoliciesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/SyncPatchStringStringSslpolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/SyncPatchStringStringSslpolicy.java new file mode 100644 index 000000000000..0e11ba81d265 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpolicies/patch/SyncPatchStringStringSslpolicy.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.compute.v1.samples; + +// [START compute_v1_generated_SslPolicies_Patch_StringStringSslpolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPoliciesClient; +import com.google.cloud.compute.v1.SslPolicy; + +public class SyncPatchStringStringSslpolicy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringSslpolicy(); + } + + public static void syncPatchStringStringSslpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) { + String project = "project-309310695"; + String sslPolicy = "sslPolicy618174046"; + SslPolicy sslPolicyResource = SslPolicy.newBuilder().build(); + Operation response = + sslPoliciesClient.patchAsync(project, sslPolicy, sslPolicyResource).get(); + } + } +} +// [END compute_v1_generated_SslPolicies_Patch_StringStringSslpolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpoliciessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpoliciessettings/get/SyncGet.java new file mode 100644 index 000000000000..754f3a32af9d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/sslpoliciessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SslPoliciesSettings_Get_sync] +import com.google.cloud.compute.v1.SslPoliciesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SslPoliciesSettings.Builder sslPoliciesSettingsBuilder = SslPoliciesSettings.newBuilder(); + sslPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + sslPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SslPoliciesSettings sslPoliciesSettings = sslPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SslPoliciesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/acceleratortypesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/acceleratortypesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..19b191fd60b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/acceleratortypesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_AcceleratorTypesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.AcceleratorTypesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AcceleratorTypesStubSettings.Builder acceleratorTypesSettingsBuilder = + AcceleratorTypesStubSettings.newBuilder(); + acceleratorTypesSettingsBuilder + .getSettings() + .setRetrySettings( + acceleratorTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AcceleratorTypesStubSettings acceleratorTypesSettings = acceleratorTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_AcceleratorTypesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/addressesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/addressesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..d758bfa3ca2e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/addressesstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_AddressesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.AddressesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AddressesStubSettings.Builder addressesSettingsBuilder = AddressesStubSettings.newBuilder(); + addressesSettingsBuilder + .getSettings() + .setRetrySettings( + addressesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AddressesStubSettings addressesSettings = addressesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_AddressesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/autoscalersstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/autoscalersstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..b306c5ecebfd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/autoscalersstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_AutoscalersStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.AutoscalersStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AutoscalersStubSettings.Builder autoscalersSettingsBuilder = + AutoscalersStubSettings.newBuilder(); + autoscalersSettingsBuilder + .getSettings() + .setRetrySettings( + autoscalersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AutoscalersStubSettings autoscalersSettings = autoscalersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_AutoscalersStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/backendbucketsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/backendbucketsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..c9b074dd4a30 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/backendbucketsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_BackendBucketsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.BackendBucketsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BackendBucketsStubSettings.Builder backendBucketsSettingsBuilder = + BackendBucketsStubSettings.newBuilder(); + backendBucketsSettingsBuilder + .getSettings() + .setRetrySettings( + backendBucketsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BackendBucketsStubSettings backendBucketsSettings = backendBucketsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_BackendBucketsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/backendservicesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/backendservicesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..867b2d38b8b4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/backendservicesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_BackendServicesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.BackendServicesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + BackendServicesStubSettings.Builder backendServicesSettingsBuilder = + BackendServicesStubSettings.newBuilder(); + backendServicesSettingsBuilder + .getSettings() + .setRetrySettings( + backendServicesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BackendServicesStubSettings backendServicesSettings = backendServicesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_BackendServicesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/disksstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/disksstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..7e8aad3c395b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/disksstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_DisksStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.DisksStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DisksStubSettings.Builder disksSettingsBuilder = DisksStubSettings.newBuilder(); + disksSettingsBuilder + .getSettings() + .setRetrySettings( + disksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DisksStubSettings disksSettings = disksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_DisksStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/disktypesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/disktypesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..e85f01e9e9f8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/disktypesstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_DiskTypesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.DiskTypesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DiskTypesStubSettings.Builder diskTypesSettingsBuilder = DiskTypesStubSettings.newBuilder(); + diskTypesSettingsBuilder + .getSettings() + .setRetrySettings( + diskTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DiskTypesStubSettings diskTypesSettings = diskTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_DiskTypesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/externalvpngatewaysstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/externalvpngatewaysstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..dd7a92875dc5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/externalvpngatewaysstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_ExternalVpnGatewaysStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ExternalVpnGatewaysStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ExternalVpnGatewaysStubSettings.Builder externalVpnGatewaysSettingsBuilder = + ExternalVpnGatewaysStubSettings.newBuilder(); + externalVpnGatewaysSettingsBuilder + .getSettings() + .setRetrySettings( + externalVpnGatewaysSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ExternalVpnGatewaysStubSettings externalVpnGatewaysSettings = + externalVpnGatewaysSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ExternalVpnGatewaysStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/firewallpoliciesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/firewallpoliciesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..eebbad51bf07 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/firewallpoliciesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_FirewallPoliciesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.FirewallPoliciesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FirewallPoliciesStubSettings.Builder firewallPoliciesSettingsBuilder = + FirewallPoliciesStubSettings.newBuilder(); + firewallPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + firewallPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FirewallPoliciesStubSettings firewallPoliciesSettings = firewallPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_FirewallPoliciesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/firewallsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/firewallsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a0d98da964c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/firewallsstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_FirewallsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.FirewallsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + FirewallsStubSettings.Builder firewallsSettingsBuilder = FirewallsStubSettings.newBuilder(); + firewallsSettingsBuilder + .getSettings() + .setRetrySettings( + firewallsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FirewallsStubSettings firewallsSettings = firewallsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_FirewallsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/forwardingrulesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/forwardingrulesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..6937f13fb822 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/forwardingrulesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_ForwardingRulesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ForwardingRulesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ForwardingRulesStubSettings.Builder forwardingRulesSettingsBuilder = + ForwardingRulesStubSettings.newBuilder(); + forwardingRulesSettingsBuilder + .getSettings() + .setRetrySettings( + forwardingRulesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ForwardingRulesStubSettings forwardingRulesSettings = forwardingRulesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ForwardingRulesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globaladdressesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globaladdressesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..2947925318df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globaladdressesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_GlobalAddressesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.GlobalAddressesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalAddressesStubSettings.Builder globalAddressesSettingsBuilder = + GlobalAddressesStubSettings.newBuilder(); + globalAddressesSettingsBuilder + .getSettings() + .setRetrySettings( + globalAddressesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalAddressesStubSettings globalAddressesSettings = globalAddressesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalAddressesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalforwardingrulesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalforwardingrulesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..e7457d91502e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalforwardingrulesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_GlobalForwardingRulesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.GlobalForwardingRulesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalForwardingRulesStubSettings.Builder globalForwardingRulesSettingsBuilder = + GlobalForwardingRulesStubSettings.newBuilder(); + globalForwardingRulesSettingsBuilder + .getSettings() + .setRetrySettings( + globalForwardingRulesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalForwardingRulesStubSettings globalForwardingRulesSettings = + globalForwardingRulesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalForwardingRulesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalnetworkendpointgroupsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalnetworkendpointgroupsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..b3bae70704ab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalnetworkendpointgroupsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_GlobalNetworkEndpointGroupsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.GlobalNetworkEndpointGroupsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalNetworkEndpointGroupsStubSettings.Builder globalNetworkEndpointGroupsSettingsBuilder = + GlobalNetworkEndpointGroupsStubSettings.newBuilder(); + globalNetworkEndpointGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + globalNetworkEndpointGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalNetworkEndpointGroupsStubSettings globalNetworkEndpointGroupsSettings = + globalNetworkEndpointGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalNetworkEndpointGroupsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globaloperationsstubsettings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globaloperationsstubsettings/delete/SyncDelete.java new file mode 100644 index 000000000000..e44d1e3934ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globaloperationsstubsettings/delete/SyncDelete.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.compute.v1.stub.samples; + +// [START compute_v1_generated_GlobalOperationsStubSettings_Delete_sync] +import com.google.cloud.compute.v1.stub.GlobalOperationsStubSettings; +import java.time.Duration; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalOperationsStubSettings.Builder globalOperationsSettingsBuilder = + GlobalOperationsStubSettings.newBuilder(); + globalOperationsSettingsBuilder + .deleteSettings() + .setRetrySettings( + globalOperationsSettingsBuilder + .deleteSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalOperationsStubSettings globalOperationsSettings = globalOperationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalOperationsStubSettings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalorganizationoperationsstubsettings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalorganizationoperationsstubsettings/delete/SyncDelete.java new file mode 100644 index 000000000000..dba4a4580f49 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalorganizationoperationsstubsettings/delete/SyncDelete.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.compute.v1.stub.samples; + +// [START compute_v1_generated_GlobalOrganizationOperationsStubSettings_Delete_sync] +import com.google.cloud.compute.v1.stub.GlobalOrganizationOperationsStubSettings; +import java.time.Duration; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalOrganizationOperationsStubSettings.Builder globalOrganizationOperationsSettingsBuilder = + GlobalOrganizationOperationsStubSettings.newBuilder(); + globalOrganizationOperationsSettingsBuilder + .deleteSettings() + .setRetrySettings( + globalOrganizationOperationsSettingsBuilder + .deleteSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalOrganizationOperationsStubSettings globalOrganizationOperationsSettings = + globalOrganizationOperationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalOrganizationOperationsStubSettings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalpublicdelegatedprefixesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalpublicdelegatedprefixesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..6a653691c458 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/globalpublicdelegatedprefixesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_GlobalPublicDelegatedPrefixesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.GlobalPublicDelegatedPrefixesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GlobalPublicDelegatedPrefixesStubSettings.Builder globalPublicDelegatedPrefixesSettingsBuilder = + GlobalPublicDelegatedPrefixesStubSettings.newBuilder(); + globalPublicDelegatedPrefixesSettingsBuilder + .getSettings() + .setRetrySettings( + globalPublicDelegatedPrefixesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GlobalPublicDelegatedPrefixesStubSettings globalPublicDelegatedPrefixesSettings = + globalPublicDelegatedPrefixesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_GlobalPublicDelegatedPrefixesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/healthchecksstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/healthchecksstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a2f1ef950494 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/healthchecksstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_HealthChecksStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.HealthChecksStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthChecksStubSettings.Builder healthChecksSettingsBuilder = + HealthChecksStubSettings.newBuilder(); + healthChecksSettingsBuilder + .getSettings() + .setRetrySettings( + healthChecksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + HealthChecksStubSettings healthChecksSettings = healthChecksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_HealthChecksStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/imagefamilyviewsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/imagefamilyviewsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..d9a993f590fc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/imagefamilyviewsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_ImageFamilyViewsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ImageFamilyViewsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageFamilyViewsStubSettings.Builder imageFamilyViewsSettingsBuilder = + ImageFamilyViewsStubSettings.newBuilder(); + imageFamilyViewsSettingsBuilder + .getSettings() + .setRetrySettings( + imageFamilyViewsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageFamilyViewsStubSettings imageFamilyViewsSettings = imageFamilyViewsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ImageFamilyViewsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/imagesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/imagesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..9b8bbffed8be --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/imagesstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_ImagesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ImagesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImagesStubSettings.Builder imagesSettingsBuilder = ImagesStubSettings.newBuilder(); + imagesSettingsBuilder + .getSettings() + .setRetrySettings( + imagesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImagesStubSettings imagesSettings = imagesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ImagesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancegroupmanagersstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancegroupmanagersstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..c3b091ac4ea0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancegroupmanagersstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_InstanceGroupManagersStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.InstanceGroupManagersStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceGroupManagersStubSettings.Builder instanceGroupManagersSettingsBuilder = + InstanceGroupManagersStubSettings.newBuilder(); + instanceGroupManagersSettingsBuilder + .getSettings() + .setRetrySettings( + instanceGroupManagersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InstanceGroupManagersStubSettings instanceGroupManagersSettings = + instanceGroupManagersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InstanceGroupManagersStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancegroupsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancegroupsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..7c9b592fa58b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancegroupsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_InstanceGroupsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.InstanceGroupsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceGroupsStubSettings.Builder instanceGroupsSettingsBuilder = + InstanceGroupsStubSettings.newBuilder(); + instanceGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + instanceGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InstanceGroupsStubSettings instanceGroupsSettings = instanceGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InstanceGroupsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..7c7359c82419 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancesstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_InstancesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.InstancesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstancesStubSettings.Builder instancesSettingsBuilder = InstancesStubSettings.newBuilder(); + instancesSettingsBuilder + .getSettings() + .setRetrySettings( + instancesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InstancesStubSettings instancesSettings = instancesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InstancesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancetemplatesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancetemplatesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..4220a9daac53 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/instancetemplatesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_InstanceTemplatesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.InstanceTemplatesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InstanceTemplatesStubSettings.Builder instanceTemplatesSettingsBuilder = + InstanceTemplatesStubSettings.newBuilder(); + instanceTemplatesSettingsBuilder + .getSettings() + .setRetrySettings( + instanceTemplatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InstanceTemplatesStubSettings instanceTemplatesSettings = + instanceTemplatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InstanceTemplatesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectattachmentsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectattachmentsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..ab30f1caf613 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectattachmentsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_InterconnectAttachmentsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.InterconnectAttachmentsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectAttachmentsStubSettings.Builder interconnectAttachmentsSettingsBuilder = + InterconnectAttachmentsStubSettings.newBuilder(); + interconnectAttachmentsSettingsBuilder + .getSettings() + .setRetrySettings( + interconnectAttachmentsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InterconnectAttachmentsStubSettings interconnectAttachmentsSettings = + interconnectAttachmentsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InterconnectAttachmentsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectlocationsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectlocationsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..0a358bd77f9e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectlocationsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_InterconnectLocationsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.InterconnectLocationsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectLocationsStubSettings.Builder interconnectLocationsSettingsBuilder = + InterconnectLocationsStubSettings.newBuilder(); + interconnectLocationsSettingsBuilder + .getSettings() + .setRetrySettings( + interconnectLocationsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InterconnectLocationsStubSettings interconnectLocationsSettings = + interconnectLocationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InterconnectLocationsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..0a1b3dd4c504 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/interconnectsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_InterconnectsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.InterconnectsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + InterconnectsStubSettings.Builder interconnectsSettingsBuilder = + InterconnectsStubSettings.newBuilder(); + interconnectsSettingsBuilder + .getSettings() + .setRetrySettings( + interconnectsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + InterconnectsStubSettings interconnectsSettings = interconnectsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_InterconnectsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/licensecodesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/licensecodesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..f940cfd35f16 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/licensecodesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_LicenseCodesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.LicenseCodesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicenseCodesStubSettings.Builder licenseCodesSettingsBuilder = + LicenseCodesStubSettings.newBuilder(); + licenseCodesSettingsBuilder + .getSettings() + .setRetrySettings( + licenseCodesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LicenseCodesStubSettings licenseCodesSettings = licenseCodesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_LicenseCodesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/licensesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/licensesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..0f7f48b49c0d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/licensesstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_LicensesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.LicensesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicensesStubSettings.Builder licensesSettingsBuilder = LicensesStubSettings.newBuilder(); + licensesSettingsBuilder + .getSettings() + .setRetrySettings( + licensesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + LicensesStubSettings licensesSettings = licensesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_LicensesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/machineimagesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/machineimagesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..b02792bb94f9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/machineimagesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_MachineImagesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.MachineImagesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MachineImagesStubSettings.Builder machineImagesSettingsBuilder = + MachineImagesStubSettings.newBuilder(); + machineImagesSettingsBuilder + .getSettings() + .setRetrySettings( + machineImagesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + MachineImagesStubSettings machineImagesSettings = machineImagesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_MachineImagesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/machinetypesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/machinetypesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..47ac81d62871 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/machinetypesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_MachineTypesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.MachineTypesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + MachineTypesStubSettings.Builder machineTypesSettingsBuilder = + MachineTypesStubSettings.newBuilder(); + machineTypesSettingsBuilder + .getSettings() + .setRetrySettings( + machineTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + MachineTypesStubSettings machineTypesSettings = machineTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_MachineTypesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkattachmentsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkattachmentsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..6de7999eaf65 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkattachmentsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_NetworkAttachmentsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.NetworkAttachmentsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkAttachmentsStubSettings.Builder networkAttachmentsSettingsBuilder = + NetworkAttachmentsStubSettings.newBuilder(); + networkAttachmentsSettingsBuilder + .getSettings() + .setRetrySettings( + networkAttachmentsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworkAttachmentsStubSettings networkAttachmentsSettings = + networkAttachmentsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworkAttachmentsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkedgesecurityservicesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkedgesecurityservicesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..9a4135e82b92 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkedgesecurityservicesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_NetworkEdgeSecurityServicesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.NetworkEdgeSecurityServicesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkEdgeSecurityServicesStubSettings.Builder networkEdgeSecurityServicesSettingsBuilder = + NetworkEdgeSecurityServicesStubSettings.newBuilder(); + networkEdgeSecurityServicesSettingsBuilder + .getSettings() + .setRetrySettings( + networkEdgeSecurityServicesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworkEdgeSecurityServicesStubSettings networkEdgeSecurityServicesSettings = + networkEdgeSecurityServicesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworkEdgeSecurityServicesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkendpointgroupsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkendpointgroupsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..42b56bb36afd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkendpointgroupsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_NetworkEndpointGroupsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.NetworkEndpointGroupsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkEndpointGroupsStubSettings.Builder networkEndpointGroupsSettingsBuilder = + NetworkEndpointGroupsStubSettings.newBuilder(); + networkEndpointGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + networkEndpointGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworkEndpointGroupsStubSettings networkEndpointGroupsSettings = + networkEndpointGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworkEndpointGroupsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkfirewallpoliciesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkfirewallpoliciesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..0c9a740f5ebf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networkfirewallpoliciesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_NetworkFirewallPoliciesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.NetworkFirewallPoliciesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworkFirewallPoliciesStubSettings.Builder networkFirewallPoliciesSettingsBuilder = + NetworkFirewallPoliciesStubSettings.newBuilder(); + networkFirewallPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + networkFirewallPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworkFirewallPoliciesStubSettings networkFirewallPoliciesSettings = + networkFirewallPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworkFirewallPoliciesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networksstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networksstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..c65a9652187b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/networksstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_NetworksStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.NetworksStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NetworksStubSettings.Builder networksSettingsBuilder = NetworksStubSettings.newBuilder(); + networksSettingsBuilder + .getSettings() + .setRetrySettings( + networksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NetworksStubSettings networksSettings = networksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NetworksStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodegroupsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodegroupsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..e902557849f9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodegroupsstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_NodeGroupsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.NodeGroupsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeGroupsStubSettings.Builder nodeGroupsSettingsBuilder = NodeGroupsStubSettings.newBuilder(); + nodeGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + nodeGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NodeGroupsStubSettings nodeGroupsSettings = nodeGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NodeGroupsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodetemplatesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodetemplatesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..54704624da0e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodetemplatesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_NodeTemplatesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.NodeTemplatesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeTemplatesStubSettings.Builder nodeTemplatesSettingsBuilder = + NodeTemplatesStubSettings.newBuilder(); + nodeTemplatesSettingsBuilder + .getSettings() + .setRetrySettings( + nodeTemplatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NodeTemplatesStubSettings nodeTemplatesSettings = nodeTemplatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NodeTemplatesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodetypesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodetypesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..5bd2ab18d110 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/nodetypesstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_NodeTypesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.NodeTypesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NodeTypesStubSettings.Builder nodeTypesSettingsBuilder = NodeTypesStubSettings.newBuilder(); + nodeTypesSettingsBuilder + .getSettings() + .setRetrySettings( + nodeTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NodeTypesStubSettings nodeTypesSettings = nodeTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_NodeTypesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/packetmirroringsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/packetmirroringsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..d2ff56a6e3d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/packetmirroringsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_PacketMirroringsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.PacketMirroringsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PacketMirroringsStubSettings.Builder packetMirroringsSettingsBuilder = + PacketMirroringsStubSettings.newBuilder(); + packetMirroringsSettingsBuilder + .getSettings() + .setRetrySettings( + packetMirroringsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PacketMirroringsStubSettings packetMirroringsSettings = packetMirroringsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_PacketMirroringsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/projectsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/projectsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..2e2b2242444a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/projectsstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_ProjectsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ProjectsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProjectsStubSettings.Builder projectsSettingsBuilder = ProjectsStubSettings.newBuilder(); + projectsSettingsBuilder + .getSettings() + .setRetrySettings( + projectsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProjectsStubSettings projectsSettings = projectsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ProjectsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/publicadvertisedprefixesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/publicadvertisedprefixesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..38052539862c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/publicadvertisedprefixesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_PublicAdvertisedPrefixesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.PublicAdvertisedPrefixesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PublicAdvertisedPrefixesStubSettings.Builder publicAdvertisedPrefixesSettingsBuilder = + PublicAdvertisedPrefixesStubSettings.newBuilder(); + publicAdvertisedPrefixesSettingsBuilder + .getSettings() + .setRetrySettings( + publicAdvertisedPrefixesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PublicAdvertisedPrefixesStubSettings publicAdvertisedPrefixesSettings = + publicAdvertisedPrefixesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_PublicAdvertisedPrefixesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/publicdelegatedprefixesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/publicdelegatedprefixesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..5b9edff78fac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/publicdelegatedprefixesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_PublicDelegatedPrefixesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.PublicDelegatedPrefixesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PublicDelegatedPrefixesStubSettings.Builder publicDelegatedPrefixesSettingsBuilder = + PublicDelegatedPrefixesStubSettings.newBuilder(); + publicDelegatedPrefixesSettingsBuilder + .getSettings() + .setRetrySettings( + publicDelegatedPrefixesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PublicDelegatedPrefixesStubSettings publicDelegatedPrefixesSettings = + publicDelegatedPrefixesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_PublicDelegatedPrefixesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionautoscalersstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionautoscalersstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..9c4fec008b3d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionautoscalersstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionAutoscalersStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionAutoscalersStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionAutoscalersStubSettings.Builder regionAutoscalersSettingsBuilder = + RegionAutoscalersStubSettings.newBuilder(); + regionAutoscalersSettingsBuilder + .getSettings() + .setRetrySettings( + regionAutoscalersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionAutoscalersStubSettings regionAutoscalersSettings = + regionAutoscalersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionAutoscalersStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionbackendservicesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionbackendservicesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..b54d086c0868 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionbackendservicesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionBackendServicesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionBackendServicesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionBackendServicesStubSettings.Builder regionBackendServicesSettingsBuilder = + RegionBackendServicesStubSettings.newBuilder(); + regionBackendServicesSettingsBuilder + .getSettings() + .setRetrySettings( + regionBackendServicesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionBackendServicesStubSettings regionBackendServicesSettings = + regionBackendServicesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionBackendServicesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioncommitmentsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioncommitmentsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..900ea8debd63 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioncommitmentsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionCommitmentsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionCommitmentsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionCommitmentsStubSettings.Builder regionCommitmentsSettingsBuilder = + RegionCommitmentsStubSettings.newBuilder(); + regionCommitmentsSettingsBuilder + .getSettings() + .setRetrySettings( + regionCommitmentsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionCommitmentsStubSettings regionCommitmentsSettings = + regionCommitmentsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionCommitmentsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiondisksstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiondisksstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a5628ac4fcc5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiondisksstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionDisksStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionDisksStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionDisksStubSettings.Builder regionDisksSettingsBuilder = + RegionDisksStubSettings.newBuilder(); + regionDisksSettingsBuilder + .getSettings() + .setRetrySettings( + regionDisksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionDisksStubSettings regionDisksSettings = regionDisksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionDisksStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiondisktypesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiondisktypesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..86152e647c84 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiondisktypesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionDiskTypesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionDiskTypesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionDiskTypesStubSettings.Builder regionDiskTypesSettingsBuilder = + RegionDiskTypesStubSettings.newBuilder(); + regionDiskTypesSettingsBuilder + .getSettings() + .setRetrySettings( + regionDiskTypesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionDiskTypesStubSettings regionDiskTypesSettings = regionDiskTypesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionDiskTypesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionhealthcheckservicesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionhealthcheckservicesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..c2e347f8c55d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionhealthcheckservicesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionHealthCheckServicesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionHealthCheckServicesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionHealthCheckServicesStubSettings.Builder regionHealthCheckServicesSettingsBuilder = + RegionHealthCheckServicesStubSettings.newBuilder(); + regionHealthCheckServicesSettingsBuilder + .getSettings() + .setRetrySettings( + regionHealthCheckServicesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionHealthCheckServicesStubSettings regionHealthCheckServicesSettings = + regionHealthCheckServicesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionHealthCheckServicesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionhealthchecksstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionhealthchecksstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..3e674ae1dfe8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionhealthchecksstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionHealthChecksStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionHealthChecksStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionHealthChecksStubSettings.Builder regionHealthChecksSettingsBuilder = + RegionHealthChecksStubSettings.newBuilder(); + regionHealthChecksSettingsBuilder + .getSettings() + .setRetrySettings( + regionHealthChecksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionHealthChecksStubSettings regionHealthChecksSettings = + regionHealthChecksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionHealthChecksStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancegroupmanagersstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancegroupmanagersstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..83e5cbb118e3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancegroupmanagersstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionInstanceGroupManagersStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionInstanceGroupManagersStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceGroupManagersStubSettings.Builder regionInstanceGroupManagersSettingsBuilder = + RegionInstanceGroupManagersStubSettings.newBuilder(); + regionInstanceGroupManagersSettingsBuilder + .getSettings() + .setRetrySettings( + regionInstanceGroupManagersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionInstanceGroupManagersStubSettings regionInstanceGroupManagersSettings = + regionInstanceGroupManagersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionInstanceGroupManagersStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancegroupsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancegroupsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..85cbf63f86d2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancegroupsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionInstanceGroupsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionInstanceGroupsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceGroupsStubSettings.Builder regionInstanceGroupsSettingsBuilder = + RegionInstanceGroupsStubSettings.newBuilder(); + regionInstanceGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + regionInstanceGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionInstanceGroupsStubSettings regionInstanceGroupsSettings = + regionInstanceGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionInstanceGroupsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancesstubsettings/bulkinsert/SyncBulkInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancesstubsettings/bulkinsert/SyncBulkInsert.java new file mode 100644 index 000000000000..6152f35c15a7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancesstubsettings/bulkinsert/SyncBulkInsert.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionInstancesStubSettings_BulkInsert_sync] +import com.google.cloud.compute.v1.stub.RegionInstancesStubSettings; +import java.time.Duration; + +public class SyncBulkInsert { + + public static void main(String[] args) throws Exception { + syncBulkInsert(); + } + + public static void syncBulkInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstancesStubSettings.Builder regionInstancesSettingsBuilder = + RegionInstancesStubSettings.newBuilder(); + regionInstancesSettingsBuilder + .bulkInsertSettings() + .setRetrySettings( + regionInstancesSettingsBuilder + .bulkInsertSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionInstancesStubSettings regionInstancesSettings = regionInstancesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionInstancesStubSettings_BulkInsert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancetemplatesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancetemplatesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..3e083672ae18 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regioninstancetemplatesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionInstanceTemplatesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionInstanceTemplatesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionInstanceTemplatesStubSettings.Builder regionInstanceTemplatesSettingsBuilder = + RegionInstanceTemplatesStubSettings.newBuilder(); + regionInstanceTemplatesSettingsBuilder + .getSettings() + .setRetrySettings( + regionInstanceTemplatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionInstanceTemplatesStubSettings regionInstanceTemplatesSettings = + regionInstanceTemplatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionInstanceTemplatesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnetworkendpointgroupsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnetworkendpointgroupsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..5bdb5983938e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnetworkendpointgroupsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionNetworkEndpointGroupsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionNetworkEndpointGroupsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNetworkEndpointGroupsStubSettings.Builder regionNetworkEndpointGroupsSettingsBuilder = + RegionNetworkEndpointGroupsStubSettings.newBuilder(); + regionNetworkEndpointGroupsSettingsBuilder + .getSettings() + .setRetrySettings( + regionNetworkEndpointGroupsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionNetworkEndpointGroupsStubSettings regionNetworkEndpointGroupsSettings = + regionNetworkEndpointGroupsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionNetworkEndpointGroupsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnetworkfirewallpoliciesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnetworkfirewallpoliciesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..79801ef72d63 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnetworkfirewallpoliciesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionNetworkFirewallPoliciesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionNetworkFirewallPoliciesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNetworkFirewallPoliciesStubSettings.Builder regionNetworkFirewallPoliciesSettingsBuilder = + RegionNetworkFirewallPoliciesStubSettings.newBuilder(); + regionNetworkFirewallPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + regionNetworkFirewallPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionNetworkFirewallPoliciesStubSettings regionNetworkFirewallPoliciesSettings = + regionNetworkFirewallPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionNetworkFirewallPoliciesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnotificationendpointsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnotificationendpointsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..96577746213a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionnotificationendpointsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionNotificationEndpointsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionNotificationEndpointsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionNotificationEndpointsStubSettings.Builder regionNotificationEndpointsSettingsBuilder = + RegionNotificationEndpointsStubSettings.newBuilder(); + regionNotificationEndpointsSettingsBuilder + .getSettings() + .setRetrySettings( + regionNotificationEndpointsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionNotificationEndpointsStubSettings regionNotificationEndpointsSettings = + regionNotificationEndpointsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionNotificationEndpointsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionoperationsstubsettings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionoperationsstubsettings/delete/SyncDelete.java new file mode 100644 index 000000000000..9f5338bafc5e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionoperationsstubsettings/delete/SyncDelete.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionOperationsStubSettings_Delete_sync] +import com.google.cloud.compute.v1.stub.RegionOperationsStubSettings; +import java.time.Duration; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionOperationsStubSettings.Builder regionOperationsSettingsBuilder = + RegionOperationsStubSettings.newBuilder(); + regionOperationsSettingsBuilder + .deleteSettings() + .setRetrySettings( + regionOperationsSettingsBuilder + .deleteSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionOperationsStubSettings regionOperationsSettings = regionOperationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionOperationsStubSettings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsecuritypoliciesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsecuritypoliciesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..5bb014522f8d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsecuritypoliciesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionSecurityPoliciesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionSecurityPoliciesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSecurityPoliciesStubSettings.Builder regionSecurityPoliciesSettingsBuilder = + RegionSecurityPoliciesStubSettings.newBuilder(); + regionSecurityPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + regionSecurityPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionSecurityPoliciesStubSettings regionSecurityPoliciesSettings = + regionSecurityPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionSecurityPoliciesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsslcertificatesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsslcertificatesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..93d624d755bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsslcertificatesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionSslCertificatesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionSslCertificatesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSslCertificatesStubSettings.Builder regionSslCertificatesSettingsBuilder = + RegionSslCertificatesStubSettings.newBuilder(); + regionSslCertificatesSettingsBuilder + .getSettings() + .setRetrySettings( + regionSslCertificatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionSslCertificatesStubSettings regionSslCertificatesSettings = + regionSslCertificatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionSslCertificatesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsslpoliciesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsslpoliciesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a67c3c4012e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsslpoliciesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionSslPoliciesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionSslPoliciesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionSslPoliciesStubSettings.Builder regionSslPoliciesSettingsBuilder = + RegionSslPoliciesStubSettings.newBuilder(); + regionSslPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + regionSslPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionSslPoliciesStubSettings regionSslPoliciesSettings = + regionSslPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionSslPoliciesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..1999db26b110 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionsstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionsStubSettings.Builder regionsSettingsBuilder = RegionsStubSettings.newBuilder(); + regionsSettingsBuilder + .getSettings() + .setRetrySettings( + regionsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionsStubSettings regionsSettings = regionsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargethttpproxiesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargethttpproxiesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a86ca0c72428 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargethttpproxiesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionTargetHttpProxiesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionTargetHttpProxiesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetHttpProxiesStubSettings.Builder regionTargetHttpProxiesSettingsBuilder = + RegionTargetHttpProxiesStubSettings.newBuilder(); + regionTargetHttpProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + regionTargetHttpProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionTargetHttpProxiesStubSettings regionTargetHttpProxiesSettings = + regionTargetHttpProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionTargetHttpProxiesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargethttpsproxiesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargethttpsproxiesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..cc9c8f9a4eac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargethttpsproxiesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionTargetHttpsProxiesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionTargetHttpsProxiesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetHttpsProxiesStubSettings.Builder regionTargetHttpsProxiesSettingsBuilder = + RegionTargetHttpsProxiesStubSettings.newBuilder(); + regionTargetHttpsProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + regionTargetHttpsProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionTargetHttpsProxiesStubSettings regionTargetHttpsProxiesSettings = + regionTargetHttpsProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionTargetHttpsProxiesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargettcpproxiesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargettcpproxiesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..765ff80bd446 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regiontargettcpproxiesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionTargetTcpProxiesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionTargetTcpProxiesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionTargetTcpProxiesStubSettings.Builder regionTargetTcpProxiesSettingsBuilder = + RegionTargetTcpProxiesStubSettings.newBuilder(); + regionTargetTcpProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + regionTargetTcpProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionTargetTcpProxiesStubSettings regionTargetTcpProxiesSettings = + regionTargetTcpProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionTargetTcpProxiesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionurlmapsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionurlmapsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a6156cc00bb7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/regionurlmapsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_RegionUrlMapsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RegionUrlMapsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionUrlMapsStubSettings.Builder regionUrlMapsSettingsBuilder = + RegionUrlMapsStubSettings.newBuilder(); + regionUrlMapsSettingsBuilder + .getSettings() + .setRetrySettings( + regionUrlMapsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionUrlMapsStubSettings regionUrlMapsSettings = regionUrlMapsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RegionUrlMapsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/reservationsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/reservationsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..7b219da9853c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/reservationsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_ReservationsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ReservationsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ReservationsStubSettings.Builder reservationsSettingsBuilder = + ReservationsStubSettings.newBuilder(); + reservationsSettingsBuilder + .getSettings() + .setRetrySettings( + reservationsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ReservationsStubSettings reservationsSettings = reservationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ReservationsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/resourcepoliciesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/resourcepoliciesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..4c25d22dd6ab --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/resourcepoliciesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_ResourcePoliciesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ResourcePoliciesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ResourcePoliciesStubSettings.Builder resourcePoliciesSettingsBuilder = + ResourcePoliciesStubSettings.newBuilder(); + resourcePoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + resourcePoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ResourcePoliciesStubSettings resourcePoliciesSettings = resourcePoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ResourcePoliciesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/routersstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/routersstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a5880a4788af --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/routersstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_RoutersStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RoutersStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RoutersStubSettings.Builder routersSettingsBuilder = RoutersStubSettings.newBuilder(); + routersSettingsBuilder + .getSettings() + .setRetrySettings( + routersSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RoutersStubSettings routersSettings = routersSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RoutersStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/routesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/routesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a1412f6bb03b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/routesstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_RoutesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.RoutesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RoutesStubSettings.Builder routesSettingsBuilder = RoutesStubSettings.newBuilder(); + routesSettingsBuilder + .getSettings() + .setRetrySettings( + routesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RoutesStubSettings routesSettings = routesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_RoutesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/securitypoliciesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/securitypoliciesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..8518683530cd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/securitypoliciesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_SecurityPoliciesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.SecurityPoliciesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SecurityPoliciesStubSettings.Builder securityPoliciesSettingsBuilder = + SecurityPoliciesStubSettings.newBuilder(); + securityPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + securityPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SecurityPoliciesStubSettings securityPoliciesSettings = securityPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SecurityPoliciesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/serviceattachmentsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/serviceattachmentsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..d66c3b894f40 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/serviceattachmentsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_ServiceAttachmentsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ServiceAttachmentsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ServiceAttachmentsStubSettings.Builder serviceAttachmentsSettingsBuilder = + ServiceAttachmentsStubSettings.newBuilder(); + serviceAttachmentsSettingsBuilder + .getSettings() + .setRetrySettings( + serviceAttachmentsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ServiceAttachmentsStubSettings serviceAttachmentsSettings = + serviceAttachmentsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ServiceAttachmentsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/snapshotsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/snapshotsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..d1eadc576d07 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/snapshotsstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_SnapshotsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.SnapshotsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SnapshotsStubSettings.Builder snapshotsSettingsBuilder = SnapshotsStubSettings.newBuilder(); + snapshotsSettingsBuilder + .getSettings() + .setRetrySettings( + snapshotsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SnapshotsStubSettings snapshotsSettings = snapshotsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SnapshotsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/sslcertificatesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/sslcertificatesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..30e11027bdc6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/sslcertificatesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_SslCertificatesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.SslCertificatesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SslCertificatesStubSettings.Builder sslCertificatesSettingsBuilder = + SslCertificatesStubSettings.newBuilder(); + sslCertificatesSettingsBuilder + .getSettings() + .setRetrySettings( + sslCertificatesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SslCertificatesStubSettings sslCertificatesSettings = sslCertificatesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SslCertificatesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/sslpoliciesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/sslpoliciesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a7753d01fd71 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/sslpoliciesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_SslPoliciesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.SslPoliciesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SslPoliciesStubSettings.Builder sslPoliciesSettingsBuilder = + SslPoliciesStubSettings.newBuilder(); + sslPoliciesSettingsBuilder + .getSettings() + .setRetrySettings( + sslPoliciesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SslPoliciesStubSettings sslPoliciesSettings = sslPoliciesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SslPoliciesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/subnetworksstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/subnetworksstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..7301f8d5f44a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/subnetworksstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_SubnetworksStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.SubnetworksStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SubnetworksStubSettings.Builder subnetworksSettingsBuilder = + SubnetworksStubSettings.newBuilder(); + subnetworksSettingsBuilder + .getSettings() + .setRetrySettings( + subnetworksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SubnetworksStubSettings subnetworksSettings = subnetworksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SubnetworksStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetgrpcproxiesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetgrpcproxiesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..e36016f380f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetgrpcproxiesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_TargetGrpcProxiesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.TargetGrpcProxiesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetGrpcProxiesStubSettings.Builder targetGrpcProxiesSettingsBuilder = + TargetGrpcProxiesStubSettings.newBuilder(); + targetGrpcProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetGrpcProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetGrpcProxiesStubSettings targetGrpcProxiesSettings = + targetGrpcProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetGrpcProxiesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targethttpproxiesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targethttpproxiesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..39b45ecf3dd4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targethttpproxiesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_TargetHttpProxiesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.TargetHttpProxiesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetHttpProxiesStubSettings.Builder targetHttpProxiesSettingsBuilder = + TargetHttpProxiesStubSettings.newBuilder(); + targetHttpProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetHttpProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetHttpProxiesStubSettings targetHttpProxiesSettings = + targetHttpProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetHttpProxiesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targethttpsproxiesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targethttpsproxiesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..a9919d53d8d2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targethttpsproxiesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_TargetHttpsProxiesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.TargetHttpsProxiesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetHttpsProxiesStubSettings.Builder targetHttpsProxiesSettingsBuilder = + TargetHttpsProxiesStubSettings.newBuilder(); + targetHttpsProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetHttpsProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetHttpsProxiesStubSettings targetHttpsProxiesSettings = + targetHttpsProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetHttpsProxiesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetinstancesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetinstancesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..cbea4c6b3bc3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetinstancesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_TargetInstancesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.TargetInstancesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetInstancesStubSettings.Builder targetInstancesSettingsBuilder = + TargetInstancesStubSettings.newBuilder(); + targetInstancesSettingsBuilder + .getSettings() + .setRetrySettings( + targetInstancesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetInstancesStubSettings targetInstancesSettings = targetInstancesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetInstancesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetpoolsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetpoolsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..17e359b31b1c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetpoolsstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_TargetPoolsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.TargetPoolsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetPoolsStubSettings.Builder targetPoolsSettingsBuilder = + TargetPoolsStubSettings.newBuilder(); + targetPoolsSettingsBuilder + .getSettings() + .setRetrySettings( + targetPoolsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetPoolsStubSettings targetPoolsSettings = targetPoolsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetPoolsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetsslproxiesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetsslproxiesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..b4edcc9c7c39 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetsslproxiesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_TargetSslProxiesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.TargetSslProxiesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetSslProxiesStubSettings.Builder targetSslProxiesSettingsBuilder = + TargetSslProxiesStubSettings.newBuilder(); + targetSslProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetSslProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetSslProxiesStubSettings targetSslProxiesSettings = targetSslProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetSslProxiesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targettcpproxiesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targettcpproxiesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..8a70529dd314 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targettcpproxiesstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_TargetTcpProxiesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.TargetTcpProxiesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetTcpProxiesStubSettings.Builder targetTcpProxiesSettingsBuilder = + TargetTcpProxiesStubSettings.newBuilder(); + targetTcpProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetTcpProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetTcpProxiesStubSettings targetTcpProxiesSettings = targetTcpProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetTcpProxiesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetvpngatewaysstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetvpngatewaysstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..b6ac3926f441 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/targetvpngatewaysstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_TargetVpnGatewaysStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.TargetVpnGatewaysStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetVpnGatewaysStubSettings.Builder targetVpnGatewaysSettingsBuilder = + TargetVpnGatewaysStubSettings.newBuilder(); + targetVpnGatewaysSettingsBuilder + .getSettings() + .setRetrySettings( + targetVpnGatewaysSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetVpnGatewaysStubSettings targetVpnGatewaysSettings = + targetVpnGatewaysSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetVpnGatewaysStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/urlmapsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/urlmapsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..9ca4652b99ac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/urlmapsstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_UrlMapsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.UrlMapsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UrlMapsStubSettings.Builder urlMapsSettingsBuilder = UrlMapsStubSettings.newBuilder(); + urlMapsSettingsBuilder + .getSettings() + .setRetrySettings( + urlMapsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + UrlMapsStubSettings urlMapsSettings = urlMapsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_UrlMapsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/vpngatewaysstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/vpngatewaysstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..78434eb58835 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/vpngatewaysstubsettings/get/SyncGet.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.compute.v1.stub.samples; + +// [START compute_v1_generated_VpnGatewaysStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.VpnGatewaysStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + VpnGatewaysStubSettings.Builder vpnGatewaysSettingsBuilder = + VpnGatewaysStubSettings.newBuilder(); + vpnGatewaysSettingsBuilder + .getSettings() + .setRetrySettings( + vpnGatewaysSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + VpnGatewaysStubSettings vpnGatewaysSettings = vpnGatewaysSettingsBuilder.build(); + } +} +// [END compute_v1_generated_VpnGatewaysStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/vpntunnelsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/vpntunnelsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..3d2c08fb3a1e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/vpntunnelsstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_VpnTunnelsStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.VpnTunnelsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + VpnTunnelsStubSettings.Builder vpnTunnelsSettingsBuilder = VpnTunnelsStubSettings.newBuilder(); + vpnTunnelsSettingsBuilder + .getSettings() + .setRetrySettings( + vpnTunnelsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + VpnTunnelsStubSettings vpnTunnelsSettings = vpnTunnelsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_VpnTunnelsStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/zoneoperationsstubsettings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/zoneoperationsstubsettings/delete/SyncDelete.java new file mode 100644 index 000000000000..1d0b75253290 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/zoneoperationsstubsettings/delete/SyncDelete.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.compute.v1.stub.samples; + +// [START compute_v1_generated_ZoneOperationsStubSettings_Delete_sync] +import com.google.cloud.compute.v1.stub.ZoneOperationsStubSettings; +import java.time.Duration; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ZoneOperationsStubSettings.Builder zoneOperationsSettingsBuilder = + ZoneOperationsStubSettings.newBuilder(); + zoneOperationsSettingsBuilder + .deleteSettings() + .setRetrySettings( + zoneOperationsSettingsBuilder + .deleteSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ZoneOperationsStubSettings zoneOperationsSettings = zoneOperationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ZoneOperationsStubSettings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/zonesstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/zonesstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..bb8dcef60ff2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/stub/zonesstubsettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.stub.samples; + +// [START compute_v1_generated_ZonesStubSettings_Get_sync] +import com.google.cloud.compute.v1.stub.ZonesStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ZonesStubSettings.Builder zonesSettingsBuilder = ZonesStubSettings.newBuilder(); + zonesSettingsBuilder + .getSettings() + .setRetrySettings( + zonesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ZonesStubSettings zonesSettings = zonesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ZonesStubSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..043ca5f91402 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListSubnetworksRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + AggregatedListSubnetworksRequest request = + AggregatedListSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + subnetworksClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..7c561154d62c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListSubnetworksRequest; +import com.google.cloud.compute.v1.SubnetworkAggregatedList; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + AggregatedListSubnetworksRequest request = + AggregatedListSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SubnetworkAggregatedList response = + subnetworksClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Subnetworks_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..33e17a47926a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListSubnetworksRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + AggregatedListSubnetworksRequest request = + AggregatedListSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + subnetworksClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..3d7541309fdd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_AggregatedList_String_sync] +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + subnetworksClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..63d40261f75c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SubnetworksSettings subnetworksSettings = + SubnetworksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SubnetworksClient subnetworksClient = SubnetworksClient.create(subnetworksSettings); + } +} +// [END compute_v1_generated_Subnetworks_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..b56145079549 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SubnetworksSettings subnetworksSettings = + SubnetworksSettings.newBuilder().setEndpoint(myEndpoint).build(); + SubnetworksClient subnetworksClient = SubnetworksClient.create(subnetworksSettings); + } +} +// [END compute_v1_generated_Subnetworks_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/AsyncDelete.java new file mode 100644 index 000000000000..5b7706cd8cb9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteSubnetworkRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + DeleteSubnetworkRequest request = + DeleteSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .build(); + ApiFuture future = subnetworksClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..24b28d1fad5b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteSubnetworkRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + DeleteSubnetworkRequest request = + DeleteSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .build(); + OperationFuture future = + subnetworksClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/SyncDelete.java new file mode 100644 index 000000000000..2565f314931e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Delete_sync] +import com.google.cloud.compute.v1.DeleteSubnetworkRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + DeleteSubnetworkRequest request = + DeleteSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .build(); + Operation response = subnetworksClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..1bdfbc2e7ae4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String subnetwork = "subnetwork-1302785042"; + Operation response = subnetworksClient.deleteAsync(project, region, subnetwork).get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/AsyncExpandIpCidrRange.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/AsyncExpandIpCidrRange.java new file mode 100644 index 000000000000..84bb33b92ca1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/AsyncExpandIpCidrRange.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_ExpandIpCidrRange_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest; +import com.google.longrunning.Operation; + +public class AsyncExpandIpCidrRange { + + public static void main(String[] args) throws Exception { + asyncExpandIpCidrRange(); + } + + public static void asyncExpandIpCidrRange() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ExpandIpCidrRangeSubnetworkRequest request = + ExpandIpCidrRangeSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworksExpandIpCidrRangeRequestResource( + SubnetworksExpandIpCidrRangeRequest.newBuilder().build()) + .build(); + ApiFuture future = + subnetworksClient.expandIpCidrRangeCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_ExpandIpCidrRange_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/AsyncExpandIpCidrRangeLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/AsyncExpandIpCidrRangeLRO.java new file mode 100644 index 000000000000..ceef4b360750 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/AsyncExpandIpCidrRangeLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_ExpandIpCidrRange_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest; + +public class AsyncExpandIpCidrRangeLRO { + + public static void main(String[] args) throws Exception { + asyncExpandIpCidrRangeLRO(); + } + + public static void asyncExpandIpCidrRangeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ExpandIpCidrRangeSubnetworkRequest request = + ExpandIpCidrRangeSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworksExpandIpCidrRangeRequestResource( + SubnetworksExpandIpCidrRangeRequest.newBuilder().build()) + .build(); + OperationFuture future = + subnetworksClient.expandIpCidrRangeOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_ExpandIpCidrRange_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/SyncExpandIpCidrRange.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/SyncExpandIpCidrRange.java new file mode 100644 index 000000000000..3071329e9a99 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/SyncExpandIpCidrRange.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_ExpandIpCidrRange_sync] +import com.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest; + +public class SyncExpandIpCidrRange { + + public static void main(String[] args) throws Exception { + syncExpandIpCidrRange(); + } + + public static void syncExpandIpCidrRange() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ExpandIpCidrRangeSubnetworkRequest request = + ExpandIpCidrRangeSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworksExpandIpCidrRangeRequestResource( + SubnetworksExpandIpCidrRangeRequest.newBuilder().build()) + .build(); + Operation response = subnetworksClient.expandIpCidrRangeAsync(request).get(); + } + } +} +// [END compute_v1_generated_Subnetworks_ExpandIpCidrRange_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/SyncExpandIpCidrRangeStringStringStringSubnetworksexpandipcidrrangerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/SyncExpandIpCidrRangeStringStringStringSubnetworksexpandipcidrrangerequest.java new file mode 100644 index 000000000000..86cfdf138ed4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/expandipcidrrange/SyncExpandIpCidrRangeStringStringStringSubnetworksexpandipcidrrangerequest.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_ExpandIpCidrRange_StringStringStringSubnetworksexpandipcidrrangerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest; + +public class SyncExpandIpCidrRangeStringStringStringSubnetworksexpandipcidrrangerequest { + + public static void main(String[] args) throws Exception { + syncExpandIpCidrRangeStringStringStringSubnetworksexpandipcidrrangerequest(); + } + + public static void syncExpandIpCidrRangeStringStringStringSubnetworksexpandipcidrrangerequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String subnetwork = "subnetwork-1302785042"; + SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource = + SubnetworksExpandIpCidrRangeRequest.newBuilder().build(); + Operation response = + subnetworksClient + .expandIpCidrRangeAsync( + project, region, subnetwork, subnetworksExpandIpCidrRangeRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Subnetworks_ExpandIpCidrRange_StringStringStringSubnetworksexpandipcidrrangerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/AsyncGet.java new file mode 100644 index 000000000000..06a631a16d11 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetSubnetworkRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + GetSubnetworkRequest request = + GetSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setSubnetwork("subnetwork-1302785042") + .build(); + ApiFuture future = subnetworksClient.getCallable().futureCall(request); + // Do something. + Subnetwork response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/SyncGet.java new file mode 100644 index 000000000000..e2c9bac9577d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Get_sync] +import com.google.cloud.compute.v1.GetSubnetworkRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + GetSubnetworkRequest request = + GetSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setSubnetwork("subnetwork-1302785042") + .build(); + Subnetwork response = subnetworksClient.get(request); + } + } +} +// [END compute_v1_generated_Subnetworks_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..1e9aeb732e0c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String subnetwork = "subnetwork-1302785042"; + Subnetwork response = subnetworksClient.get(project, region, subnetwork); + } + } +} +// [END compute_v1_generated_Subnetworks_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/AsyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..0cbc4c9f6e89 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/AsyncGetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetIamPolicySubnetworkRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + GetIamPolicySubnetworkRequest request = + GetIamPolicySubnetworkRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + ApiFuture future = subnetworksClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_GetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/SyncGetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..cf89e8123fea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_GetIamPolicy_sync] +import com.google.cloud.compute.v1.GetIamPolicySubnetworkRequest; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + GetIamPolicySubnetworkRequest request = + GetIamPolicySubnetworkRequest.newBuilder() + .setOptionsRequestedPolicyVersion(-574521795) + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .build(); + Policy response = subnetworksClient.getIamPolicy(request); + } + } +} +// [END compute_v1_generated_Subnetworks_GetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/SyncGetIamPolicyStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/SyncGetIamPolicyStringStringString.java new file mode 100644 index 000000000000..f403e8a67c4a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/getiampolicy/SyncGetIamPolicyStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_GetIamPolicy_StringStringString_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncGetIamPolicyStringStringString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyStringStringString(); + } + + public static void syncGetIamPolicyStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + Policy response = subnetworksClient.getIamPolicy(project, region, resource); + } + } +} +// [END compute_v1_generated_Subnetworks_GetIamPolicy_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/AsyncInsert.java new file mode 100644 index 000000000000..3d780c8589ae --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertSubnetworkRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + InsertSubnetworkRequest request = + InsertSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetworkResource(Subnetwork.newBuilder().build()) + .build(); + ApiFuture future = subnetworksClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..823746f18857 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertSubnetworkRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + InsertSubnetworkRequest request = + InsertSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetworkResource(Subnetwork.newBuilder().build()) + .build(); + OperationFuture future = + subnetworksClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/SyncInsert.java new file mode 100644 index 000000000000..9a43ead2bb3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Insert_sync] +import com.google.cloud.compute.v1.InsertSubnetworkRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + InsertSubnetworkRequest request = + InsertSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetworkResource(Subnetwork.newBuilder().build()) + .build(); + Operation response = subnetworksClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/SyncInsertStringStringSubnetwork.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/SyncInsertStringStringSubnetwork.java new file mode 100644 index 000000000000..a75d12a15c46 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/insert/SyncInsertStringStringSubnetwork.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Insert_StringStringSubnetwork_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncInsertStringStringSubnetwork { + + public static void main(String[] args) throws Exception { + syncInsertStringStringSubnetwork(); + } + + public static void syncInsertStringStringSubnetwork() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Subnetwork subnetworkResource = Subnetwork.newBuilder().build(); + Operation response = subnetworksClient.insertAsync(project, region, subnetworkResource).get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Insert_StringStringSubnetwork_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/AsyncList.java new file mode 100644 index 000000000000..50d64ca96887 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListSubnetworksRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ListSubnetworksRequest request = + ListSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = subnetworksClient.listPagedCallable().futureCall(request); + // Do something. + for (Subnetwork element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/AsyncListPaged.java new file mode 100644 index 000000000000..7db671ab8c35 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_List_Paged_async] +import com.google.cloud.compute.v1.ListSubnetworksRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworkList; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ListSubnetworksRequest request = + ListSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + SubnetworkList response = subnetworksClient.listCallable().call(request); + for (Subnetwork element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Subnetworks_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/SyncList.java new file mode 100644 index 000000000000..436c05ad7537 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_List_sync] +import com.google.cloud.compute.v1.ListSubnetworksRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ListSubnetworksRequest request = + ListSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (Subnetwork element : subnetworksClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/SyncListStringString.java new file mode 100644 index 000000000000..222663415371 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_List_StringString_sync] +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (Subnetwork element : subnetworksClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/AsyncListUsable.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/AsyncListUsable.java new file mode 100644 index 000000000000..67c815005a99 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/AsyncListUsable.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_ListUsable_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListUsableSubnetworksRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.UsableSubnetwork; + +public class AsyncListUsable { + + public static void main(String[] args) throws Exception { + asyncListUsable(); + } + + public static void asyncListUsable() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ListUsableSubnetworksRequest request = + ListUsableSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + subnetworksClient.listUsablePagedCallable().futureCall(request); + // Do something. + for (UsableSubnetwork element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_ListUsable_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/AsyncListUsablePaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/AsyncListUsablePaged.java new file mode 100644 index 000000000000..718b07fc6a5c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/AsyncListUsablePaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_ListUsable_Paged_async] +import com.google.cloud.compute.v1.ListUsableSubnetworksRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.UsableSubnetwork; +import com.google.cloud.compute.v1.UsableSubnetworksAggregatedList; +import com.google.common.base.Strings; + +public class AsyncListUsablePaged { + + public static void main(String[] args) throws Exception { + asyncListUsablePaged(); + } + + public static void asyncListUsablePaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ListUsableSubnetworksRequest request = + ListUsableSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + UsableSubnetworksAggregatedList response = + subnetworksClient.listUsableCallable().call(request); + for (UsableSubnetwork element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Subnetworks_ListUsable_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/SyncListUsable.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/SyncListUsable.java new file mode 100644 index 000000000000..ef6d270387ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/SyncListUsable.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_ListUsable_sync] +import com.google.cloud.compute.v1.ListUsableSubnetworksRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.UsableSubnetwork; + +public class SyncListUsable { + + public static void main(String[] args) throws Exception { + syncListUsable(); + } + + public static void syncListUsable() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + ListUsableSubnetworksRequest request = + ListUsableSubnetworksRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (UsableSubnetwork element : subnetworksClient.listUsable(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_ListUsable_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/SyncListUsableString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/SyncListUsableString.java new file mode 100644 index 000000000000..5b8a3bc199fe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/listusable/SyncListUsableString.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_ListUsable_String_sync] +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.UsableSubnetwork; + +public class SyncListUsableString { + + public static void main(String[] args) throws Exception { + syncListUsableString(); + } + + public static void syncListUsableString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + for (UsableSubnetwork element : subnetworksClient.listUsable(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Subnetworks_ListUsable_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/AsyncPatch.java new file mode 100644 index 000000000000..b85194a49a5d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/AsyncPatch.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchSubnetworkRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + PatchSubnetworkRequest request = + PatchSubnetworkRequest.newBuilder() + .setDrainTimeoutSeconds(1431448922) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworkResource(Subnetwork.newBuilder().build()) + .build(); + ApiFuture future = subnetworksClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..caec4e46a068 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/AsyncPatchLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchSubnetworkRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + PatchSubnetworkRequest request = + PatchSubnetworkRequest.newBuilder() + .setDrainTimeoutSeconds(1431448922) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworkResource(Subnetwork.newBuilder().build()) + .build(); + OperationFuture future = + subnetworksClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/SyncPatch.java new file mode 100644 index 000000000000..2a86ba9de711 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchSubnetworkRequest; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + PatchSubnetworkRequest request = + PatchSubnetworkRequest.newBuilder() + .setDrainTimeoutSeconds(1431448922) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworkResource(Subnetwork.newBuilder().build()) + .build(); + Operation response = subnetworksClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/SyncPatchStringStringStringSubnetwork.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/SyncPatchStringStringStringSubnetwork.java new file mode 100644 index 000000000000..1c9dcdda7e01 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/patch/SyncPatchStringStringStringSubnetwork.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_Patch_StringStringStringSubnetwork_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.Subnetwork; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncPatchStringStringStringSubnetwork { + + public static void main(String[] args) throws Exception { + syncPatchStringStringStringSubnetwork(); + } + + public static void syncPatchStringStringStringSubnetwork() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String subnetwork = "subnetwork-1302785042"; + Subnetwork subnetworkResource = Subnetwork.newBuilder().build(); + Operation response = + subnetworksClient.patchAsync(project, region, subnetwork, subnetworkResource).get(); + } + } +} +// [END compute_v1_generated_Subnetworks_Patch_StringStringStringSubnetwork_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/AsyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..3110b71a2721 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/AsyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicySubnetworkRequest; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + SetIamPolicySubnetworkRequest request = + SetIamPolicySubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + ApiFuture future = subnetworksClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_SetIamPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/SyncSetIamPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..ab36d044ae51 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/SyncSetIamPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_SetIamPolicy_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SetIamPolicySubnetworkRequest; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + SetIamPolicySubnetworkRequest request = + SetIamPolicySubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build()) + .setResource("resource-341064690") + .build(); + Policy response = subnetworksClient.setIamPolicy(request); + } + } +} +// [END compute_v1_generated_Subnetworks_SetIamPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.java new file mode 100644 index 000000000000..03ba87ff64b8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setiampolicy/SyncSetIamPolicyStringStringStringRegionsetpolicyrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] +import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RegionSetPolicyRequest; +import com.google.cloud.compute.v1.SubnetworksClient; + +public class SyncSetIamPolicyStringStringStringRegionsetpolicyrequest { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringStringStringRegionsetpolicyrequest(); + } + + public static void syncSetIamPolicyStringStringStringRegionsetpolicyrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetPolicyRequest regionSetPolicyRequestResource = + RegionSetPolicyRequest.newBuilder().build(); + Policy response = + subnetworksClient.setIamPolicy(project, region, resource, regionSetPolicyRequestResource); + } + } +} +// [END compute_v1_generated_Subnetworks_SetIamPolicy_StringStringStringRegionsetpolicyrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/AsyncSetPrivateIpGoogleAccess.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/AsyncSetPrivateIpGoogleAccess.java new file mode 100644 index 000000000000..b2f1ec2c5896 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/AsyncSetPrivateIpGoogleAccess.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_SetPrivateIpGoogleAccess_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest; +import com.google.longrunning.Operation; + +public class AsyncSetPrivateIpGoogleAccess { + + public static void main(String[] args) throws Exception { + asyncSetPrivateIpGoogleAccess(); + } + + public static void asyncSetPrivateIpGoogleAccess() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + SetPrivateIpGoogleAccessSubnetworkRequest request = + SetPrivateIpGoogleAccessSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworksSetPrivateIpGoogleAccessRequestResource( + SubnetworksSetPrivateIpGoogleAccessRequest.newBuilder().build()) + .build(); + ApiFuture future = + subnetworksClient.setPrivateIpGoogleAccessCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_SetPrivateIpGoogleAccess_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/AsyncSetPrivateIpGoogleAccessLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/AsyncSetPrivateIpGoogleAccessLRO.java new file mode 100644 index 000000000000..a69bd565f20f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/AsyncSetPrivateIpGoogleAccessLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_SetPrivateIpGoogleAccess_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest; + +public class AsyncSetPrivateIpGoogleAccessLRO { + + public static void main(String[] args) throws Exception { + asyncSetPrivateIpGoogleAccessLRO(); + } + + public static void asyncSetPrivateIpGoogleAccessLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + SetPrivateIpGoogleAccessSubnetworkRequest request = + SetPrivateIpGoogleAccessSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworksSetPrivateIpGoogleAccessRequestResource( + SubnetworksSetPrivateIpGoogleAccessRequest.newBuilder().build()) + .build(); + OperationFuture future = + subnetworksClient.setPrivateIpGoogleAccessOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_SetPrivateIpGoogleAccess_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/SyncSetPrivateIpGoogleAccess.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/SyncSetPrivateIpGoogleAccess.java new file mode 100644 index 000000000000..d6a857d135b5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/SyncSetPrivateIpGoogleAccess.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_SetPrivateIpGoogleAccess_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest; + +public class SyncSetPrivateIpGoogleAccess { + + public static void main(String[] args) throws Exception { + syncSetPrivateIpGoogleAccess(); + } + + public static void syncSetPrivateIpGoogleAccess() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + SetPrivateIpGoogleAccessSubnetworkRequest request = + SetPrivateIpGoogleAccessSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setSubnetwork("subnetwork-1302785042") + .setSubnetworksSetPrivateIpGoogleAccessRequestResource( + SubnetworksSetPrivateIpGoogleAccessRequest.newBuilder().build()) + .build(); + Operation response = subnetworksClient.setPrivateIpGoogleAccessAsync(request).get(); + } + } +} +// [END compute_v1_generated_Subnetworks_SetPrivateIpGoogleAccess_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/SyncSetPrivateIpGoogleAccessStringStringStringSubnetworkssetprivateipgoogleaccessrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/SyncSetPrivateIpGoogleAccessStringStringStringSubnetworkssetprivateipgoogleaccessrequest.java new file mode 100644 index 000000000000..a944437c9591 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/setprivateipgoogleaccess/SyncSetPrivateIpGoogleAccessStringStringStringSubnetworkssetprivateipgoogleaccessrequest.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_SetPrivateIpGoogleAccess_StringStringStringSubnetworkssetprivateipgoogleaccessrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest; + +public +class SyncSetPrivateIpGoogleAccessStringStringStringSubnetworkssetprivateipgoogleaccessrequest { + + public static void main(String[] args) throws Exception { + syncSetPrivateIpGoogleAccessStringStringStringSubnetworkssetprivateipgoogleaccessrequest(); + } + + public static void + syncSetPrivateIpGoogleAccessStringStringStringSubnetworkssetprivateipgoogleaccessrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String subnetwork = "subnetwork-1302785042"; + SubnetworksSetPrivateIpGoogleAccessRequest + subnetworksSetPrivateIpGoogleAccessRequestResource = + SubnetworksSetPrivateIpGoogleAccessRequest.newBuilder().build(); + Operation response = + subnetworksClient + .setPrivateIpGoogleAccessAsync( + project, region, subnetwork, subnetworksSetPrivateIpGoogleAccessRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_Subnetworks_SetPrivateIpGoogleAccess_StringStringStringSubnetworkssetprivateipgoogleaccessrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..06372a7ab1b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.TestIamPermissionsSubnetworkRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + TestIamPermissionsSubnetworkRequest request = + TestIamPermissionsSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + subnetworksClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_Subnetworks_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..aedabd868728 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_TestIamPermissions_sync] +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.TestIamPermissionsSubnetworkRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + TestIamPermissionsSubnetworkRequest request = + TestIamPermissionsSubnetworkRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = subnetworksClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_Subnetworks_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..90cd0026beaa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworks/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_Subnetworks_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.SubnetworksClient; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SubnetworksClient subnetworksClient = SubnetworksClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + subnetworksClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_Subnetworks_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworkssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworkssettings/get/SyncGet.java new file mode 100644 index 000000000000..29e60855751c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/subnetworkssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_SubnetworksSettings_Get_sync] +import com.google.cloud.compute.v1.SubnetworksSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SubnetworksSettings.Builder subnetworksSettingsBuilder = SubnetworksSettings.newBuilder(); + subnetworksSettingsBuilder + .getSettings() + .setRetrySettings( + subnetworksSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SubnetworksSettings subnetworksSettings = subnetworksSettingsBuilder.build(); + } +} +// [END compute_v1_generated_SubnetworksSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..3a0622c9ef25 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetGrpcProxiesSettings targetGrpcProxiesSettings = + TargetGrpcProxiesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TargetGrpcProxiesClient targetGrpcProxiesClient = + TargetGrpcProxiesClient.create(targetGrpcProxiesSettings); + } +} +// [END compute_v1_generated_TargetGrpcProxies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..b6c2013112af --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetGrpcProxiesSettings targetGrpcProxiesSettings = + TargetGrpcProxiesSettings.newBuilder().setEndpoint(myEndpoint).build(); + TargetGrpcProxiesClient targetGrpcProxiesClient = + TargetGrpcProxiesClient.create(targetGrpcProxiesSettings); + } +} +// [END compute_v1_generated_TargetGrpcProxies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/AsyncDelete.java new file mode 100644 index 000000000000..1e370f822f68 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + DeleteTargetGrpcProxyRequest request = + DeleteTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxy("targetGrpcProxy1045500511") + .build(); + ApiFuture future = targetGrpcProxiesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..0e1497e11781 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + DeleteTargetGrpcProxyRequest request = + DeleteTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxy("targetGrpcProxy1045500511") + .build(); + OperationFuture future = + targetGrpcProxiesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/SyncDelete.java new file mode 100644 index 000000000000..fc5012099835 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Delete_sync] +import com.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + DeleteTargetGrpcProxyRequest request = + DeleteTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxy("targetGrpcProxy1045500511") + .build(); + Operation response = targetGrpcProxiesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..0f1194592065 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + String project = "project-309310695"; + String targetGrpcProxy = "targetGrpcProxy1045500511"; + Operation response = targetGrpcProxiesClient.deleteAsync(project, targetGrpcProxy).get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/AsyncGet.java new file mode 100644 index 000000000000..ee4fa34c220e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + GetTargetGrpcProxyRequest request = + GetTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetGrpcProxy("targetGrpcProxy1045500511") + .build(); + ApiFuture future = targetGrpcProxiesClient.getCallable().futureCall(request); + // Do something. + TargetGrpcProxy response = future.get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/SyncGet.java new file mode 100644 index 000000000000..ad8b77729c56 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Get_sync] +import com.google.cloud.compute.v1.GetTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + GetTargetGrpcProxyRequest request = + GetTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetGrpcProxy("targetGrpcProxy1045500511") + .build(); + TargetGrpcProxy response = targetGrpcProxiesClient.get(request); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/SyncGetStringString.java new file mode 100644 index 000000000000..41716ea6b743 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Get_StringString_sync] +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + String project = "project-309310695"; + String targetGrpcProxy = "targetGrpcProxy1045500511"; + TargetGrpcProxy response = targetGrpcProxiesClient.get(project, targetGrpcProxy); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/AsyncInsert.java new file mode 100644 index 000000000000..441c368b214d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + InsertTargetGrpcProxyRequest request = + InsertTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxyResource(TargetGrpcProxy.newBuilder().build()) + .build(); + ApiFuture future = targetGrpcProxiesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..47b1c2938a23 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + InsertTargetGrpcProxyRequest request = + InsertTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxyResource(TargetGrpcProxy.newBuilder().build()) + .build(); + OperationFuture future = + targetGrpcProxiesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/SyncInsert.java new file mode 100644 index 000000000000..60f15ca31ca6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Insert_sync] +import com.google.cloud.compute.v1.InsertTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + InsertTargetGrpcProxyRequest request = + InsertTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxyResource(TargetGrpcProxy.newBuilder().build()) + .build(); + Operation response = targetGrpcProxiesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/SyncInsertStringTargetgrpcproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/SyncInsertStringTargetgrpcproxy.java new file mode 100644 index 000000000000..4135724453b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/insert/SyncInsertStringTargetgrpcproxy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Insert_StringTargetgrpcproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class SyncInsertStringTargetgrpcproxy { + + public static void main(String[] args) throws Exception { + syncInsertStringTargetgrpcproxy(); + } + + public static void syncInsertStringTargetgrpcproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + String project = "project-309310695"; + TargetGrpcProxy targetGrpcProxyResource = TargetGrpcProxy.newBuilder().build(); + Operation response = + targetGrpcProxiesClient.insertAsync(project, targetGrpcProxyResource).get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Insert_StringTargetgrpcproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/AsyncList.java new file mode 100644 index 000000000000..aaaa4ccd4c58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListTargetGrpcProxiesRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + ListTargetGrpcProxiesRequest request = + ListTargetGrpcProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + targetGrpcProxiesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetGrpcProxy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/AsyncListPaged.java new file mode 100644 index 000000000000..583c2588f454 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_List_Paged_async] +import com.google.cloud.compute.v1.ListTargetGrpcProxiesRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; +import com.google.cloud.compute.v1.TargetGrpcProxyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + ListTargetGrpcProxiesRequest request = + ListTargetGrpcProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetGrpcProxyList response = targetGrpcProxiesClient.listCallable().call(request); + for (TargetGrpcProxy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/SyncList.java new file mode 100644 index 000000000000..6a74dfe87a08 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_List_sync] +import com.google.cloud.compute.v1.ListTargetGrpcProxiesRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + ListTargetGrpcProxiesRequest request = + ListTargetGrpcProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (TargetGrpcProxy element : targetGrpcProxiesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/SyncListString.java new file mode 100644 index 000000000000..3efcdde91fa6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_List_String_sync] +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + String project = "project-309310695"; + for (TargetGrpcProxy element : targetGrpcProxiesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/AsyncPatch.java new file mode 100644 index 000000000000..146c353af69f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + PatchTargetGrpcProxyRequest request = + PatchTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxy("targetGrpcProxy1045500511") + .setTargetGrpcProxyResource(TargetGrpcProxy.newBuilder().build()) + .build(); + ApiFuture future = targetGrpcProxiesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..9e1943f0ec13 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + PatchTargetGrpcProxyRequest request = + PatchTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxy("targetGrpcProxy1045500511") + .setTargetGrpcProxyResource(TargetGrpcProxy.newBuilder().build()) + .build(); + OperationFuture future = + targetGrpcProxiesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/SyncPatch.java new file mode 100644 index 000000000000..5d7d6a7c234c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchTargetGrpcProxyRequest; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + PatchTargetGrpcProxyRequest request = + PatchTargetGrpcProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetGrpcProxy("targetGrpcProxy1045500511") + .setTargetGrpcProxyResource(TargetGrpcProxy.newBuilder().build()) + .build(); + Operation response = targetGrpcProxiesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/SyncPatchStringStringTargetgrpcproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/SyncPatchStringStringTargetgrpcproxy.java new file mode 100644 index 000000000000..51fbada729ec --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxies/patch/SyncPatchStringStringTargetgrpcproxy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxies_Patch_StringStringTargetgrpcproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetGrpcProxiesClient; +import com.google.cloud.compute.v1.TargetGrpcProxy; + +public class SyncPatchStringStringTargetgrpcproxy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringTargetgrpcproxy(); + } + + public static void syncPatchStringStringTargetgrpcproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetGrpcProxiesClient targetGrpcProxiesClient = TargetGrpcProxiesClient.create()) { + String project = "project-309310695"; + String targetGrpcProxy = "targetGrpcProxy1045500511"; + TargetGrpcProxy targetGrpcProxyResource = TargetGrpcProxy.newBuilder().build(); + Operation response = + targetGrpcProxiesClient + .patchAsync(project, targetGrpcProxy, targetGrpcProxyResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetGrpcProxies_Patch_StringStringTargetgrpcproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxiessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxiessettings/get/SyncGet.java new file mode 100644 index 000000000000..1c77618365b5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetgrpcproxiessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetGrpcProxiesSettings_Get_sync] +import com.google.cloud.compute.v1.TargetGrpcProxiesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetGrpcProxiesSettings.Builder targetGrpcProxiesSettingsBuilder = + TargetGrpcProxiesSettings.newBuilder(); + targetGrpcProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetGrpcProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetGrpcProxiesSettings targetGrpcProxiesSettings = targetGrpcProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetGrpcProxiesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..25cb182bfee1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxiesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + AggregatedListTargetHttpProxiesRequest request = + AggregatedListTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + targetHttpProxiesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpProxies_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..615b21cc016e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxiesScopedList; +import com.google.cloud.compute.v1.TargetHttpProxyAggregatedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + AggregatedListTargetHttpProxiesRequest request = + AggregatedListTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetHttpProxyAggregatedList response = + targetHttpProxiesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetHttpProxies_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..df1e4168f516 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxiesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + AggregatedListTargetHttpProxiesRequest request = + AggregatedListTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + targetHttpProxiesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpProxies_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..233f2cd33e36 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_AggregatedList_String_sync] +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxiesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + targetHttpProxiesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpProxies_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..263f763985f3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetHttpProxiesSettings targetHttpProxiesSettings = + TargetHttpProxiesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TargetHttpProxiesClient targetHttpProxiesClient = + TargetHttpProxiesClient.create(targetHttpProxiesSettings); + } +} +// [END compute_v1_generated_TargetHttpProxies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..cbc848eb03de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetHttpProxiesSettings targetHttpProxiesSettings = + TargetHttpProxiesSettings.newBuilder().setEndpoint(myEndpoint).build(); + TargetHttpProxiesClient targetHttpProxiesClient = + TargetHttpProxiesClient.create(targetHttpProxiesSettings); + } +} +// [END compute_v1_generated_TargetHttpProxies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/AsyncDelete.java new file mode 100644 index 000000000000..ea1e270e1cf6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + DeleteTargetHttpProxyRequest request = + DeleteTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + ApiFuture future = targetHttpProxiesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..c691f00ea0b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteTargetHttpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + DeleteTargetHttpProxyRequest request = + DeleteTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + OperationFuture future = + targetHttpProxiesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/SyncDelete.java new file mode 100644 index 000000000000..4aab15f849bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Delete_sync] +import com.google.cloud.compute.v1.DeleteTargetHttpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + DeleteTargetHttpProxyRequest request = + DeleteTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + Operation response = targetHttpProxiesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..0a77856db540 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpProxy = "targetHttpProxy-1944074187"; + Operation response = targetHttpProxiesClient.deleteAsync(project, targetHttpProxy).get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/AsyncGet.java new file mode 100644 index 000000000000..3c93a1499a94 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + GetTargetHttpProxyRequest request = + GetTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + ApiFuture future = targetHttpProxiesClient.getCallable().futureCall(request); + // Do something. + TargetHttpProxy response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/SyncGet.java new file mode 100644 index 000000000000..ccfeb2148b9b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Get_sync] +import com.google.cloud.compute.v1.GetTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + GetTargetHttpProxyRequest request = + GetTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .build(); + TargetHttpProxy response = targetHttpProxiesClient.get(request); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/SyncGetStringString.java new file mode 100644 index 000000000000..82d8a5729860 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Get_StringString_sync] +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpProxy = "targetHttpProxy-1944074187"; + TargetHttpProxy response = targetHttpProxiesClient.get(project, targetHttpProxy); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/AsyncInsert.java new file mode 100644 index 000000000000..6959a2e9726a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + InsertTargetHttpProxyRequest request = + InsertTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + ApiFuture future = targetHttpProxiesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..63c56b307b0d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertTargetHttpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + InsertTargetHttpProxyRequest request = + InsertTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + OperationFuture future = + targetHttpProxiesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/SyncInsert.java new file mode 100644 index 000000000000..3a56ff7a5fba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Insert_sync] +import com.google.cloud.compute.v1.InsertTargetHttpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + InsertTargetHttpProxyRequest request = + InsertTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + Operation response = targetHttpProxiesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/SyncInsertStringTargethttpproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/SyncInsertStringTargethttpproxy.java new file mode 100644 index 000000000000..69c536fc8c26 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/insert/SyncInsertStringTargethttpproxy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Insert_StringTargethttpproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncInsertStringTargethttpproxy { + + public static void main(String[] args) throws Exception { + syncInsertStringTargethttpproxy(); + } + + public static void syncInsertStringTargethttpproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + String project = "project-309310695"; + TargetHttpProxy targetHttpProxyResource = TargetHttpProxy.newBuilder().build(); + Operation response = + targetHttpProxiesClient.insertAsync(project, targetHttpProxyResource).get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Insert_StringTargethttpproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/AsyncList.java new file mode 100644 index 000000000000..24651ed23630 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + ListTargetHttpProxiesRequest request = + ListTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + targetHttpProxiesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetHttpProxy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpProxies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/AsyncListPaged.java new file mode 100644 index 000000000000..4ff4e856f1e0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_List_Paged_async] +import com.google.cloud.compute.v1.ListTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; +import com.google.cloud.compute.v1.TargetHttpProxyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + ListTargetHttpProxiesRequest request = + ListTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetHttpProxyList response = targetHttpProxiesClient.listCallable().call(request); + for (TargetHttpProxy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetHttpProxies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/SyncList.java new file mode 100644 index 000000000000..69223dbdb74b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_List_sync] +import com.google.cloud.compute.v1.ListTargetHttpProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + ListTargetHttpProxiesRequest request = + ListTargetHttpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (TargetHttpProxy element : targetHttpProxiesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpProxies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/SyncListString.java new file mode 100644 index 000000000000..dbe791927dbf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_List_String_sync] +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + String project = "project-309310695"; + for (TargetHttpProxy element : targetHttpProxiesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpProxies_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/AsyncPatch.java new file mode 100644 index 000000000000..3823d6a9cd5f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + PatchTargetHttpProxyRequest request = + PatchTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + ApiFuture future = targetHttpProxiesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..292aaaa018ce --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + PatchTargetHttpProxyRequest request = + PatchTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + OperationFuture future = + targetHttpProxiesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/SyncPatch.java new file mode 100644 index 000000000000..3b88505d7387 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + PatchTargetHttpProxyRequest request = + PatchTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build()) + .build(); + Operation response = targetHttpProxiesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/SyncPatchStringStringTargethttpproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/SyncPatchStringStringTargethttpproxy.java new file mode 100644 index 000000000000..e814d9970f36 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/patch/SyncPatchStringStringTargethttpproxy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_Patch_StringStringTargethttpproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.TargetHttpProxy; + +public class SyncPatchStringStringTargethttpproxy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringTargethttpproxy(); + } + + public static void syncPatchStringStringTargethttpproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpProxy = "targetHttpProxy-1944074187"; + TargetHttpProxy targetHttpProxyResource = TargetHttpProxy.newBuilder().build(); + Operation response = + targetHttpProxiesClient + .patchAsync(project, targetHttpProxy, targetHttpProxyResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_Patch_StringStringTargethttpproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/AsyncSetUrlMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/AsyncSetUrlMap.java new file mode 100644 index 000000000000..99d5c4e877b4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/AsyncSetUrlMap.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_SetUrlMap_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; +import com.google.longrunning.Operation; + +public class AsyncSetUrlMap { + + public static void main(String[] args) throws Exception { + asyncSetUrlMap(); + } + + public static void asyncSetUrlMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + SetUrlMapTargetHttpProxyRequest request = + SetUrlMapTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + ApiFuture future = targetHttpProxiesClient.setUrlMapCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_SetUrlMap_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/AsyncSetUrlMapLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/AsyncSetUrlMapLRO.java new file mode 100644 index 000000000000..6d7a13b7587d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/AsyncSetUrlMapLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_SetUrlMap_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; + +public class AsyncSetUrlMapLRO { + + public static void main(String[] args) throws Exception { + asyncSetUrlMapLRO(); + } + + public static void asyncSetUrlMapLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + SetUrlMapTargetHttpProxyRequest request = + SetUrlMapTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + OperationFuture future = + targetHttpProxiesClient.setUrlMapOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_SetUrlMap_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/SyncSetUrlMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/SyncSetUrlMap.java new file mode 100644 index 000000000000..d7ff22ddd27c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/SyncSetUrlMap.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_SetUrlMap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; + +public class SyncSetUrlMap { + + public static void main(String[] args) throws Exception { + syncSetUrlMap(); + } + + public static void syncSetUrlMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + SetUrlMapTargetHttpProxyRequest request = + SetUrlMapTargetHttpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpProxy("targetHttpProxy-1944074187") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + Operation response = targetHttpProxiesClient.setUrlMapAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_SetUrlMap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/SyncSetUrlMapStringStringUrlmapreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/SyncSetUrlMapStringStringUrlmapreference.java new file mode 100644 index 000000000000..5df35225dfca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxies/seturlmap/SyncSetUrlMapStringStringUrlmapreference.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxies_SetUrlMap_StringStringUrlmapreference_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; + +public class SyncSetUrlMapStringStringUrlmapreference { + + public static void main(String[] args) throws Exception { + syncSetUrlMapStringStringUrlmapreference(); + } + + public static void syncSetUrlMapStringStringUrlmapreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpProxy = "targetHttpProxy-1944074187"; + UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build(); + Operation response = + targetHttpProxiesClient + .setUrlMapAsync(project, targetHttpProxy, urlMapReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetHttpProxies_SetUrlMap_StringStringUrlmapreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxiessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxiessettings/get/SyncGet.java new file mode 100644 index 000000000000..280d3a60f3c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpproxiessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpProxiesSettings_Get_sync] +import com.google.cloud.compute.v1.TargetHttpProxiesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetHttpProxiesSettings.Builder targetHttpProxiesSettingsBuilder = + TargetHttpProxiesSettings.newBuilder(); + targetHttpProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetHttpProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetHttpProxiesSettings targetHttpProxiesSettings = targetHttpProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetHttpProxiesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..1d7c780478af --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + AggregatedListTargetHttpsProxiesRequest request = + AggregatedListTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + targetHttpsProxiesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..c63cf11d7966 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesScopedList; +import com.google.cloud.compute.v1.TargetHttpsProxyAggregatedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + AggregatedListTargetHttpsProxiesRequest request = + AggregatedListTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetHttpsProxyAggregatedList response = + targetHttpsProxiesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..c07fe8a790bb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + AggregatedListTargetHttpsProxiesRequest request = + AggregatedListTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + targetHttpsProxiesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..65afe41daa0a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_AggregatedList_String_sync] +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + targetHttpsProxiesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d0dcf4b1048c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetHttpsProxiesSettings targetHttpsProxiesSettings = + TargetHttpsProxiesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TargetHttpsProxiesClient targetHttpsProxiesClient = + TargetHttpsProxiesClient.create(targetHttpsProxiesSettings); + } +} +// [END compute_v1_generated_TargetHttpsProxies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..238d56a09ef2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetHttpsProxiesSettings targetHttpsProxiesSettings = + TargetHttpsProxiesSettings.newBuilder().setEndpoint(myEndpoint).build(); + TargetHttpsProxiesClient targetHttpsProxiesClient = + TargetHttpsProxiesClient.create(targetHttpsProxiesSettings); + } +} +// [END compute_v1_generated_TargetHttpsProxies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/AsyncDelete.java new file mode 100644 index 000000000000..b74d4ef2ebd7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + DeleteTargetHttpsProxyRequest request = + DeleteTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = targetHttpsProxiesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..5e22c0e99fb8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + DeleteTargetHttpsProxyRequest request = + DeleteTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + OperationFuture future = + targetHttpsProxiesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/SyncDelete.java new file mode 100644 index 000000000000..06a4fdb0cf12 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Delete_sync] +import com.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + DeleteTargetHttpsProxyRequest request = + DeleteTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + Operation response = targetHttpsProxiesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..33627486a0ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + Operation response = targetHttpsProxiesClient.deleteAsync(project, targetHttpsProxy).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/AsyncGet.java new file mode 100644 index 000000000000..a0faabbf0f9d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + GetTargetHttpsProxyRequest request = + GetTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = + targetHttpsProxiesClient.getCallable().futureCall(request); + // Do something. + TargetHttpsProxy response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/SyncGet.java new file mode 100644 index 000000000000..b39d3c955a2b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Get_sync] +import com.google.cloud.compute.v1.GetTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + GetTargetHttpsProxyRequest request = + GetTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + TargetHttpsProxy response = targetHttpsProxiesClient.get(request); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/SyncGetStringString.java new file mode 100644 index 000000000000..ac61d7283d7a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Get_StringString_sync] +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + TargetHttpsProxy response = targetHttpsProxiesClient.get(project, targetHttpsProxy); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/AsyncInsert.java new file mode 100644 index 000000000000..a6669481fa96 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + InsertTargetHttpsProxyRequest request = + InsertTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + ApiFuture future = targetHttpsProxiesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..486719a84668 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + InsertTargetHttpsProxyRequest request = + InsertTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + OperationFuture future = + targetHttpsProxiesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/SyncInsert.java new file mode 100644 index 000000000000..3ac4f72832c4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Insert_sync] +import com.google.cloud.compute.v1.InsertTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + InsertTargetHttpsProxyRequest request = + InsertTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + Operation response = targetHttpsProxiesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/SyncInsertStringTargethttpsproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/SyncInsertStringTargethttpsproxy.java new file mode 100644 index 000000000000..581904e1daa2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/insert/SyncInsertStringTargethttpsproxy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Insert_StringTargethttpsproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncInsertStringTargethttpsproxy { + + public static void main(String[] args) throws Exception { + syncInsertStringTargethttpsproxy(); + } + + public static void syncInsertStringTargethttpsproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build(); + Operation response = + targetHttpsProxiesClient.insertAsync(project, targetHttpsProxyResource).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Insert_StringTargethttpsproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/AsyncList.java new file mode 100644 index 000000000000..e7c0aebd20ce --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + ListTargetHttpsProxiesRequest request = + ListTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + targetHttpsProxiesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetHttpsProxy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/AsyncListPaged.java new file mode 100644 index 000000000000..fa5c81de39f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_List_Paged_async] +import com.google.cloud.compute.v1.ListTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; +import com.google.cloud.compute.v1.TargetHttpsProxyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + ListTargetHttpsProxiesRequest request = + ListTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetHttpsProxyList response = targetHttpsProxiesClient.listCallable().call(request); + for (TargetHttpsProxy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/SyncList.java new file mode 100644 index 000000000000..dec3bf29a195 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_List_sync] +import com.google.cloud.compute.v1.ListTargetHttpsProxiesRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + ListTargetHttpsProxiesRequest request = + ListTargetHttpsProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (TargetHttpsProxy element : targetHttpsProxiesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/SyncListString.java new file mode 100644 index 000000000000..ae72de9e270f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_List_String_sync] +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + for (TargetHttpsProxy element : targetHttpsProxiesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/AsyncPatch.java new file mode 100644 index 000000000000..d2c683892205 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + PatchTargetHttpsProxyRequest request = + PatchTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + ApiFuture future = targetHttpsProxiesClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..0cb07c05b65a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + PatchTargetHttpsProxyRequest request = + PatchTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + OperationFuture future = + targetHttpsProxiesClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/SyncPatch.java new file mode 100644 index 000000000000..0bcb73f6e492 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + PatchTargetHttpsProxyRequest request = + PatchTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setTargetHttpsProxyResource(TargetHttpsProxy.newBuilder().build()) + .build(); + Operation response = targetHttpsProxiesClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/SyncPatchStringStringTargethttpsproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/SyncPatchStringStringTargethttpsproxy.java new file mode 100644 index 000000000000..c719127e7d44 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/patch/SyncPatchStringStringTargethttpsproxy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_Patch_StringStringTargethttpsproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxy; + +public class SyncPatchStringStringTargethttpsproxy { + + public static void main(String[] args) throws Exception { + syncPatchStringStringTargethttpsproxy(); + } + + public static void syncPatchStringStringTargethttpsproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build(); + Operation response = + targetHttpsProxiesClient + .patchAsync(project, targetHttpsProxy, targetHttpsProxyResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_Patch_StringStringTargethttpsproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/AsyncSetCertificateMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/AsyncSetCertificateMap.java new file mode 100644 index 000000000000..00b55ea9f02a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/AsyncSetCertificateMap.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetCertificateMap_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequest; +import com.google.longrunning.Operation; + +public class AsyncSetCertificateMap { + + public static void main(String[] args) throws Exception { + asyncSetCertificateMap(); + } + + public static void asyncSetCertificateMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetCertificateMapTargetHttpsProxyRequest request = + SetCertificateMapTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetCertificateMapRequestResource( + TargetHttpsProxiesSetCertificateMapRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = + targetHttpsProxiesClient.setCertificateMapCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetCertificateMap_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/AsyncSetCertificateMapLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/AsyncSetCertificateMapLRO.java new file mode 100644 index 000000000000..8948aa6d87ea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/AsyncSetCertificateMapLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetCertificateMap_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequest; + +public class AsyncSetCertificateMapLRO { + + public static void main(String[] args) throws Exception { + asyncSetCertificateMapLRO(); + } + + public static void asyncSetCertificateMapLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetCertificateMapTargetHttpsProxyRequest request = + SetCertificateMapTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetCertificateMapRequestResource( + TargetHttpsProxiesSetCertificateMapRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + OperationFuture future = + targetHttpsProxiesClient.setCertificateMapOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetCertificateMap_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/SyncSetCertificateMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/SyncSetCertificateMap.java new file mode 100644 index 000000000000..a3fe4342d5a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/SyncSetCertificateMap.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetCertificateMap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequest; + +public class SyncSetCertificateMap { + + public static void main(String[] args) throws Exception { + syncSetCertificateMap(); + } + + public static void syncSetCertificateMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetCertificateMapTargetHttpsProxyRequest request = + SetCertificateMapTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetCertificateMapRequestResource( + TargetHttpsProxiesSetCertificateMapRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + Operation response = targetHttpsProxiesClient.setCertificateMapAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetCertificateMap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/SyncSetCertificateMapStringStringTargethttpsproxiessetcertificatemaprequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/SyncSetCertificateMapStringStringTargethttpsproxiessetcertificatemaprequest.java new file mode 100644 index 000000000000..c1bea8052b3e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setcertificatemap/SyncSetCertificateMapStringStringTargethttpsproxiessetcertificatemaprequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetCertificateMap_StringStringTargethttpsproxiessetcertificatemaprequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequest; + +public class SyncSetCertificateMapStringStringTargethttpsproxiessetcertificatemaprequest { + + public static void main(String[] args) throws Exception { + syncSetCertificateMapStringStringTargethttpsproxiessetcertificatemaprequest(); + } + + public static void syncSetCertificateMapStringStringTargethttpsproxiessetcertificatemaprequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + TargetHttpsProxiesSetCertificateMapRequest + targetHttpsProxiesSetCertificateMapRequestResource = + TargetHttpsProxiesSetCertificateMapRequest.newBuilder().build(); + Operation response = + targetHttpsProxiesClient + .setCertificateMapAsync( + project, targetHttpsProxy, targetHttpsProxiesSetCertificateMapRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetCertificateMap_StringStringTargethttpsproxiessetcertificatemaprequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/AsyncSetQuicOverride.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/AsyncSetQuicOverride.java new file mode 100644 index 000000000000..3ca029a454ee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/AsyncSetQuicOverride.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetQuicOverride_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest; +import com.google.longrunning.Operation; + +public class AsyncSetQuicOverride { + + public static void main(String[] args) throws Exception { + asyncSetQuicOverride(); + } + + public static void asyncSetQuicOverride() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetQuicOverrideTargetHttpsProxyRequest request = + SetQuicOverrideTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetQuicOverrideRequestResource( + TargetHttpsProxiesSetQuicOverrideRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = + targetHttpsProxiesClient.setQuicOverrideCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetQuicOverride_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/AsyncSetQuicOverrideLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/AsyncSetQuicOverrideLRO.java new file mode 100644 index 000000000000..9cabac5f31b2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/AsyncSetQuicOverrideLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetQuicOverride_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest; + +public class AsyncSetQuicOverrideLRO { + + public static void main(String[] args) throws Exception { + asyncSetQuicOverrideLRO(); + } + + public static void asyncSetQuicOverrideLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetQuicOverrideTargetHttpsProxyRequest request = + SetQuicOverrideTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetQuicOverrideRequestResource( + TargetHttpsProxiesSetQuicOverrideRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + OperationFuture future = + targetHttpsProxiesClient.setQuicOverrideOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetQuicOverride_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/SyncSetQuicOverride.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/SyncSetQuicOverride.java new file mode 100644 index 000000000000..d7fb680120b0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/SyncSetQuicOverride.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetQuicOverride_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest; + +public class SyncSetQuicOverride { + + public static void main(String[] args) throws Exception { + syncSetQuicOverride(); + } + + public static void syncSetQuicOverride() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetQuicOverrideTargetHttpsProxyRequest request = + SetQuicOverrideTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetQuicOverrideRequestResource( + TargetHttpsProxiesSetQuicOverrideRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + Operation response = targetHttpsProxiesClient.setQuicOverrideAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetQuicOverride_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/SyncSetQuicOverrideStringStringTargethttpsproxiessetquicoverriderequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/SyncSetQuicOverrideStringStringTargethttpsproxiessetquicoverriderequest.java new file mode 100644 index 000000000000..b518bfe1467a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setquicoverride/SyncSetQuicOverrideStringStringTargethttpsproxiessetquicoverriderequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetQuicOverride_StringStringTargethttpsproxiessetquicoverriderequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest; + +public class SyncSetQuicOverrideStringStringTargethttpsproxiessetquicoverriderequest { + + public static void main(String[] args) throws Exception { + syncSetQuicOverrideStringStringTargethttpsproxiessetquicoverriderequest(); + } + + public static void syncSetQuicOverrideStringStringTargethttpsproxiessetquicoverriderequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + TargetHttpsProxiesSetQuicOverrideRequest targetHttpsProxiesSetQuicOverrideRequestResource = + TargetHttpsProxiesSetQuicOverrideRequest.newBuilder().build(); + Operation response = + targetHttpsProxiesClient + .setQuicOverrideAsync( + project, targetHttpsProxy, targetHttpsProxiesSetQuicOverrideRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetQuicOverride_StringStringTargethttpsproxiessetquicoverriderequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/AsyncSetSslCertificates.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/AsyncSetSslCertificates.java new file mode 100644 index 000000000000..dc9046fb1a4b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/AsyncSetSslCertificates.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetSslCertificates_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest; +import com.google.longrunning.Operation; + +public class AsyncSetSslCertificates { + + public static void main(String[] args) throws Exception { + asyncSetSslCertificates(); + } + + public static void asyncSetSslCertificates() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetSslCertificatesTargetHttpsProxyRequest request = + SetSslCertificatesTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetSslCertificatesRequestResource( + TargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = + targetHttpsProxiesClient.setSslCertificatesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetSslCertificates_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java new file mode 100644 index 000000000000..54e3e1d88c6e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetSslCertificates_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest; + +public class AsyncSetSslCertificatesLRO { + + public static void main(String[] args) throws Exception { + asyncSetSslCertificatesLRO(); + } + + public static void asyncSetSslCertificatesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetSslCertificatesTargetHttpsProxyRequest request = + SetSslCertificatesTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetSslCertificatesRequestResource( + TargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + OperationFuture future = + targetHttpsProxiesClient.setSslCertificatesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetSslCertificates_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/SyncSetSslCertificates.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/SyncSetSslCertificates.java new file mode 100644 index 000000000000..52c33b396f8a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/SyncSetSslCertificates.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetSslCertificates_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest; + +public class SyncSetSslCertificates { + + public static void main(String[] args) throws Exception { + syncSetSslCertificates(); + } + + public static void syncSetSslCertificates() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetSslCertificatesTargetHttpsProxyRequest request = + SetSslCertificatesTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxiesSetSslCertificatesRequestResource( + TargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + Operation response = targetHttpsProxiesClient.setSslCertificatesAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetSslCertificates_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/SyncSetSslCertificatesStringStringTargethttpsproxiessetsslcertificatesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/SyncSetSslCertificatesStringStringTargethttpsproxiessetsslcertificatesrequest.java new file mode 100644 index 000000000000..916b29bbfae9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslcertificates/SyncSetSslCertificatesStringStringTargethttpsproxiessetsslcertificatesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetSslCertificates_StringStringTargethttpsproxiessetsslcertificatesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest; + +public class SyncSetSslCertificatesStringStringTargethttpsproxiessetsslcertificatesrequest { + + public static void main(String[] args) throws Exception { + syncSetSslCertificatesStringStringTargethttpsproxiessetsslcertificatesrequest(); + } + + public static void syncSetSslCertificatesStringStringTargethttpsproxiessetsslcertificatesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + TargetHttpsProxiesSetSslCertificatesRequest + targetHttpsProxiesSetSslCertificatesRequestResource = + TargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build(); + Operation response = + targetHttpsProxiesClient + .setSslCertificatesAsync( + project, targetHttpsProxy, targetHttpsProxiesSetSslCertificatesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetSslCertificates_StringStringTargethttpsproxiessetsslcertificatesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/AsyncSetSslPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/AsyncSetSslPolicy.java new file mode 100644 index 000000000000..e362d4468e92 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/AsyncSetSslPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetSslPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.SslPolicyReference; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncSetSslPolicy { + + public static void main(String[] args) throws Exception { + asyncSetSslPolicy(); + } + + public static void asyncSetSslPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetSslPolicyTargetHttpsProxyRequest request = + SetSslPolicyTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyReferenceResource(SslPolicyReference.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + ApiFuture future = + targetHttpsProxiesClient.setSslPolicyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetSslPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/AsyncSetSslPolicyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/AsyncSetSslPolicyLRO.java new file mode 100644 index 000000000000..3c2b0c49c696 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/AsyncSetSslPolicyLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetSslPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.SslPolicyReference; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; + +public class AsyncSetSslPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncSetSslPolicyLRO(); + } + + public static void asyncSetSslPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetSslPolicyTargetHttpsProxyRequest request = + SetSslPolicyTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyReferenceResource(SslPolicyReference.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + OperationFuture future = + targetHttpsProxiesClient.setSslPolicyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetSslPolicy_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/SyncSetSslPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/SyncSetSslPolicy.java new file mode 100644 index 000000000000..5dfb075e8547 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/SyncSetSslPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetSslPolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.SslPolicyReference; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; + +public class SyncSetSslPolicy { + + public static void main(String[] args) throws Exception { + syncSetSslPolicy(); + } + + public static void syncSetSslPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetSslPolicyTargetHttpsProxyRequest request = + SetSslPolicyTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyReferenceResource(SslPolicyReference.newBuilder().build()) + .setTargetHttpsProxy("targetHttpsProxy833943732") + .build(); + Operation response = targetHttpsProxiesClient.setSslPolicyAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetSslPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/SyncSetSslPolicyStringStringSslpolicyreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/SyncSetSslPolicyStringStringSslpolicyreference.java new file mode 100644 index 000000000000..e48a37ad997f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/setsslpolicy/SyncSetSslPolicyStringStringSslpolicyreference.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetSslPolicy_StringStringSslpolicyreference_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPolicyReference; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; + +public class SyncSetSslPolicyStringStringSslpolicyreference { + + public static void main(String[] args) throws Exception { + syncSetSslPolicyStringStringSslpolicyreference(); + } + + public static void syncSetSslPolicyStringStringSslpolicyreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build(); + Operation response = + targetHttpsProxiesClient + .setSslPolicyAsync(project, targetHttpsProxy, sslPolicyReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetSslPolicy_StringStringSslpolicyreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/AsyncSetUrlMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/AsyncSetUrlMap.java new file mode 100644 index 000000000000..ece6e290f1e2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/AsyncSetUrlMap.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetUrlMap_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; +import com.google.longrunning.Operation; + +public class AsyncSetUrlMap { + + public static void main(String[] args) throws Exception { + asyncSetUrlMap(); + } + + public static void asyncSetUrlMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetUrlMapTargetHttpsProxyRequest request = + SetUrlMapTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + ApiFuture future = + targetHttpsProxiesClient.setUrlMapCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetUrlMap_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/AsyncSetUrlMapLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/AsyncSetUrlMapLRO.java new file mode 100644 index 000000000000..a9b8e3f6334c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/AsyncSetUrlMapLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetUrlMap_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; + +public class AsyncSetUrlMapLRO { + + public static void main(String[] args) throws Exception { + asyncSetUrlMapLRO(); + } + + public static void asyncSetUrlMapLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetUrlMapTargetHttpsProxyRequest request = + SetUrlMapTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + OperationFuture future = + targetHttpsProxiesClient.setUrlMapOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetUrlMap_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/SyncSetUrlMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/SyncSetUrlMap.java new file mode 100644 index 000000000000..c100f4fbb1a4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/SyncSetUrlMap.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetUrlMap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; + +public class SyncSetUrlMap { + + public static void main(String[] args) throws Exception { + syncSetUrlMap(); + } + + public static void syncSetUrlMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + SetUrlMapTargetHttpsProxyRequest request = + SetUrlMapTargetHttpsProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetHttpsProxy("targetHttpsProxy833943732") + .setUrlMapReferenceResource(UrlMapReference.newBuilder().build()) + .build(); + Operation response = targetHttpsProxiesClient.setUrlMapAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetUrlMap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/SyncSetUrlMapStringStringUrlmapreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/SyncSetUrlMapStringStringUrlmapreference.java new file mode 100644 index 000000000000..fbccbc267a48 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxies/seturlmap/SyncSetUrlMapStringStringUrlmapreference.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxies_SetUrlMap_StringStringUrlmapreference_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetHttpsProxiesClient; +import com.google.cloud.compute.v1.UrlMapReference; + +public class SyncSetUrlMapStringStringUrlmapreference { + + public static void main(String[] args) throws Exception { + syncSetUrlMapStringStringUrlmapreference(); + } + + public static void syncSetUrlMapStringStringUrlmapreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.create()) { + String project = "project-309310695"; + String targetHttpsProxy = "targetHttpsProxy833943732"; + UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build(); + Operation response = + targetHttpsProxiesClient + .setUrlMapAsync(project, targetHttpsProxy, urlMapReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetHttpsProxies_SetUrlMap_StringStringUrlmapreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxiessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxiessettings/get/SyncGet.java new file mode 100644 index 000000000000..d09089ffbdad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targethttpsproxiessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetHttpsProxiesSettings_Get_sync] +import com.google.cloud.compute.v1.TargetHttpsProxiesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetHttpsProxiesSettings.Builder targetHttpsProxiesSettingsBuilder = + TargetHttpsProxiesSettings.newBuilder(); + targetHttpsProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetHttpsProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetHttpsProxiesSettings targetHttpsProxiesSettings = + targetHttpsProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetHttpsProxiesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..3c8b03784d4c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListTargetInstancesRequest; +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.cloud.compute.v1.TargetInstancesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + AggregatedListTargetInstancesRequest request = + AggregatedListTargetInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + targetInstancesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetInstances_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..afa5dcb151ac --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListTargetInstancesRequest; +import com.google.cloud.compute.v1.TargetInstanceAggregatedList; +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.cloud.compute.v1.TargetInstancesScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + AggregatedListTargetInstancesRequest request = + AggregatedListTargetInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetInstanceAggregatedList response = + targetInstancesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetInstances_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..9e3863d9df32 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListTargetInstancesRequest; +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.cloud.compute.v1.TargetInstancesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + AggregatedListTargetInstancesRequest request = + AggregatedListTargetInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + targetInstancesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetInstances_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..c5ac01eac111 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_AggregatedList_String_sync] +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.cloud.compute.v1.TargetInstancesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + targetInstancesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetInstances_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..1a838c24d0fe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.cloud.compute.v1.TargetInstancesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetInstancesSettings targetInstancesSettings = + TargetInstancesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TargetInstancesClient targetInstancesClient = + TargetInstancesClient.create(targetInstancesSettings); + } +} +// [END compute_v1_generated_TargetInstances_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..0ad79586c5f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.cloud.compute.v1.TargetInstancesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetInstancesSettings targetInstancesSettings = + TargetInstancesSettings.newBuilder().setEndpoint(myEndpoint).build(); + TargetInstancesClient targetInstancesClient = + TargetInstancesClient.create(targetInstancesSettings); + } +} +// [END compute_v1_generated_TargetInstances_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/AsyncDelete.java new file mode 100644 index 000000000000..ee0ef008bba7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteTargetInstanceRequest; +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + DeleteTargetInstanceRequest request = + DeleteTargetInstanceRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetInstance("targetInstance-1036957370") + .setZone("zone3744684") + .build(); + ApiFuture future = targetInstancesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..518c8e53f4f9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteTargetInstanceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + DeleteTargetInstanceRequest request = + DeleteTargetInstanceRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetInstance("targetInstance-1036957370") + .setZone("zone3744684") + .build(); + OperationFuture future = + targetInstancesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/SyncDelete.java new file mode 100644 index 000000000000..b02226432b00 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Delete_sync] +import com.google.cloud.compute.v1.DeleteTargetInstanceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + DeleteTargetInstanceRequest request = + DeleteTargetInstanceRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetInstance("targetInstance-1036957370") + .setZone("zone3744684") + .build(); + Operation response = targetInstancesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..aa6a904b19f2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String targetInstance = "targetInstance-1036957370"; + Operation response = targetInstancesClient.deleteAsync(project, zone, targetInstance).get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/AsyncGet.java new file mode 100644 index 000000000000..03c9dac40d6c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetTargetInstanceRequest; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + GetTargetInstanceRequest request = + GetTargetInstanceRequest.newBuilder() + .setProject("project-309310695") + .setTargetInstance("targetInstance-1036957370") + .setZone("zone3744684") + .build(); + ApiFuture future = targetInstancesClient.getCallable().futureCall(request); + // Do something. + TargetInstance response = future.get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/SyncGet.java new file mode 100644 index 000000000000..8601cc2d1090 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Get_sync] +import com.google.cloud.compute.v1.GetTargetInstanceRequest; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + GetTargetInstanceRequest request = + GetTargetInstanceRequest.newBuilder() + .setProject("project-309310695") + .setTargetInstance("targetInstance-1036957370") + .setZone("zone3744684") + .build(); + TargetInstance response = targetInstancesClient.get(request); + } + } +} +// [END compute_v1_generated_TargetInstances_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..1b0172b42b31 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Get_StringStringString_sync] +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String targetInstance = "targetInstance-1036957370"; + TargetInstance response = targetInstancesClient.get(project, zone, targetInstance); + } + } +} +// [END compute_v1_generated_TargetInstances_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/AsyncInsert.java new file mode 100644 index 000000000000..2e1d1a9f96e4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertTargetInstanceRequest; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + InsertTargetInstanceRequest request = + InsertTargetInstanceRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetInstanceResource(TargetInstance.newBuilder().build()) + .setZone("zone3744684") + .build(); + ApiFuture future = targetInstancesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..1aaa595335a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertTargetInstanceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + InsertTargetInstanceRequest request = + InsertTargetInstanceRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetInstanceResource(TargetInstance.newBuilder().build()) + .setZone("zone3744684") + .build(); + OperationFuture future = + targetInstancesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/SyncInsert.java new file mode 100644 index 000000000000..ccca70d7be40 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Insert_sync] +import com.google.cloud.compute.v1.InsertTargetInstanceRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + InsertTargetInstanceRequest request = + InsertTargetInstanceRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetInstanceResource(TargetInstance.newBuilder().build()) + .setZone("zone3744684") + .build(); + Operation response = targetInstancesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/SyncInsertStringStringTargetinstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/SyncInsertStringStringTargetinstance.java new file mode 100644 index 000000000000..fda3390050af --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/insert/SyncInsertStringStringTargetinstance.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_Insert_StringStringTargetinstance_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class SyncInsertStringStringTargetinstance { + + public static void main(String[] args) throws Exception { + syncInsertStringStringTargetinstance(); + } + + public static void syncInsertStringStringTargetinstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + TargetInstance targetInstanceResource = TargetInstance.newBuilder().build(); + Operation response = + targetInstancesClient.insertAsync(project, zone, targetInstanceResource).get(); + } + } +} +// [END compute_v1_generated_TargetInstances_Insert_StringStringTargetinstance_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/AsyncList.java new file mode 100644 index 000000000000..ceed9a7ef907 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListTargetInstancesRequest; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + ListTargetInstancesRequest request = + ListTargetInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = + targetInstancesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetInstance element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetInstances_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/AsyncListPaged.java new file mode 100644 index 000000000000..319b4bc4e3c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_List_Paged_async] +import com.google.cloud.compute.v1.ListTargetInstancesRequest; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstanceList; +import com.google.cloud.compute.v1.TargetInstancesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + ListTargetInstancesRequest request = + ListTargetInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + TargetInstanceList response = targetInstancesClient.listCallable().call(request); + for (TargetInstance element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetInstances_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/SyncList.java new file mode 100644 index 000000000000..ed9d5abce879 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_List_sync] +import com.google.cloud.compute.v1.ListTargetInstancesRequest; +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + ListTargetInstancesRequest request = + ListTargetInstancesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (TargetInstance element : targetInstancesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetInstances_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/SyncListStringString.java new file mode 100644 index 000000000000..d86fd79c6b3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstances_List_StringString_sync] +import com.google.cloud.compute.v1.TargetInstance; +import com.google.cloud.compute.v1.TargetInstancesClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetInstancesClient targetInstancesClient = TargetInstancesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (TargetInstance element : targetInstancesClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetInstances_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstancessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstancessettings/get/SyncGet.java new file mode 100644 index 000000000000..830213206cfa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstancessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetInstancesSettings_Get_sync] +import com.google.cloud.compute.v1.TargetInstancesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetInstancesSettings.Builder targetInstancesSettingsBuilder = + TargetInstancesSettings.newBuilder(); + targetInstancesSettingsBuilder + .getSettings() + .setRetrySettings( + targetInstancesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetInstancesSettings targetInstancesSettings = targetInstancesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetInstancesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/AsyncAddHealthCheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/AsyncAddHealthCheck.java new file mode 100644 index 000000000000..01410cc8c271 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/AsyncAddHealthCheck.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AddHealthCheck_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.longrunning.Operation; + +public class AsyncAddHealthCheck { + + public static void main(String[] args) throws Exception { + asyncAddHealthCheck(); + } + + public static void asyncAddHealthCheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AddHealthCheckTargetPoolRequest request = + AddHealthCheckTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsAddHealthCheckRequestResource( + TargetPoolsAddHealthCheckRequest.newBuilder().build()) + .build(); + ApiFuture future = targetPoolsClient.addHealthCheckCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_AddHealthCheck_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/AsyncAddHealthCheckLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/AsyncAddHealthCheckLRO.java new file mode 100644 index 000000000000..588f373526c9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/AsyncAddHealthCheckLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AddHealthCheck_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class AsyncAddHealthCheckLRO { + + public static void main(String[] args) throws Exception { + asyncAddHealthCheckLRO(); + } + + public static void asyncAddHealthCheckLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AddHealthCheckTargetPoolRequest request = + AddHealthCheckTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsAddHealthCheckRequestResource( + TargetPoolsAddHealthCheckRequest.newBuilder().build()) + .build(); + OperationFuture future = + targetPoolsClient.addHealthCheckOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_AddHealthCheck_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/SyncAddHealthCheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/SyncAddHealthCheck.java new file mode 100644 index 000000000000..41fb74023915 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/SyncAddHealthCheck.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AddHealthCheck_sync] +import com.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncAddHealthCheck { + + public static void main(String[] args) throws Exception { + syncAddHealthCheck(); + } + + public static void syncAddHealthCheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AddHealthCheckTargetPoolRequest request = + AddHealthCheckTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsAddHealthCheckRequestResource( + TargetPoolsAddHealthCheckRequest.newBuilder().build()) + .build(); + Operation response = targetPoolsClient.addHealthCheckAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetPools_AddHealthCheck_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/SyncAddHealthCheckStringStringStringTargetpoolsaddhealthcheckrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/SyncAddHealthCheckStringStringStringTargetpoolsaddhealthcheckrequest.java new file mode 100644 index 000000000000..69bd97c672a9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addhealthcheck/SyncAddHealthCheckStringStringStringTargetpoolsaddhealthcheckrequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AddHealthCheck_StringStringStringTargetpoolsaddhealthcheckrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncAddHealthCheckStringStringStringTargetpoolsaddhealthcheckrequest { + + public static void main(String[] args) throws Exception { + syncAddHealthCheckStringStringStringTargetpoolsaddhealthcheckrequest(); + } + + public static void syncAddHealthCheckStringStringStringTargetpoolsaddhealthcheckrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetPool = "targetPool486493517"; + TargetPoolsAddHealthCheckRequest targetPoolsAddHealthCheckRequestResource = + TargetPoolsAddHealthCheckRequest.newBuilder().build(); + Operation response = + targetPoolsClient + .addHealthCheckAsync( + project, region, targetPool, targetPoolsAddHealthCheckRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetPools_AddHealthCheck_StringStringStringTargetpoolsaddhealthcheckrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/AsyncAddInstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/AsyncAddInstance.java new file mode 100644 index 000000000000..86b064e47c60 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/AsyncAddInstance.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AddInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AddInstanceTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.longrunning.Operation; + +public class AsyncAddInstance { + + public static void main(String[] args) throws Exception { + asyncAddInstance(); + } + + public static void asyncAddInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AddInstanceTargetPoolRequest request = + AddInstanceTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsAddInstanceRequestResource( + TargetPoolsAddInstanceRequest.newBuilder().build()) + .build(); + ApiFuture future = targetPoolsClient.addInstanceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_AddInstance_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/AsyncAddInstanceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/AsyncAddInstanceLRO.java new file mode 100644 index 000000000000..bf9992199d4f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/AsyncAddInstanceLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AddInstance_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.AddInstanceTargetPoolRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class AsyncAddInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncAddInstanceLRO(); + } + + public static void asyncAddInstanceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AddInstanceTargetPoolRequest request = + AddInstanceTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsAddInstanceRequestResource( + TargetPoolsAddInstanceRequest.newBuilder().build()) + .build(); + OperationFuture future = + targetPoolsClient.addInstanceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_AddInstance_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/SyncAddInstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/SyncAddInstance.java new file mode 100644 index 000000000000..fc569dd7dedb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/SyncAddInstance.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AddInstance_sync] +import com.google.cloud.compute.v1.AddInstanceTargetPoolRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncAddInstance { + + public static void main(String[] args) throws Exception { + syncAddInstance(); + } + + public static void syncAddInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AddInstanceTargetPoolRequest request = + AddInstanceTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsAddInstanceRequestResource( + TargetPoolsAddInstanceRequest.newBuilder().build()) + .build(); + Operation response = targetPoolsClient.addInstanceAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetPools_AddInstance_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/SyncAddInstanceStringStringStringTargetpoolsaddinstancerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/SyncAddInstanceStringStringStringTargetpoolsaddinstancerequest.java new file mode 100644 index 000000000000..18466733e94c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/addinstance/SyncAddInstanceStringStringStringTargetpoolsaddinstancerequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AddInstance_StringStringStringTargetpoolsaddinstancerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncAddInstanceStringStringStringTargetpoolsaddinstancerequest { + + public static void main(String[] args) throws Exception { + syncAddInstanceStringStringStringTargetpoolsaddinstancerequest(); + } + + public static void syncAddInstanceStringStringStringTargetpoolsaddinstancerequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetPool = "targetPool486493517"; + TargetPoolsAddInstanceRequest targetPoolsAddInstanceRequestResource = + TargetPoolsAddInstanceRequest.newBuilder().build(); + Operation response = + targetPoolsClient + .addInstanceAsync(project, region, targetPool, targetPoolsAddInstanceRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetPools_AddInstance_StringStringStringTargetpoolsaddinstancerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..bb11555f81fb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListTargetPoolsRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AggregatedListTargetPoolsRequest request = + AggregatedListTargetPoolsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + targetPoolsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetPools_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..ae8a7df25c7e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListTargetPoolsRequest; +import com.google.cloud.compute.v1.TargetPoolAggregatedList; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AggregatedListTargetPoolsRequest request = + AggregatedListTargetPoolsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetPoolAggregatedList response = + targetPoolsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetPools_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..f7d0145a0052 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListTargetPoolsRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + AggregatedListTargetPoolsRequest request = + AggregatedListTargetPoolsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + targetPoolsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetPools_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..9a72905ae97d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_AggregatedList_String_sync] +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + targetPoolsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetPools_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ad4367c58642 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetPoolsSettings targetPoolsSettings = + TargetPoolsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TargetPoolsClient targetPoolsClient = TargetPoolsClient.create(targetPoolsSettings); + } +} +// [END compute_v1_generated_TargetPools_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e93a7a41ff73 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetPoolsSettings targetPoolsSettings = + TargetPoolsSettings.newBuilder().setEndpoint(myEndpoint).build(); + TargetPoolsClient targetPoolsClient = TargetPoolsClient.create(targetPoolsSettings); + } +} +// [END compute_v1_generated_TargetPools_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/AsyncDelete.java new file mode 100644 index 000000000000..c7ff8f7fee8b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + DeleteTargetPoolRequest request = + DeleteTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .build(); + ApiFuture future = targetPoolsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..e08d54c23fea --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteTargetPoolRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + DeleteTargetPoolRequest request = + DeleteTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .build(); + OperationFuture future = + targetPoolsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/SyncDelete.java new file mode 100644 index 000000000000..549e6de906ee --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Delete_sync] +import com.google.cloud.compute.v1.DeleteTargetPoolRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + DeleteTargetPoolRequest request = + DeleteTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .build(); + Operation response = targetPoolsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetPools_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..7a6f30f46574 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetPool = "targetPool486493517"; + Operation response = targetPoolsClient.deleteAsync(project, region, targetPool).get(); + } + } +} +// [END compute_v1_generated_TargetPools_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/AsyncGet.java new file mode 100644 index 000000000000..b661f32418c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + GetTargetPoolRequest request = + GetTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetPool("targetPool486493517") + .build(); + ApiFuture future = targetPoolsClient.getCallable().futureCall(request); + // Do something. + TargetPool response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/SyncGet.java new file mode 100644 index 000000000000..f5ce0c2a5976 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Get_sync] +import com.google.cloud.compute.v1.GetTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + GetTargetPoolRequest request = + GetTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetPool("targetPool486493517") + .build(); + TargetPool response = targetPoolsClient.get(request); + } + } +} +// [END compute_v1_generated_TargetPools_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..6f359ea81bb5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Get_StringStringString_sync] +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetPool = "targetPool486493517"; + TargetPool response = targetPoolsClient.get(project, region, targetPool); + } + } +} +// [END compute_v1_generated_TargetPools_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/AsyncGetHealth.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/AsyncGetHealth.java new file mode 100644 index 000000000000..d1f2a1b56a90 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/AsyncGetHealth.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_GetHealth_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetHealthTargetPoolRequest; +import com.google.cloud.compute.v1.InstanceReference; +import com.google.cloud.compute.v1.TargetPoolInstanceHealth; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class AsyncGetHealth { + + public static void main(String[] args) throws Exception { + asyncGetHealth(); + } + + public static void asyncGetHealth() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + GetHealthTargetPoolRequest request = + GetHealthTargetPoolRequest.newBuilder() + .setInstanceReferenceResource(InstanceReference.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetPool("targetPool486493517") + .build(); + ApiFuture future = + targetPoolsClient.getHealthCallable().futureCall(request); + // Do something. + TargetPoolInstanceHealth response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_GetHealth_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/SyncGetHealth.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/SyncGetHealth.java new file mode 100644 index 000000000000..88e6b84cface --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/SyncGetHealth.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_GetHealth_sync] +import com.google.cloud.compute.v1.GetHealthTargetPoolRequest; +import com.google.cloud.compute.v1.InstanceReference; +import com.google.cloud.compute.v1.TargetPoolInstanceHealth; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncGetHealth { + + public static void main(String[] args) throws Exception { + syncGetHealth(); + } + + public static void syncGetHealth() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + GetHealthTargetPoolRequest request = + GetHealthTargetPoolRequest.newBuilder() + .setInstanceReferenceResource(InstanceReference.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetPool("targetPool486493517") + .build(); + TargetPoolInstanceHealth response = targetPoolsClient.getHealth(request); + } + } +} +// [END compute_v1_generated_TargetPools_GetHealth_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/SyncGetHealthStringStringStringInstancereference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/SyncGetHealthStringStringStringInstancereference.java new file mode 100644 index 000000000000..ba09ac9fa5e8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/gethealth/SyncGetHealthStringStringStringInstancereference.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_GetHealth_StringStringStringInstancereference_sync] +import com.google.cloud.compute.v1.InstanceReference; +import com.google.cloud.compute.v1.TargetPoolInstanceHealth; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncGetHealthStringStringStringInstancereference { + + public static void main(String[] args) throws Exception { + syncGetHealthStringStringStringInstancereference(); + } + + public static void syncGetHealthStringStringStringInstancereference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetPool = "targetPool486493517"; + InstanceReference instanceReferenceResource = InstanceReference.newBuilder().build(); + TargetPoolInstanceHealth response = + targetPoolsClient.getHealth(project, region, targetPool, instanceReferenceResource); + } + } +} +// [END compute_v1_generated_TargetPools_GetHealth_StringStringStringInstancereference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/AsyncInsert.java new file mode 100644 index 000000000000..4bc97959196c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + InsertTargetPoolRequest request = + InsertTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPoolResource(TargetPool.newBuilder().build()) + .build(); + ApiFuture future = targetPoolsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..a6ae3c7cc7d3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertTargetPoolRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + InsertTargetPoolRequest request = + InsertTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPoolResource(TargetPool.newBuilder().build()) + .build(); + OperationFuture future = + targetPoolsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/SyncInsert.java new file mode 100644 index 000000000000..247e2a0863e9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Insert_sync] +import com.google.cloud.compute.v1.InsertTargetPoolRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + InsertTargetPoolRequest request = + InsertTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPoolResource(TargetPool.newBuilder().build()) + .build(); + Operation response = targetPoolsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetPools_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/SyncInsertStringStringTargetpool.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/SyncInsertStringStringTargetpool.java new file mode 100644 index 000000000000..2caa55815d9c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/insert/SyncInsertStringStringTargetpool.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_Insert_StringStringTargetpool_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncInsertStringStringTargetpool { + + public static void main(String[] args) throws Exception { + syncInsertStringStringTargetpool(); + } + + public static void syncInsertStringStringTargetpool() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + TargetPool targetPoolResource = TargetPool.newBuilder().build(); + Operation response = targetPoolsClient.insertAsync(project, region, targetPoolResource).get(); + } + } +} +// [END compute_v1_generated_TargetPools_Insert_StringStringTargetpool_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/AsyncList.java new file mode 100644 index 000000000000..d2ff9ecc9119 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListTargetPoolsRequest; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + ListTargetPoolsRequest request = + ListTargetPoolsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = targetPoolsClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetPool element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetPools_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/AsyncListPaged.java new file mode 100644 index 000000000000..cd0b749c68fd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_List_Paged_async] +import com.google.cloud.compute.v1.ListTargetPoolsRequest; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolList; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + ListTargetPoolsRequest request = + ListTargetPoolsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetPoolList response = targetPoolsClient.listCallable().call(request); + for (TargetPool element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetPools_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/SyncList.java new file mode 100644 index 000000000000..f186ac101cfa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_List_sync] +import com.google.cloud.compute.v1.ListTargetPoolsRequest; +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + ListTargetPoolsRequest request = + ListTargetPoolsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (TargetPool element : targetPoolsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetPools_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/SyncListStringString.java new file mode 100644 index 000000000000..eb89d1ee8195 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_List_StringString_sync] +import com.google.cloud.compute.v1.TargetPool; +import com.google.cloud.compute.v1.TargetPoolsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (TargetPool element : targetPoolsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetPools_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/AsyncRemoveHealthCheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/AsyncRemoveHealthCheck.java new file mode 100644 index 000000000000..0683501c6040 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/AsyncRemoveHealthCheck.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_RemoveHealthCheck_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveHealthCheck { + + public static void main(String[] args) throws Exception { + asyncRemoveHealthCheck(); + } + + public static void asyncRemoveHealthCheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + RemoveHealthCheckTargetPoolRequest request = + RemoveHealthCheckTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsRemoveHealthCheckRequestResource( + TargetPoolsRemoveHealthCheckRequest.newBuilder().build()) + .build(); + ApiFuture future = + targetPoolsClient.removeHealthCheckCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_RemoveHealthCheck_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/AsyncRemoveHealthCheckLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/AsyncRemoveHealthCheckLRO.java new file mode 100644 index 000000000000..8d1f0d4cd2e6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/AsyncRemoveHealthCheckLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_RemoveHealthCheck_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest; + +public class AsyncRemoveHealthCheckLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveHealthCheckLRO(); + } + + public static void asyncRemoveHealthCheckLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + RemoveHealthCheckTargetPoolRequest request = + RemoveHealthCheckTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsRemoveHealthCheckRequestResource( + TargetPoolsRemoveHealthCheckRequest.newBuilder().build()) + .build(); + OperationFuture future = + targetPoolsClient.removeHealthCheckOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_RemoveHealthCheck_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/SyncRemoveHealthCheck.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/SyncRemoveHealthCheck.java new file mode 100644 index 000000000000..cdaaba02ff00 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/SyncRemoveHealthCheck.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_RemoveHealthCheck_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest; + +public class SyncRemoveHealthCheck { + + public static void main(String[] args) throws Exception { + syncRemoveHealthCheck(); + } + + public static void syncRemoveHealthCheck() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + RemoveHealthCheckTargetPoolRequest request = + RemoveHealthCheckTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsRemoveHealthCheckRequestResource( + TargetPoolsRemoveHealthCheckRequest.newBuilder().build()) + .build(); + Operation response = targetPoolsClient.removeHealthCheckAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetPools_RemoveHealthCheck_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/SyncRemoveHealthCheckStringStringStringTargetpoolsremovehealthcheckrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/SyncRemoveHealthCheckStringStringStringTargetpoolsremovehealthcheckrequest.java new file mode 100644 index 000000000000..8a5904074ebe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removehealthcheck/SyncRemoveHealthCheckStringStringStringTargetpoolsremovehealthcheckrequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_RemoveHealthCheck_StringStringStringTargetpoolsremovehealthcheckrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest; + +public class SyncRemoveHealthCheckStringStringStringTargetpoolsremovehealthcheckrequest { + + public static void main(String[] args) throws Exception { + syncRemoveHealthCheckStringStringStringTargetpoolsremovehealthcheckrequest(); + } + + public static void syncRemoveHealthCheckStringStringStringTargetpoolsremovehealthcheckrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetPool = "targetPool486493517"; + TargetPoolsRemoveHealthCheckRequest targetPoolsRemoveHealthCheckRequestResource = + TargetPoolsRemoveHealthCheckRequest.newBuilder().build(); + Operation response = + targetPoolsClient + .removeHealthCheckAsync( + project, region, targetPool, targetPoolsRemoveHealthCheckRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetPools_RemoveHealthCheck_StringStringStringTargetpoolsremovehealthcheckrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/AsyncRemoveInstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/AsyncRemoveInstance.java new file mode 100644 index 000000000000..e52dc4fb5b31 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/AsyncRemoveInstance.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_RemoveInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest; +import com.google.longrunning.Operation; + +public class AsyncRemoveInstance { + + public static void main(String[] args) throws Exception { + asyncRemoveInstance(); + } + + public static void asyncRemoveInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + RemoveInstanceTargetPoolRequest request = + RemoveInstanceTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsRemoveInstanceRequestResource( + TargetPoolsRemoveInstanceRequest.newBuilder().build()) + .build(); + ApiFuture future = targetPoolsClient.removeInstanceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_RemoveInstance_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/AsyncRemoveInstanceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/AsyncRemoveInstanceLRO.java new file mode 100644 index 000000000000..16cae0597a1b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/AsyncRemoveInstanceLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_RemoveInstance_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest; + +public class AsyncRemoveInstanceLRO { + + public static void main(String[] args) throws Exception { + asyncRemoveInstanceLRO(); + } + + public static void asyncRemoveInstanceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + RemoveInstanceTargetPoolRequest request = + RemoveInstanceTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsRemoveInstanceRequestResource( + TargetPoolsRemoveInstanceRequest.newBuilder().build()) + .build(); + OperationFuture future = + targetPoolsClient.removeInstanceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_RemoveInstance_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/SyncRemoveInstance.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/SyncRemoveInstance.java new file mode 100644 index 000000000000..5c9ce3f74acb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/SyncRemoveInstance.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_RemoveInstance_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest; + +public class SyncRemoveInstance { + + public static void main(String[] args) throws Exception { + syncRemoveInstance(); + } + + public static void syncRemoveInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + RemoveInstanceTargetPoolRequest request = + RemoveInstanceTargetPoolRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetPoolsRemoveInstanceRequestResource( + TargetPoolsRemoveInstanceRequest.newBuilder().build()) + .build(); + Operation response = targetPoolsClient.removeInstanceAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetPools_RemoveInstance_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/SyncRemoveInstanceStringStringStringTargetpoolsremoveinstancerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/SyncRemoveInstanceStringStringStringTargetpoolsremoveinstancerequest.java new file mode 100644 index 000000000000..e9b7a8340ef0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/removeinstance/SyncRemoveInstanceStringStringStringTargetpoolsremoveinstancerequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_RemoveInstance_StringStringStringTargetpoolsremoveinstancerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest; + +public class SyncRemoveInstanceStringStringStringTargetpoolsremoveinstancerequest { + + public static void main(String[] args) throws Exception { + syncRemoveInstanceStringStringStringTargetpoolsremoveinstancerequest(); + } + + public static void syncRemoveInstanceStringStringStringTargetpoolsremoveinstancerequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetPool = "targetPool486493517"; + TargetPoolsRemoveInstanceRequest targetPoolsRemoveInstanceRequestResource = + TargetPoolsRemoveInstanceRequest.newBuilder().build(); + Operation response = + targetPoolsClient + .removeInstanceAsync( + project, region, targetPool, targetPoolsRemoveInstanceRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetPools_RemoveInstance_StringStringStringTargetpoolsremoveinstancerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/AsyncSetBackup.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/AsyncSetBackup.java new file mode 100644 index 000000000000..00bda9a26782 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/AsyncSetBackup.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_SetBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetBackupTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetReference; +import com.google.longrunning.Operation; + +public class AsyncSetBackup { + + public static void main(String[] args) throws Exception { + asyncSetBackup(); + } + + public static void asyncSetBackup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + SetBackupTargetPoolRequest request = + SetBackupTargetPoolRequest.newBuilder() + .setFailoverRatio(-861074818) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + ApiFuture future = targetPoolsClient.setBackupCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_SetBackup_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/AsyncSetBackupLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/AsyncSetBackupLRO.java new file mode 100644 index 000000000000..d1482c7e8c9e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/AsyncSetBackupLRO.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_SetBackup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetBackupTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetReference; + +public class AsyncSetBackupLRO { + + public static void main(String[] args) throws Exception { + asyncSetBackupLRO(); + } + + public static void asyncSetBackupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + SetBackupTargetPoolRequest request = + SetBackupTargetPoolRequest.newBuilder() + .setFailoverRatio(-861074818) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + OperationFuture future = + targetPoolsClient.setBackupOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetPools_SetBackup_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/SyncSetBackup.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/SyncSetBackup.java new file mode 100644 index 000000000000..09bdc7f3e559 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/SyncSetBackup.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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_SetBackup_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetBackupTargetPoolRequest; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetReference; + +public class SyncSetBackup { + + public static void main(String[] args) throws Exception { + syncSetBackup(); + } + + public static void syncSetBackup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + SetBackupTargetPoolRequest request = + SetBackupTargetPoolRequest.newBuilder() + .setFailoverRatio(-861074818) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetPool("targetPool486493517") + .setTargetReferenceResource(TargetReference.newBuilder().build()) + .build(); + Operation response = targetPoolsClient.setBackupAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetPools_SetBackup_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/SyncSetBackupStringStringStringTargetreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/SyncSetBackupStringStringStringTargetreference.java new file mode 100644 index 000000000000..790d8766b91e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/setbackup/SyncSetBackupStringStringStringTargetreference.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPools_SetBackup_StringStringStringTargetreference_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetPoolsClient; +import com.google.cloud.compute.v1.TargetReference; + +public class SyncSetBackupStringStringStringTargetreference { + + public static void main(String[] args) throws Exception { + syncSetBackupStringStringStringTargetreference(); + } + + public static void syncSetBackupStringStringStringTargetreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetPoolsClient targetPoolsClient = TargetPoolsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetPool = "targetPool486493517"; + TargetReference targetReferenceResource = TargetReference.newBuilder().build(); + Operation response = + targetPoolsClient + .setBackupAsync(project, region, targetPool, targetReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetPools_SetBackup_StringStringStringTargetreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpoolssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpoolssettings/get/SyncGet.java new file mode 100644 index 000000000000..8d457e552d9f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpoolssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetPoolsSettings_Get_sync] +import com.google.cloud.compute.v1.TargetPoolsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetPoolsSettings.Builder targetPoolsSettingsBuilder = TargetPoolsSettings.newBuilder(); + targetPoolsSettingsBuilder + .getSettings() + .setRetrySettings( + targetPoolsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetPoolsSettings targetPoolsSettings = targetPoolsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetPoolsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..606a9cdf2b35 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetSslProxiesSettings targetSslProxiesSettings = + TargetSslProxiesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TargetSslProxiesClient targetSslProxiesClient = + TargetSslProxiesClient.create(targetSslProxiesSettings); + } +} +// [END compute_v1_generated_TargetSslProxies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..674b998cf66d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetSslProxiesSettings targetSslProxiesSettings = + TargetSslProxiesSettings.newBuilder().setEndpoint(myEndpoint).build(); + TargetSslProxiesClient targetSslProxiesClient = + TargetSslProxiesClient.create(targetSslProxiesSettings); + } +} +// [END compute_v1_generated_TargetSslProxies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/AsyncDelete.java new file mode 100644 index 000000000000..d403709bff0c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + DeleteTargetSslProxyRequest request = + DeleteTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + ApiFuture future = targetSslProxiesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..3d0bf6db8266 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteTargetSslProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + DeleteTargetSslProxyRequest request = + DeleteTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + OperationFuture future = + targetSslProxiesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/SyncDelete.java new file mode 100644 index 000000000000..aaf7109fdda5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Delete_sync] +import com.google.cloud.compute.v1.DeleteTargetSslProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + DeleteTargetSslProxyRequest request = + DeleteTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + Operation response = targetSslProxiesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..83405376ee28 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + String targetSslProxy = "targetSslProxy-879314829"; + Operation response = targetSslProxiesClient.deleteAsync(project, targetSslProxy).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/AsyncGet.java new file mode 100644 index 000000000000..0383554d40ad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + GetTargetSslProxyRequest request = + GetTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + ApiFuture future = targetSslProxiesClient.getCallable().futureCall(request); + // Do something. + TargetSslProxy response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/SyncGet.java new file mode 100644 index 000000000000..88c01b154ce0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Get_sync] +import com.google.cloud.compute.v1.GetTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + GetTargetSslProxyRequest request = + GetTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + TargetSslProxy response = targetSslProxiesClient.get(request); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/SyncGetStringString.java new file mode 100644 index 000000000000..6ee6dbd4e70f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Get_StringString_sync] +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + String targetSslProxy = "targetSslProxy-879314829"; + TargetSslProxy response = targetSslProxiesClient.get(project, targetSslProxy); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/AsyncInsert.java new file mode 100644 index 000000000000..1f2798eb2ee5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + InsertTargetSslProxyRequest request = + InsertTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxyResource(TargetSslProxy.newBuilder().build()) + .build(); + ApiFuture future = targetSslProxiesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..79bd7d0141bf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertTargetSslProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + InsertTargetSslProxyRequest request = + InsertTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxyResource(TargetSslProxy.newBuilder().build()) + .build(); + OperationFuture future = + targetSslProxiesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/SyncInsert.java new file mode 100644 index 000000000000..68d4c85907c4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Insert_sync] +import com.google.cloud.compute.v1.InsertTargetSslProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + InsertTargetSslProxyRequest request = + InsertTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxyResource(TargetSslProxy.newBuilder().build()) + .build(); + Operation response = targetSslProxiesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/SyncInsertStringTargetsslproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/SyncInsertStringTargetsslproxy.java new file mode 100644 index 000000000000..fc8edef16c54 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/insert/SyncInsertStringTargetsslproxy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_Insert_StringTargetsslproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class SyncInsertStringTargetsslproxy { + + public static void main(String[] args) throws Exception { + syncInsertStringTargetsslproxy(); + } + + public static void syncInsertStringTargetsslproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + TargetSslProxy targetSslProxyResource = TargetSslProxy.newBuilder().build(); + Operation response = + targetSslProxiesClient.insertAsync(project, targetSslProxyResource).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_Insert_StringTargetsslproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/AsyncList.java new file mode 100644 index 000000000000..7910a5616d9d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListTargetSslProxiesRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + ListTargetSslProxiesRequest request = + ListTargetSslProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + targetSslProxiesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetSslProxy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetSslProxies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/AsyncListPaged.java new file mode 100644 index 000000000000..aea09823d22a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_List_Paged_async] +import com.google.cloud.compute.v1.ListTargetSslProxiesRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; +import com.google.cloud.compute.v1.TargetSslProxyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + ListTargetSslProxiesRequest request = + ListTargetSslProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetSslProxyList response = targetSslProxiesClient.listCallable().call(request); + for (TargetSslProxy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetSslProxies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/SyncList.java new file mode 100644 index 000000000000..b8f4b4317af1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_List_sync] +import com.google.cloud.compute.v1.ListTargetSslProxiesRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + ListTargetSslProxiesRequest request = + ListTargetSslProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (TargetSslProxy element : targetSslProxiesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetSslProxies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/SyncListString.java new file mode 100644 index 000000000000..75a0fe1fd8a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_List_String_sync] +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxy; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + for (TargetSslProxy element : targetSslProxiesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetSslProxies_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/AsyncSetBackendService.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/AsyncSetBackendService.java new file mode 100644 index 000000000000..29cc31293ea8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/AsyncSetBackendService.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetBackendService_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetBackendService { + + public static void main(String[] args) throws Exception { + asyncSetBackendService(); + } + + public static void asyncSetBackendService() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetBackendServiceTargetSslProxyRequest request = + SetBackendServiceTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetBackendServiceRequestResource( + TargetSslProxiesSetBackendServiceRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + ApiFuture future = + targetSslProxiesClient.setBackendServiceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetBackendService_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/AsyncSetBackendServiceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/AsyncSetBackendServiceLRO.java new file mode 100644 index 000000000000..9e1093a4d3d1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/AsyncSetBackendServiceLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetBackendService_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequest; + +public class AsyncSetBackendServiceLRO { + + public static void main(String[] args) throws Exception { + asyncSetBackendServiceLRO(); + } + + public static void asyncSetBackendServiceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetBackendServiceTargetSslProxyRequest request = + SetBackendServiceTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetBackendServiceRequestResource( + TargetSslProxiesSetBackendServiceRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + OperationFuture future = + targetSslProxiesClient.setBackendServiceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetBackendService_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/SyncSetBackendService.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/SyncSetBackendService.java new file mode 100644 index 000000000000..57b76e6634c3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/SyncSetBackendService.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetBackendService_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequest; + +public class SyncSetBackendService { + + public static void main(String[] args) throws Exception { + syncSetBackendService(); + } + + public static void syncSetBackendService() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetBackendServiceTargetSslProxyRequest request = + SetBackendServiceTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetBackendServiceRequestResource( + TargetSslProxiesSetBackendServiceRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + Operation response = targetSslProxiesClient.setBackendServiceAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetBackendService_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/SyncSetBackendServiceStringStringTargetsslproxiessetbackendservicerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/SyncSetBackendServiceStringStringTargetsslproxiessetbackendservicerequest.java new file mode 100644 index 000000000000..f04705664cd5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setbackendservice/SyncSetBackendServiceStringStringTargetsslproxiessetbackendservicerequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetBackendService_StringStringTargetsslproxiessetbackendservicerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequest; + +public class SyncSetBackendServiceStringStringTargetsslproxiessetbackendservicerequest { + + public static void main(String[] args) throws Exception { + syncSetBackendServiceStringStringTargetsslproxiessetbackendservicerequest(); + } + + public static void syncSetBackendServiceStringStringTargetsslproxiessetbackendservicerequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + String targetSslProxy = "targetSslProxy-879314829"; + TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = + TargetSslProxiesSetBackendServiceRequest.newBuilder().build(); + Operation response = + targetSslProxiesClient + .setBackendServiceAsync( + project, targetSslProxy, targetSslProxiesSetBackendServiceRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetBackendService_StringStringTargetsslproxiessetbackendservicerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/AsyncSetCertificateMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/AsyncSetCertificateMap.java new file mode 100644 index 000000000000..ea6b960c6265 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/AsyncSetCertificateMap.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetCertificateMap_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequest; +import com.google.longrunning.Operation; + +public class AsyncSetCertificateMap { + + public static void main(String[] args) throws Exception { + asyncSetCertificateMap(); + } + + public static void asyncSetCertificateMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetCertificateMapTargetSslProxyRequest request = + SetCertificateMapTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetCertificateMapRequestResource( + TargetSslProxiesSetCertificateMapRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + ApiFuture future = + targetSslProxiesClient.setCertificateMapCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetCertificateMap_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/AsyncSetCertificateMapLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/AsyncSetCertificateMapLRO.java new file mode 100644 index 000000000000..3749b2a9c21f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/AsyncSetCertificateMapLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetCertificateMap_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequest; + +public class AsyncSetCertificateMapLRO { + + public static void main(String[] args) throws Exception { + asyncSetCertificateMapLRO(); + } + + public static void asyncSetCertificateMapLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetCertificateMapTargetSslProxyRequest request = + SetCertificateMapTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetCertificateMapRequestResource( + TargetSslProxiesSetCertificateMapRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + OperationFuture future = + targetSslProxiesClient.setCertificateMapOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetCertificateMap_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/SyncSetCertificateMap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/SyncSetCertificateMap.java new file mode 100644 index 000000000000..ce9cb56adffb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/SyncSetCertificateMap.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetCertificateMap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequest; + +public class SyncSetCertificateMap { + + public static void main(String[] args) throws Exception { + syncSetCertificateMap(); + } + + public static void syncSetCertificateMap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetCertificateMapTargetSslProxyRequest request = + SetCertificateMapTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetCertificateMapRequestResource( + TargetSslProxiesSetCertificateMapRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + Operation response = targetSslProxiesClient.setCertificateMapAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetCertificateMap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/SyncSetCertificateMapStringStringTargetsslproxiessetcertificatemaprequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/SyncSetCertificateMapStringStringTargetsslproxiessetcertificatemaprequest.java new file mode 100644 index 000000000000..869e83ae088a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setcertificatemap/SyncSetCertificateMapStringStringTargetsslproxiessetcertificatemaprequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetCertificateMap_StringStringTargetsslproxiessetcertificatemaprequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequest; + +public class SyncSetCertificateMapStringStringTargetsslproxiessetcertificatemaprequest { + + public static void main(String[] args) throws Exception { + syncSetCertificateMapStringStringTargetsslproxiessetcertificatemaprequest(); + } + + public static void syncSetCertificateMapStringStringTargetsslproxiessetcertificatemaprequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + String targetSslProxy = "targetSslProxy-879314829"; + TargetSslProxiesSetCertificateMapRequest targetSslProxiesSetCertificateMapRequestResource = + TargetSslProxiesSetCertificateMapRequest.newBuilder().build(); + Operation response = + targetSslProxiesClient + .setCertificateMapAsync( + project, targetSslProxy, targetSslProxiesSetCertificateMapRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetCertificateMap_StringStringTargetsslproxiessetcertificatemaprequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/AsyncSetProxyHeader.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/AsyncSetProxyHeader.java new file mode 100644 index 000000000000..f03dbe0b9548 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/AsyncSetProxyHeader.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetProxyHeader_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequest; +import com.google.longrunning.Operation; + +public class AsyncSetProxyHeader { + + public static void main(String[] args) throws Exception { + asyncSetProxyHeader(); + } + + public static void asyncSetProxyHeader() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetProxyHeaderTargetSslProxyRequest request = + SetProxyHeaderTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetProxyHeaderRequestResource( + TargetSslProxiesSetProxyHeaderRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + ApiFuture future = + targetSslProxiesClient.setProxyHeaderCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetProxyHeader_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/AsyncSetProxyHeaderLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/AsyncSetProxyHeaderLRO.java new file mode 100644 index 000000000000..76ca4dfec70f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/AsyncSetProxyHeaderLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetProxyHeader_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequest; + +public class AsyncSetProxyHeaderLRO { + + public static void main(String[] args) throws Exception { + asyncSetProxyHeaderLRO(); + } + + public static void asyncSetProxyHeaderLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetProxyHeaderTargetSslProxyRequest request = + SetProxyHeaderTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetProxyHeaderRequestResource( + TargetSslProxiesSetProxyHeaderRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + OperationFuture future = + targetSslProxiesClient.setProxyHeaderOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetProxyHeader_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/SyncSetProxyHeader.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/SyncSetProxyHeader.java new file mode 100644 index 000000000000..e6e2ad3fa7bd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/SyncSetProxyHeader.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetProxyHeader_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequest; + +public class SyncSetProxyHeader { + + public static void main(String[] args) throws Exception { + syncSetProxyHeader(); + } + + public static void syncSetProxyHeader() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetProxyHeaderTargetSslProxyRequest request = + SetProxyHeaderTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetProxyHeaderRequestResource( + TargetSslProxiesSetProxyHeaderRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + Operation response = targetSslProxiesClient.setProxyHeaderAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetProxyHeader_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/SyncSetProxyHeaderStringStringTargetsslproxiessetproxyheaderrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/SyncSetProxyHeaderStringStringTargetsslproxiessetproxyheaderrequest.java new file mode 100644 index 000000000000..46e26783d343 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setproxyheader/SyncSetProxyHeaderStringStringTargetsslproxiessetproxyheaderrequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetProxyHeader_StringStringTargetsslproxiessetproxyheaderrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequest; + +public class SyncSetProxyHeaderStringStringTargetsslproxiessetproxyheaderrequest { + + public static void main(String[] args) throws Exception { + syncSetProxyHeaderStringStringTargetsslproxiessetproxyheaderrequest(); + } + + public static void syncSetProxyHeaderStringStringTargetsslproxiessetproxyheaderrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + String targetSslProxy = "targetSslProxy-879314829"; + TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource = + TargetSslProxiesSetProxyHeaderRequest.newBuilder().build(); + Operation response = + targetSslProxiesClient + .setProxyHeaderAsync( + project, targetSslProxy, targetSslProxiesSetProxyHeaderRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetProxyHeader_StringStringTargetsslproxiessetproxyheaderrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/AsyncSetSslCertificates.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/AsyncSetSslCertificates.java new file mode 100644 index 000000000000..fc2145694d6c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/AsyncSetSslCertificates.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetSslCertificates_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest; +import com.google.longrunning.Operation; + +public class AsyncSetSslCertificates { + + public static void main(String[] args) throws Exception { + asyncSetSslCertificates(); + } + + public static void asyncSetSslCertificates() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetSslCertificatesTargetSslProxyRequest request = + SetSslCertificatesTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetSslCertificatesRequestResource( + TargetSslProxiesSetSslCertificatesRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + ApiFuture future = + targetSslProxiesClient.setSslCertificatesCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetSslCertificates_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java new file mode 100644 index 000000000000..ae3a8f3f7951 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/AsyncSetSslCertificatesLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetSslCertificates_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest; + +public class AsyncSetSslCertificatesLRO { + + public static void main(String[] args) throws Exception { + asyncSetSslCertificatesLRO(); + } + + public static void asyncSetSslCertificatesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetSslCertificatesTargetSslProxyRequest request = + SetSslCertificatesTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetSslCertificatesRequestResource( + TargetSslProxiesSetSslCertificatesRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + OperationFuture future = + targetSslProxiesClient.setSslCertificatesOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetSslCertificates_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/SyncSetSslCertificates.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/SyncSetSslCertificates.java new file mode 100644 index 000000000000..7f606047b541 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/SyncSetSslCertificates.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetSslCertificates_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest; + +public class SyncSetSslCertificates { + + public static void main(String[] args) throws Exception { + syncSetSslCertificates(); + } + + public static void syncSetSslCertificates() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetSslCertificatesTargetSslProxyRequest request = + SetSslCertificatesTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetSslProxiesSetSslCertificatesRequestResource( + TargetSslProxiesSetSslCertificatesRequest.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + Operation response = targetSslProxiesClient.setSslCertificatesAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetSslCertificates_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/SyncSetSslCertificatesStringStringTargetsslproxiessetsslcertificatesrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/SyncSetSslCertificatesStringStringTargetsslproxiessetsslcertificatesrequest.java new file mode 100644 index 000000000000..25e862a0433c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslcertificates/SyncSetSslCertificatesStringStringTargetsslproxiessetsslcertificatesrequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetSslCertificates_StringStringTargetsslproxiessetsslcertificatesrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest; + +public class SyncSetSslCertificatesStringStringTargetsslproxiessetsslcertificatesrequest { + + public static void main(String[] args) throws Exception { + syncSetSslCertificatesStringStringTargetsslproxiessetsslcertificatesrequest(); + } + + public static void syncSetSslCertificatesStringStringTargetsslproxiessetsslcertificatesrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + String targetSslProxy = "targetSslProxy-879314829"; + TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = + TargetSslProxiesSetSslCertificatesRequest.newBuilder().build(); + Operation response = + targetSslProxiesClient + .setSslCertificatesAsync( + project, targetSslProxy, targetSslProxiesSetSslCertificatesRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetSslCertificates_StringStringTargetsslproxiessetsslcertificatesrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/AsyncSetSslPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/AsyncSetSslPolicy.java new file mode 100644 index 000000000000..cfd428684619 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/AsyncSetSslPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetSslPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest; +import com.google.cloud.compute.v1.SslPolicyReference; +import com.google.cloud.compute.v1.TargetSslProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncSetSslPolicy { + + public static void main(String[] args) throws Exception { + asyncSetSslPolicy(); + } + + public static void asyncSetSslPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetSslPolicyTargetSslProxyRequest request = + SetSslPolicyTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyReferenceResource(SslPolicyReference.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + ApiFuture future = + targetSslProxiesClient.setSslPolicyCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetSslPolicy_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/AsyncSetSslPolicyLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/AsyncSetSslPolicyLRO.java new file mode 100644 index 000000000000..3bf50f3cf487 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/AsyncSetSslPolicyLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetSslPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest; +import com.google.cloud.compute.v1.SslPolicyReference; +import com.google.cloud.compute.v1.TargetSslProxiesClient; + +public class AsyncSetSslPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncSetSslPolicyLRO(); + } + + public static void asyncSetSslPolicyLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetSslPolicyTargetSslProxyRequest request = + SetSslPolicyTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyReferenceResource(SslPolicyReference.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + OperationFuture future = + targetSslProxiesClient.setSslPolicyOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetSslPolicy_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/SyncSetSslPolicy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/SyncSetSslPolicy.java new file mode 100644 index 000000000000..3f5684a4c43f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/SyncSetSslPolicy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetSslPolicy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest; +import com.google.cloud.compute.v1.SslPolicyReference; +import com.google.cloud.compute.v1.TargetSslProxiesClient; + +public class SyncSetSslPolicy { + + public static void main(String[] args) throws Exception { + syncSetSslPolicy(); + } + + public static void syncSetSslPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + SetSslPolicyTargetSslProxyRequest request = + SetSslPolicyTargetSslProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setSslPolicyReferenceResource(SslPolicyReference.newBuilder().build()) + .setTargetSslProxy("targetSslProxy-879314829") + .build(); + Operation response = targetSslProxiesClient.setSslPolicyAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetSslPolicy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/SyncSetSslPolicyStringStringSslpolicyreference.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/SyncSetSslPolicyStringStringSslpolicyreference.java new file mode 100644 index 000000000000..54c34ed37ec3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxies/setsslpolicy/SyncSetSslPolicyStringStringSslpolicyreference.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxies_SetSslPolicy_StringStringSslpolicyreference_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SslPolicyReference; +import com.google.cloud.compute.v1.TargetSslProxiesClient; + +public class SyncSetSslPolicyStringStringSslpolicyreference { + + public static void main(String[] args) throws Exception { + syncSetSslPolicyStringStringSslpolicyreference(); + } + + public static void syncSetSslPolicyStringStringSslpolicyreference() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.create()) { + String project = "project-309310695"; + String targetSslProxy = "targetSslProxy-879314829"; + SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build(); + Operation response = + targetSslProxiesClient + .setSslPolicyAsync(project, targetSslProxy, sslPolicyReferenceResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetSslProxies_SetSslPolicy_StringStringSslpolicyreference_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxiessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxiessettings/get/SyncGet.java new file mode 100644 index 000000000000..df5c5bbafa44 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetsslproxiessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetSslProxiesSettings_Get_sync] +import com.google.cloud.compute.v1.TargetSslProxiesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetSslProxiesSettings.Builder targetSslProxiesSettingsBuilder = + TargetSslProxiesSettings.newBuilder(); + targetSslProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetSslProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetSslProxiesSettings targetSslProxiesSettings = targetSslProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetSslProxiesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..c35e63a9d674 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + AggregatedListTargetTcpProxiesRequest request = + AggregatedListTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + targetTcpProxiesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetTcpProxies_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..efd01793ede4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesScopedList; +import com.google.cloud.compute.v1.TargetTcpProxyAggregatedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + AggregatedListTargetTcpProxiesRequest request = + AggregatedListTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetTcpProxyAggregatedList response = + targetTcpProxiesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetTcpProxies_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..28a9c02374fb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + AggregatedListTargetTcpProxiesRequest request = + AggregatedListTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + targetTcpProxiesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetTcpProxies_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..f87d1145c912 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_AggregatedList_String_sync] +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + targetTcpProxiesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetTcpProxies_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..8291b335f9dc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetTcpProxiesSettings targetTcpProxiesSettings = + TargetTcpProxiesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TargetTcpProxiesClient targetTcpProxiesClient = + TargetTcpProxiesClient.create(targetTcpProxiesSettings); + } +} +// [END compute_v1_generated_TargetTcpProxies_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..b2825c8e7f36 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetTcpProxiesSettings targetTcpProxiesSettings = + TargetTcpProxiesSettings.newBuilder().setEndpoint(myEndpoint).build(); + TargetTcpProxiesClient targetTcpProxiesClient = + TargetTcpProxiesClient.create(targetTcpProxiesSettings); + } +} +// [END compute_v1_generated_TargetTcpProxies_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/AsyncDelete.java new file mode 100644 index 000000000000..19abdd10f2b4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + DeleteTargetTcpProxyRequest request = + DeleteTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + ApiFuture future = targetTcpProxiesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..23465547f450 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteTargetTcpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + DeleteTargetTcpProxyRequest request = + DeleteTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + OperationFuture future = + targetTcpProxiesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/SyncDelete.java new file mode 100644 index 000000000000..52f50da6674b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Delete_sync] +import com.google.cloud.compute.v1.DeleteTargetTcpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + DeleteTargetTcpProxyRequest request = + DeleteTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + Operation response = targetTcpProxiesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..752bcc92ecfd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + String project = "project-309310695"; + String targetTcpProxy = "targetTcpProxy-337144898"; + Operation response = targetTcpProxiesClient.deleteAsync(project, targetTcpProxy).get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/AsyncGet.java new file mode 100644 index 000000000000..9f8e953c0f8e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + GetTargetTcpProxyRequest request = + GetTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + ApiFuture future = targetTcpProxiesClient.getCallable().futureCall(request); + // Do something. + TargetTcpProxy response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/SyncGet.java new file mode 100644 index 000000000000..ef3894ee475b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Get_sync] +import com.google.cloud.compute.v1.GetTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + GetTargetTcpProxyRequest request = + GetTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + TargetTcpProxy response = targetTcpProxiesClient.get(request); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/SyncGetStringString.java new file mode 100644 index 000000000000..42cc7345998e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Get_StringString_sync] +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + String project = "project-309310695"; + String targetTcpProxy = "targetTcpProxy-337144898"; + TargetTcpProxy response = targetTcpProxiesClient.get(project, targetTcpProxy); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/AsyncInsert.java new file mode 100644 index 000000000000..db815a3b0cc0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + InsertTargetTcpProxyRequest request = + InsertTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build()) + .build(); + ApiFuture future = targetTcpProxiesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..7951b75abdc7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertTargetTcpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + InsertTargetTcpProxyRequest request = + InsertTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build()) + .build(); + OperationFuture future = + targetTcpProxiesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/SyncInsert.java new file mode 100644 index 000000000000..ebe952e8344c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Insert_sync] +import com.google.cloud.compute.v1.InsertTargetTcpProxyRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + InsertTargetTcpProxyRequest request = + InsertTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build()) + .build(); + Operation response = targetTcpProxiesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/SyncInsertStringTargettcpproxy.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/SyncInsertStringTargettcpproxy.java new file mode 100644 index 000000000000..ffcc941d80e1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/insert/SyncInsertStringTargettcpproxy.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_Insert_StringTargettcpproxy_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncInsertStringTargettcpproxy { + + public static void main(String[] args) throws Exception { + syncInsertStringTargettcpproxy(); + } + + public static void syncInsertStringTargettcpproxy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + String project = "project-309310695"; + TargetTcpProxy targetTcpProxyResource = TargetTcpProxy.newBuilder().build(); + Operation response = + targetTcpProxiesClient.insertAsync(project, targetTcpProxyResource).get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_Insert_StringTargettcpproxy_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/AsyncList.java new file mode 100644 index 000000000000..4f25a08d7faa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + ListTargetTcpProxiesRequest request = + ListTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + targetTcpProxiesClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetTcpProxy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetTcpProxies_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/AsyncListPaged.java new file mode 100644 index 000000000000..847ff21b38aa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_List_Paged_async] +import com.google.cloud.compute.v1.ListTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; +import com.google.cloud.compute.v1.TargetTcpProxyList; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + ListTargetTcpProxiesRequest request = + ListTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetTcpProxyList response = targetTcpProxiesClient.listCallable().call(request); + for (TargetTcpProxy element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetTcpProxies_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/SyncList.java new file mode 100644 index 000000000000..c6c35fcadc5d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_List_sync] +import com.google.cloud.compute.v1.ListTargetTcpProxiesRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + ListTargetTcpProxiesRequest request = + ListTargetTcpProxiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (TargetTcpProxy element : targetTcpProxiesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetTcpProxies_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/SyncListString.java new file mode 100644 index 000000000000..6f862d0585f4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_List_String_sync] +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxy; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + String project = "project-309310695"; + for (TargetTcpProxy element : targetTcpProxiesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetTcpProxies_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/AsyncSetBackendService.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/AsyncSetBackendService.java new file mode 100644 index 000000000000..d392a70daebf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/AsyncSetBackendService.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_SetBackendService_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncSetBackendService { + + public static void main(String[] args) throws Exception { + asyncSetBackendService(); + } + + public static void asyncSetBackendService() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + SetBackendServiceTargetTcpProxyRequest request = + SetBackendServiceTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxiesSetBackendServiceRequestResource( + TargetTcpProxiesSetBackendServiceRequest.newBuilder().build()) + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + ApiFuture future = + targetTcpProxiesClient.setBackendServiceCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_SetBackendService_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/AsyncSetBackendServiceLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/AsyncSetBackendServiceLRO.java new file mode 100644 index 000000000000..6d6cfb34cb96 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/AsyncSetBackendServiceLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_SetBackendService_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequest; + +public class AsyncSetBackendServiceLRO { + + public static void main(String[] args) throws Exception { + asyncSetBackendServiceLRO(); + } + + public static void asyncSetBackendServiceLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + SetBackendServiceTargetTcpProxyRequest request = + SetBackendServiceTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxiesSetBackendServiceRequestResource( + TargetTcpProxiesSetBackendServiceRequest.newBuilder().build()) + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + OperationFuture future = + targetTcpProxiesClient.setBackendServiceOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_SetBackendService_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/SyncSetBackendService.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/SyncSetBackendService.java new file mode 100644 index 000000000000..71d3fd024967 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/SyncSetBackendService.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_SetBackendService_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequest; + +public class SyncSetBackendService { + + public static void main(String[] args) throws Exception { + syncSetBackendService(); + } + + public static void syncSetBackendService() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + SetBackendServiceTargetTcpProxyRequest request = + SetBackendServiceTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxiesSetBackendServiceRequestResource( + TargetTcpProxiesSetBackendServiceRequest.newBuilder().build()) + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + Operation response = targetTcpProxiesClient.setBackendServiceAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_SetBackendService_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/SyncSetBackendServiceStringStringTargettcpproxiessetbackendservicerequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/SyncSetBackendServiceStringStringTargettcpproxiessetbackendservicerequest.java new file mode 100644 index 000000000000..adcbe31e3872 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setbackendservice/SyncSetBackendServiceStringStringTargettcpproxiessetbackendservicerequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_SetBackendService_StringStringTargettcpproxiessetbackendservicerequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequest; + +public class SyncSetBackendServiceStringStringTargettcpproxiessetbackendservicerequest { + + public static void main(String[] args) throws Exception { + syncSetBackendServiceStringStringTargettcpproxiessetbackendservicerequest(); + } + + public static void syncSetBackendServiceStringStringTargettcpproxiessetbackendservicerequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + String project = "project-309310695"; + String targetTcpProxy = "targetTcpProxy-337144898"; + TargetTcpProxiesSetBackendServiceRequest targetTcpProxiesSetBackendServiceRequestResource = + TargetTcpProxiesSetBackendServiceRequest.newBuilder().build(); + Operation response = + targetTcpProxiesClient + .setBackendServiceAsync( + project, targetTcpProxy, targetTcpProxiesSetBackendServiceRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_SetBackendService_StringStringTargettcpproxiessetbackendservicerequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/AsyncSetProxyHeader.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/AsyncSetProxyHeader.java new file mode 100644 index 000000000000..459292301b58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/AsyncSetProxyHeader.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_SetProxyHeader_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequest; +import com.google.longrunning.Operation; + +public class AsyncSetProxyHeader { + + public static void main(String[] args) throws Exception { + asyncSetProxyHeader(); + } + + public static void asyncSetProxyHeader() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + SetProxyHeaderTargetTcpProxyRequest request = + SetProxyHeaderTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxiesSetProxyHeaderRequestResource( + TargetTcpProxiesSetProxyHeaderRequest.newBuilder().build()) + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + ApiFuture future = + targetTcpProxiesClient.setProxyHeaderCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_SetProxyHeader_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/AsyncSetProxyHeaderLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/AsyncSetProxyHeaderLRO.java new file mode 100644 index 000000000000..c2721fba583b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/AsyncSetProxyHeaderLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_SetProxyHeader_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequest; + +public class AsyncSetProxyHeaderLRO { + + public static void main(String[] args) throws Exception { + asyncSetProxyHeaderLRO(); + } + + public static void asyncSetProxyHeaderLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + SetProxyHeaderTargetTcpProxyRequest request = + SetProxyHeaderTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxiesSetProxyHeaderRequestResource( + TargetTcpProxiesSetProxyHeaderRequest.newBuilder().build()) + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + OperationFuture future = + targetTcpProxiesClient.setProxyHeaderOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_SetProxyHeader_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/SyncSetProxyHeader.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/SyncSetProxyHeader.java new file mode 100644 index 000000000000..ebe570762eca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/SyncSetProxyHeader.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_SetProxyHeader_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequest; + +public class SyncSetProxyHeader { + + public static void main(String[] args) throws Exception { + syncSetProxyHeader(); + } + + public static void syncSetProxyHeader() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + SetProxyHeaderTargetTcpProxyRequest request = + SetProxyHeaderTargetTcpProxyRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setTargetTcpProxiesSetProxyHeaderRequestResource( + TargetTcpProxiesSetProxyHeaderRequest.newBuilder().build()) + .setTargetTcpProxy("targetTcpProxy-337144898") + .build(); + Operation response = targetTcpProxiesClient.setProxyHeaderAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_SetProxyHeader_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/SyncSetProxyHeaderStringStringTargettcpproxiessetproxyheaderrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/SyncSetProxyHeaderStringStringTargettcpproxiessetproxyheaderrequest.java new file mode 100644 index 000000000000..df6b88dd2caf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxies/setproxyheader/SyncSetProxyHeaderStringStringTargettcpproxiessetproxyheaderrequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxies_SetProxyHeader_StringStringTargettcpproxiessetproxyheaderrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetTcpProxiesClient; +import com.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequest; + +public class SyncSetProxyHeaderStringStringTargettcpproxiessetproxyheaderrequest { + + public static void main(String[] args) throws Exception { + syncSetProxyHeaderStringStringTargettcpproxiessetproxyheaderrequest(); + } + + public static void syncSetProxyHeaderStringStringTargettcpproxiessetproxyheaderrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) { + String project = "project-309310695"; + String targetTcpProxy = "targetTcpProxy-337144898"; + TargetTcpProxiesSetProxyHeaderRequest targetTcpProxiesSetProxyHeaderRequestResource = + TargetTcpProxiesSetProxyHeaderRequest.newBuilder().build(); + Operation response = + targetTcpProxiesClient + .setProxyHeaderAsync( + project, targetTcpProxy, targetTcpProxiesSetProxyHeaderRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetTcpProxies_SetProxyHeader_StringStringTargettcpproxiessetproxyheaderrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxiessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxiessettings/get/SyncGet.java new file mode 100644 index 000000000000..6b3e1313d31b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targettcpproxiessettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetTcpProxiesSettings_Get_sync] +import com.google.cloud.compute.v1.TargetTcpProxiesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetTcpProxiesSettings.Builder targetTcpProxiesSettingsBuilder = + TargetTcpProxiesSettings.newBuilder(); + targetTcpProxiesSettingsBuilder + .getSettings() + .setRetrySettings( + targetTcpProxiesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetTcpProxiesSettings targetTcpProxiesSettings = targetTcpProxiesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetTcpProxiesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..d36af0e61bb1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.cloud.compute.v1.TargetVpnGatewaysScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + AggregatedListTargetVpnGatewaysRequest request = + AggregatedListTargetVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + targetVpnGatewaysClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetVpnGateways_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..231de9cc0b56 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest; +import com.google.cloud.compute.v1.TargetVpnGatewayAggregatedList; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.cloud.compute.v1.TargetVpnGatewaysScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + AggregatedListTargetVpnGatewaysRequest request = + AggregatedListTargetVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetVpnGatewayAggregatedList response = + targetVpnGatewaysClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetVpnGateways_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..29267c1acddd --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.cloud.compute.v1.TargetVpnGatewaysScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + AggregatedListTargetVpnGatewaysRequest request = + AggregatedListTargetVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + targetVpnGatewaysClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetVpnGateways_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..8d798abdc150 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_AggregatedList_String_sync] +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.cloud.compute.v1.TargetVpnGatewaysScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + targetVpnGatewaysClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetVpnGateways_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..f58042714de4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.cloud.compute.v1.TargetVpnGatewaysSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetVpnGatewaysSettings targetVpnGatewaysSettings = + TargetVpnGatewaysSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TargetVpnGatewaysClient targetVpnGatewaysClient = + TargetVpnGatewaysClient.create(targetVpnGatewaysSettings); + } +} +// [END compute_v1_generated_TargetVpnGateways_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..21886b828fa5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.cloud.compute.v1.TargetVpnGatewaysSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetVpnGatewaysSettings targetVpnGatewaysSettings = + TargetVpnGatewaysSettings.newBuilder().setEndpoint(myEndpoint).build(); + TargetVpnGatewaysClient targetVpnGatewaysClient = + TargetVpnGatewaysClient.create(targetVpnGatewaysSettings); + } +} +// [END compute_v1_generated_TargetVpnGateways_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/AsyncDelete.java new file mode 100644 index 000000000000..1a4518621468 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + DeleteTargetVpnGatewayRequest request = + DeleteTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetVpnGateway("targetVpnGateway935274273") + .build(); + ApiFuture future = targetVpnGatewaysClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..6d8dca5f1ca4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + DeleteTargetVpnGatewayRequest request = + DeleteTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetVpnGateway("targetVpnGateway935274273") + .build(); + OperationFuture future = + targetVpnGatewaysClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/SyncDelete.java new file mode 100644 index 000000000000..7cb00b639598 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Delete_sync] +import com.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + DeleteTargetVpnGatewayRequest request = + DeleteTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetVpnGateway("targetVpnGateway935274273") + .build(); + Operation response = targetVpnGatewaysClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..97cd6cf5c103 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetVpnGateway = "targetVpnGateway935274273"; + Operation response = + targetVpnGatewaysClient.deleteAsync(project, region, targetVpnGateway).get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/AsyncGet.java new file mode 100644 index 000000000000..eead7870bec9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + GetTargetVpnGatewayRequest request = + GetTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetVpnGateway("targetVpnGateway935274273") + .build(); + ApiFuture future = + targetVpnGatewaysClient.getCallable().futureCall(request); + // Do something. + TargetVpnGateway response = future.get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/SyncGet.java new file mode 100644 index 000000000000..f33d653688ed --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Get_sync] +import com.google.cloud.compute.v1.GetTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + GetTargetVpnGatewayRequest request = + GetTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setTargetVpnGateway("targetVpnGateway935274273") + .build(); + TargetVpnGateway response = targetVpnGatewaysClient.get(request); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..7ed2b5302169 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Get_StringStringString_sync] +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String targetVpnGateway = "targetVpnGateway935274273"; + TargetVpnGateway response = targetVpnGatewaysClient.get(project, region, targetVpnGateway); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/AsyncInsert.java new file mode 100644 index 000000000000..b10a2626ef11 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + InsertTargetVpnGatewayRequest request = + InsertTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetVpnGatewayResource(TargetVpnGateway.newBuilder().build()) + .build(); + ApiFuture future = targetVpnGatewaysClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..49a0f6f4e73f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + InsertTargetVpnGatewayRequest request = + InsertTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetVpnGatewayResource(TargetVpnGateway.newBuilder().build()) + .build(); + OperationFuture future = + targetVpnGatewaysClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/SyncInsert.java new file mode 100644 index 000000000000..0ff58168518a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Insert_sync] +import com.google.cloud.compute.v1.InsertTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + InsertTargetVpnGatewayRequest request = + InsertTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setTargetVpnGatewayResource(TargetVpnGateway.newBuilder().build()) + .build(); + Operation response = targetVpnGatewaysClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/SyncInsertStringStringTargetvpngateway.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/SyncInsertStringStringTargetvpngateway.java new file mode 100644 index 000000000000..bab9c3a3eea3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/insert/SyncInsertStringStringTargetvpngateway.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_Insert_StringStringTargetvpngateway_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncInsertStringStringTargetvpngateway { + + public static void main(String[] args) throws Exception { + syncInsertStringStringTargetvpngateway(); + } + + public static void syncInsertStringStringTargetvpngateway() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + TargetVpnGateway targetVpnGatewayResource = TargetVpnGateway.newBuilder().build(); + Operation response = + targetVpnGatewaysClient.insertAsync(project, region, targetVpnGatewayResource).get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_Insert_StringStringTargetvpngateway_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/AsyncList.java new file mode 100644 index 000000000000..258e3b1fb05c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/AsyncList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListTargetVpnGatewaysRequest; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + ListTargetVpnGatewaysRequest request = + ListTargetVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + targetVpnGatewaysClient.listPagedCallable().futureCall(request); + // Do something. + for (TargetVpnGateway element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetVpnGateways_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/AsyncListPaged.java new file mode 100644 index 000000000000..0026722c5e3c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_List_Paged_async] +import com.google.cloud.compute.v1.ListTargetVpnGatewaysRequest; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewayList; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + ListTargetVpnGatewaysRequest request = + ListTargetVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + TargetVpnGatewayList response = targetVpnGatewaysClient.listCallable().call(request); + for (TargetVpnGateway element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_TargetVpnGateways_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/SyncList.java new file mode 100644 index 000000000000..8ff9084c1f71 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_List_sync] +import com.google.cloud.compute.v1.ListTargetVpnGatewaysRequest; +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + ListTargetVpnGatewaysRequest request = + ListTargetVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (TargetVpnGateway element : targetVpnGatewaysClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetVpnGateways_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/SyncListStringString.java new file mode 100644 index 000000000000..17094bbe77ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_List_StringString_sync] +import com.google.cloud.compute.v1.TargetVpnGateway; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (TargetVpnGateway element : targetVpnGatewaysClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_TargetVpnGateways_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..c7ae41dfbd24 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + SetLabelsTargetVpnGatewayRequest request = + SetLabelsTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + ApiFuture future = targetVpnGatewaysClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..fef287af183e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + SetLabelsTargetVpnGatewayRequest request = + SetLabelsTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + OperationFuture future = + targetVpnGatewaysClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..f5ab71827ebf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_SetLabels_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + SetLabelsTargetVpnGatewayRequest request = + SetLabelsTargetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + Operation response = targetVpnGatewaysClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java new file mode 100644 index 000000000000..830c66feed3f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngateways/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGateways_SetLabels_StringStringStringRegionsetlabelsrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.TargetVpnGatewaysClient; + +public class SyncSetLabelsStringStringStringRegionsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringRegionsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringRegionsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetLabelsRequest regionSetLabelsRequestResource = + RegionSetLabelsRequest.newBuilder().build(); + Operation response = + targetVpnGatewaysClient + .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_TargetVpnGateways_SetLabels_StringStringStringRegionsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngatewayssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngatewayssettings/get/SyncGet.java new file mode 100644 index 000000000000..06dd2fbf1a82 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetvpngatewayssettings/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_TargetVpnGatewaysSettings_Get_sync] +import com.google.cloud.compute.v1.TargetVpnGatewaysSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TargetVpnGatewaysSettings.Builder targetVpnGatewaysSettingsBuilder = + TargetVpnGatewaysSettings.newBuilder(); + targetVpnGatewaysSettingsBuilder + .getSettings() + .setRetrySettings( + targetVpnGatewaysSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TargetVpnGatewaysSettings targetVpnGatewaysSettings = targetVpnGatewaysSettingsBuilder.build(); + } +} +// [END compute_v1_generated_TargetVpnGatewaysSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..56f0f1583524 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListUrlMapsRequest; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + AggregatedListUrlMapsRequest request = + AggregatedListUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + urlMapsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_UrlMaps_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..fb252fce12b7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListUrlMapsRequest; +import com.google.cloud.compute.v1.UrlMapsAggregatedList; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + AggregatedListUrlMapsRequest request = + AggregatedListUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + UrlMapsAggregatedList response = urlMapsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_UrlMaps_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..06881a2551cf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListUrlMapsRequest; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + AggregatedListUrlMapsRequest request = + AggregatedListUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + urlMapsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_UrlMaps_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..2dc8cfd62eb4 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_AggregatedList_String_sync] +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + urlMapsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_UrlMaps_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..711876fcd2f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UrlMapsSettings urlMapsSettings = + UrlMapsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + UrlMapsClient urlMapsClient = UrlMapsClient.create(urlMapsSettings); + } +} +// [END compute_v1_generated_UrlMaps_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a1104639aabe --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UrlMapsSettings urlMapsSettings = UrlMapsSettings.newBuilder().setEndpoint(myEndpoint).build(); + UrlMapsClient urlMapsClient = UrlMapsClient.create(urlMapsSettings); + } +} +// [END compute_v1_generated_UrlMaps_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/AsyncDelete.java new file mode 100644 index 000000000000..aea9fcb308ff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteUrlMapRequest; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + DeleteUrlMapRequest request = + DeleteUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + ApiFuture future = urlMapsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..a594a179471a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + DeleteUrlMapRequest request = + DeleteUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + OperationFuture future = + urlMapsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/SyncDelete.java new file mode 100644 index 000000000000..bae20a0d56ca --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Delete_sync] +import com.google.cloud.compute.v1.DeleteUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + DeleteUrlMapRequest request = + DeleteUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + Operation response = urlMapsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/SyncDeleteStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/SyncDeleteStringString.java new file mode 100644 index 000000000000..b90686b88840 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/delete/SyncDeleteStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Delete_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncDeleteStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringString(); + } + + public static void syncDeleteStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + String urlMap = "urlMap-836780691"; + Operation response = urlMapsClient.deleteAsync(project, urlMap).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Delete_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/AsyncGet.java new file mode 100644 index 000000000000..fdf15041ce7d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + GetUrlMapRequest request = + GetUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setUrlMap("urlMap-836780691") + .build(); + ApiFuture future = urlMapsClient.getCallable().futureCall(request); + // Do something. + UrlMap response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/SyncGet.java new file mode 100644 index 000000000000..0a4f9d9f9ab0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Get_sync] +import com.google.cloud.compute.v1.GetUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + GetUrlMapRequest request = + GetUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setUrlMap("urlMap-836780691") + .build(); + UrlMap response = urlMapsClient.get(request); + } + } +} +// [END compute_v1_generated_UrlMaps_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/SyncGetStringString.java new file mode 100644 index 000000000000..f33bc26c9056 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Get_StringString_sync] +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + String urlMap = "urlMap-836780691"; + UrlMap response = urlMapsClient.get(project, urlMap); + } + } +} +// [END compute_v1_generated_UrlMaps_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/AsyncInsert.java new file mode 100644 index 000000000000..3ef10b9f171b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + InsertUrlMapRequest request = + InsertUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + ApiFuture future = urlMapsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..c89a4a9a7f12 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/AsyncInsertLRO.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + InsertUrlMapRequest request = + InsertUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + OperationFuture future = + urlMapsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/SyncInsert.java new file mode 100644 index 000000000000..998d344b7321 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/SyncInsert.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Insert_sync] +import com.google.cloud.compute.v1.InsertUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + InsertUrlMapRequest request = + InsertUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + Operation response = urlMapsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/SyncInsertStringUrlmap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/SyncInsertStringUrlmap.java new file mode 100644 index 000000000000..f70f81e1a76d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/insert/SyncInsertStringUrlmap.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Insert_StringUrlmap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncInsertStringUrlmap { + + public static void main(String[] args) throws Exception { + syncInsertStringUrlmap(); + } + + public static void syncInsertStringUrlmap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + UrlMap urlMapResource = UrlMap.newBuilder().build(); + Operation response = urlMapsClient.insertAsync(project, urlMapResource).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Insert_StringUrlmap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/AsyncInvalidateCache.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/AsyncInvalidateCache.java new file mode 100644 index 000000000000..167296766b77 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/AsyncInvalidateCache.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_InvalidateCache_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.CacheInvalidationRule; +import com.google.cloud.compute.v1.InvalidateCacheUrlMapRequest; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.longrunning.Operation; + +public class AsyncInvalidateCache { + + public static void main(String[] args) throws Exception { + asyncInvalidateCache(); + } + + public static void asyncInvalidateCache() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + InvalidateCacheUrlMapRequest request = + InvalidateCacheUrlMapRequest.newBuilder() + .setCacheInvalidationRuleResource(CacheInvalidationRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + ApiFuture future = urlMapsClient.invalidateCacheCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_InvalidateCache_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/AsyncInvalidateCacheLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/AsyncInvalidateCacheLRO.java new file mode 100644 index 000000000000..4cf91e66f09c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/AsyncInvalidateCacheLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_InvalidateCache_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.CacheInvalidationRule; +import com.google.cloud.compute.v1.InvalidateCacheUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class AsyncInvalidateCacheLRO { + + public static void main(String[] args) throws Exception { + asyncInvalidateCacheLRO(); + } + + public static void asyncInvalidateCacheLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + InvalidateCacheUrlMapRequest request = + InvalidateCacheUrlMapRequest.newBuilder() + .setCacheInvalidationRuleResource(CacheInvalidationRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + OperationFuture future = + urlMapsClient.invalidateCacheOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_InvalidateCache_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/SyncInvalidateCache.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/SyncInvalidateCache.java new file mode 100644 index 000000000000..7725cc451f6d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/SyncInvalidateCache.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_InvalidateCache_sync] +import com.google.cloud.compute.v1.CacheInvalidationRule; +import com.google.cloud.compute.v1.InvalidateCacheUrlMapRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncInvalidateCache { + + public static void main(String[] args) throws Exception { + syncInvalidateCache(); + } + + public static void syncInvalidateCache() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + InvalidateCacheUrlMapRequest request = + InvalidateCacheUrlMapRequest.newBuilder() + .setCacheInvalidationRuleResource(CacheInvalidationRule.newBuilder().build()) + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .build(); + Operation response = urlMapsClient.invalidateCacheAsync(request).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_InvalidateCache_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/SyncInvalidateCacheStringStringCacheinvalidationrule.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/SyncInvalidateCacheStringStringCacheinvalidationrule.java new file mode 100644 index 000000000000..d3ec24127f8a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/invalidatecache/SyncInvalidateCacheStringStringCacheinvalidationrule.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_InvalidateCache_StringStringCacheinvalidationrule_sync] +import com.google.cloud.compute.v1.CacheInvalidationRule; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncInvalidateCacheStringStringCacheinvalidationrule { + + public static void main(String[] args) throws Exception { + syncInvalidateCacheStringStringCacheinvalidationrule(); + } + + public static void syncInvalidateCacheStringStringCacheinvalidationrule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + String urlMap = "urlMap-836780691"; + CacheInvalidationRule cacheInvalidationRuleResource = + CacheInvalidationRule.newBuilder().build(); + Operation response = + urlMapsClient.invalidateCacheAsync(project, urlMap, cacheInvalidationRuleResource).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_InvalidateCache_StringStringCacheinvalidationrule_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/AsyncList.java new file mode 100644 index 000000000000..fc20d33c6c5e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListUrlMapsRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + ListUrlMapsRequest request = + ListUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = urlMapsClient.listPagedCallable().futureCall(request); + // Do something. + for (UrlMap element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_UrlMaps_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/AsyncListPaged.java new file mode 100644 index 000000000000..4ccd487276ff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_List_Paged_async] +import com.google.cloud.compute.v1.ListUrlMapsRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapList; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + ListUrlMapsRequest request = + ListUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + UrlMapList response = urlMapsClient.listCallable().call(request); + for (UrlMap element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_UrlMaps_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/SyncList.java new file mode 100644 index 000000000000..6a8de318dcef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_List_sync] +import com.google.cloud.compute.v1.ListUrlMapsRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + ListUrlMapsRequest request = + ListUrlMapsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (UrlMap element : urlMapsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_UrlMaps_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/SyncListString.java new file mode 100644 index 000000000000..556a7c441417 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_List_String_sync] +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + for (UrlMap element : urlMapsClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_UrlMaps_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/AsyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/AsyncPatch.java new file mode 100644 index 000000000000..d917e6890bfc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/AsyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Patch_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.PatchUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.longrunning.Operation; + +public class AsyncPatch { + + public static void main(String[] args) throws Exception { + asyncPatch(); + } + + public static void asyncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + PatchUrlMapRequest request = + PatchUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + ApiFuture future = urlMapsClient.patchCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Patch_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/AsyncPatchLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/AsyncPatchLRO.java new file mode 100644 index 000000000000..d75024c8e7a2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/AsyncPatchLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Patch_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class AsyncPatchLRO { + + public static void main(String[] args) throws Exception { + asyncPatchLRO(); + } + + public static void asyncPatchLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + PatchUrlMapRequest request = + PatchUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + OperationFuture future = + urlMapsClient.patchOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Patch_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/SyncPatch.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/SyncPatch.java new file mode 100644 index 000000000000..8966ec65baa7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/SyncPatch.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Patch_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncPatch { + + public static void main(String[] args) throws Exception { + syncPatch(); + } + + public static void syncPatch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + PatchUrlMapRequest request = + PatchUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + Operation response = urlMapsClient.patchAsync(request).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Patch_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/SyncPatchStringStringUrlmap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/SyncPatchStringStringUrlmap.java new file mode 100644 index 000000000000..b4ce95cb3e86 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/patch/SyncPatchStringStringUrlmap.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Patch_StringStringUrlmap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncPatchStringStringUrlmap { + + public static void main(String[] args) throws Exception { + syncPatchStringStringUrlmap(); + } + + public static void syncPatchStringStringUrlmap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + String urlMap = "urlMap-836780691"; + UrlMap urlMapResource = UrlMap.newBuilder().build(); + Operation response = urlMapsClient.patchAsync(project, urlMap, urlMapResource).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Patch_StringStringUrlmap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/AsyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/AsyncUpdate.java new file mode 100644 index 000000000000..2cfe5a0ccd3c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/AsyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Update_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.UpdateUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.longrunning.Operation; + +public class AsyncUpdate { + + public static void main(String[] args) throws Exception { + asyncUpdate(); + } + + public static void asyncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + UpdateUrlMapRequest request = + UpdateUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + ApiFuture future = urlMapsClient.updateCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Update_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/AsyncUpdateLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/AsyncUpdateLRO.java new file mode 100644 index 000000000000..7fea5d375f5c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/AsyncUpdateLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Update_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class AsyncUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateLRO(); + } + + public static void asyncUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + UpdateUrlMapRequest request = + UpdateUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + OperationFuture future = + urlMapsClient.updateOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Update_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/SyncUpdate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/SyncUpdate.java new file mode 100644 index 000000000000..c8fae276143e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/SyncUpdate.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Update_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UpdateUrlMapRequest; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncUpdate { + + public static void main(String[] args) throws Exception { + syncUpdate(); + } + + public static void syncUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + UpdateUrlMapRequest request = + UpdateUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setRequestId("requestId693933066") + .setUrlMap("urlMap-836780691") + .setUrlMapResource(UrlMap.newBuilder().build()) + .build(); + Operation response = urlMapsClient.updateAsync(request).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Update_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/SyncUpdateStringStringUrlmap.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/SyncUpdateStringStringUrlmap.java new file mode 100644 index 000000000000..1b137c327ddc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/update/SyncUpdateStringStringUrlmap.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Update_StringStringUrlmap_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.UrlMap; +import com.google.cloud.compute.v1.UrlMapsClient; + +public class SyncUpdateStringStringUrlmap { + + public static void main(String[] args) throws Exception { + syncUpdateStringStringUrlmap(); + } + + public static void syncUpdateStringStringUrlmap() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + String urlMap = "urlMap-836780691"; + UrlMap urlMapResource = UrlMap.newBuilder().build(); + Operation response = urlMapsClient.updateAsync(project, urlMap, urlMapResource).get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Update_StringStringUrlmap_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/AsyncValidate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/AsyncValidate.java new file mode 100644 index 000000000000..d63bdf81360d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/AsyncValidate.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Validate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsValidateRequest; +import com.google.cloud.compute.v1.UrlMapsValidateResponse; +import com.google.cloud.compute.v1.ValidateUrlMapRequest; + +public class AsyncValidate { + + public static void main(String[] args) throws Exception { + asyncValidate(); + } + + public static void asyncValidate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + ValidateUrlMapRequest request = + ValidateUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setUrlMap("urlMap-836780691") + .setUrlMapsValidateRequestResource(UrlMapsValidateRequest.newBuilder().build()) + .build(); + ApiFuture future = + urlMapsClient.validateCallable().futureCall(request); + // Do something. + UrlMapsValidateResponse response = future.get(); + } + } +} +// [END compute_v1_generated_UrlMaps_Validate_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/SyncValidate.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/SyncValidate.java new file mode 100644 index 000000000000..96efe11e964f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/SyncValidate.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Validate_sync] +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsValidateRequest; +import com.google.cloud.compute.v1.UrlMapsValidateResponse; +import com.google.cloud.compute.v1.ValidateUrlMapRequest; + +public class SyncValidate { + + public static void main(String[] args) throws Exception { + syncValidate(); + } + + public static void syncValidate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + ValidateUrlMapRequest request = + ValidateUrlMapRequest.newBuilder() + .setProject("project-309310695") + .setUrlMap("urlMap-836780691") + .setUrlMapsValidateRequestResource(UrlMapsValidateRequest.newBuilder().build()) + .build(); + UrlMapsValidateResponse response = urlMapsClient.validate(request); + } + } +} +// [END compute_v1_generated_UrlMaps_Validate_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/SyncValidateStringStringUrlmapsvalidaterequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/SyncValidateStringStringUrlmapsvalidaterequest.java new file mode 100644 index 000000000000..cad75980b199 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmaps/validate/SyncValidateStringStringUrlmapsvalidaterequest.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.compute.v1.samples; + +// [START compute_v1_generated_UrlMaps_Validate_StringStringUrlmapsvalidaterequest_sync] +import com.google.cloud.compute.v1.UrlMapsClient; +import com.google.cloud.compute.v1.UrlMapsValidateRequest; +import com.google.cloud.compute.v1.UrlMapsValidateResponse; + +public class SyncValidateStringStringUrlmapsvalidaterequest { + + public static void main(String[] args) throws Exception { + syncValidateStringStringUrlmapsvalidaterequest(); + } + + public static void syncValidateStringStringUrlmapsvalidaterequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UrlMapsClient urlMapsClient = UrlMapsClient.create()) { + String project = "project-309310695"; + String urlMap = "urlMap-836780691"; + UrlMapsValidateRequest urlMapsValidateRequestResource = + UrlMapsValidateRequest.newBuilder().build(); + UrlMapsValidateResponse response = + urlMapsClient.validate(project, urlMap, urlMapsValidateRequestResource); + } + } +} +// [END compute_v1_generated_UrlMaps_Validate_StringStringUrlmapsvalidaterequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmapssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmapssettings/get/SyncGet.java new file mode 100644 index 000000000000..dfd639b077fc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/urlmapssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_UrlMapsSettings_Get_sync] +import com.google.cloud.compute.v1.UrlMapsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UrlMapsSettings.Builder urlMapsSettingsBuilder = UrlMapsSettings.newBuilder(); + urlMapsSettingsBuilder + .getSettings() + .setRetrySettings( + urlMapsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + UrlMapsSettings urlMapsSettings = urlMapsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_UrlMapsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..a035e698bef3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + AggregatedListVpnGatewaysRequest request = + AggregatedListVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + vpnGatewaysClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnGateways_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..ea4090e7726d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest; +import com.google.cloud.compute.v1.VpnGatewayAggregatedList; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + AggregatedListVpnGatewaysRequest request = + AggregatedListVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + VpnGatewayAggregatedList response = + vpnGatewaysClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_VpnGateways_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..3d8b3b7b1ed2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + AggregatedListVpnGatewaysRequest request = + AggregatedListVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + vpnGatewaysClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnGateways_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..6e94c1a77fd3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_AggregatedList_String_sync] +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + vpnGatewaysClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnGateways_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ae20e78f10d6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + VpnGatewaysSettings vpnGatewaysSettings = + VpnGatewaysSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create(vpnGatewaysSettings); + } +} +// [END compute_v1_generated_VpnGateways_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..8ee05b71f79f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + VpnGatewaysSettings vpnGatewaysSettings = + VpnGatewaysSettings.newBuilder().setEndpoint(myEndpoint).build(); + VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create(vpnGatewaysSettings); + } +} +// [END compute_v1_generated_VpnGateways_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/AsyncDelete.java new file mode 100644 index 000000000000..346427f1cdaa --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + DeleteVpnGatewayRequest request = + DeleteVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnGateway("vpnGateway1920916144") + .build(); + ApiFuture future = vpnGatewaysClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..8e34077dcc5b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + DeleteVpnGatewayRequest request = + DeleteVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnGateway("vpnGateway1920916144") + .build(); + OperationFuture future = + vpnGatewaysClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/SyncDelete.java new file mode 100644 index 000000000000..319d0f814092 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Delete_sync] +import com.google.cloud.compute.v1.DeleteVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + DeleteVpnGatewayRequest request = + DeleteVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnGateway("vpnGateway1920916144") + .build(); + Operation response = vpnGatewaysClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..dd606a1fc119 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String vpnGateway = "vpnGateway1920916144"; + Operation response = vpnGatewaysClient.deleteAsync(project, region, vpnGateway).get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/AsyncGet.java new file mode 100644 index 000000000000..181bd55e0f47 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + GetVpnGatewayRequest request = + GetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setVpnGateway("vpnGateway1920916144") + .build(); + ApiFuture future = vpnGatewaysClient.getCallable().futureCall(request); + // Do something. + VpnGateway response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/SyncGet.java new file mode 100644 index 000000000000..6793e524f06c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Get_sync] +import com.google.cloud.compute.v1.GetVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + GetVpnGatewayRequest request = + GetVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setVpnGateway("vpnGateway1920916144") + .build(); + VpnGateway response = vpnGatewaysClient.get(request); + } + } +} +// [END compute_v1_generated_VpnGateways_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..ffbc3a8619c0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Get_StringStringString_sync] +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String vpnGateway = "vpnGateway1920916144"; + VpnGateway response = vpnGatewaysClient.get(project, region, vpnGateway); + } + } +} +// [END compute_v1_generated_VpnGateways_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/AsyncGetStatus.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/AsyncGetStatus.java new file mode 100644 index 000000000000..b38eff36ae6b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/AsyncGetStatus.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_GetStatus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetStatusVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysGetStatusResponse; + +public class AsyncGetStatus { + + public static void main(String[] args) throws Exception { + asyncGetStatus(); + } + + public static void asyncGetStatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + GetStatusVpnGatewayRequest request = + GetStatusVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setVpnGateway("vpnGateway1920916144") + .build(); + ApiFuture future = + vpnGatewaysClient.getStatusCallable().futureCall(request); + // Do something. + VpnGatewaysGetStatusResponse response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_GetStatus_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/SyncGetStatus.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/SyncGetStatus.java new file mode 100644 index 000000000000..6b32f9d8aa97 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/SyncGetStatus.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_GetStatus_sync] +import com.google.cloud.compute.v1.GetStatusVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysGetStatusResponse; + +public class SyncGetStatus { + + public static void main(String[] args) throws Exception { + syncGetStatus(); + } + + public static void syncGetStatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + GetStatusVpnGatewayRequest request = + GetStatusVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setVpnGateway("vpnGateway1920916144") + .build(); + VpnGatewaysGetStatusResponse response = vpnGatewaysClient.getStatus(request); + } + } +} +// [END compute_v1_generated_VpnGateways_GetStatus_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/SyncGetStatusStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/SyncGetStatusStringStringString.java new file mode 100644 index 000000000000..c0107c9f1629 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/getstatus/SyncGetStatusStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_GetStatus_StringStringString_sync] +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.cloud.compute.v1.VpnGatewaysGetStatusResponse; + +public class SyncGetStatusStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStatusStringStringString(); + } + + public static void syncGetStatusStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String vpnGateway = "vpnGateway1920916144"; + VpnGatewaysGetStatusResponse response = + vpnGatewaysClient.getStatus(project, region, vpnGateway); + } + } +} +// [END compute_v1_generated_VpnGateways_GetStatus_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/AsyncInsert.java new file mode 100644 index 000000000000..3d2957b201e8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + InsertVpnGatewayRequest request = + InsertVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnGatewayResource(VpnGateway.newBuilder().build()) + .build(); + ApiFuture future = vpnGatewaysClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..a46d59b30184 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + InsertVpnGatewayRequest request = + InsertVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnGatewayResource(VpnGateway.newBuilder().build()) + .build(); + OperationFuture future = + vpnGatewaysClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/SyncInsert.java new file mode 100644 index 000000000000..65e1832f0749 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Insert_sync] +import com.google.cloud.compute.v1.InsertVpnGatewayRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + InsertVpnGatewayRequest request = + InsertVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnGatewayResource(VpnGateway.newBuilder().build()) + .build(); + Operation response = vpnGatewaysClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/SyncInsertStringStringVpngateway.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/SyncInsertStringStringVpngateway.java new file mode 100644 index 000000000000..3a83ae00a8fc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/insert/SyncInsertStringStringVpngateway.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_Insert_StringStringVpngateway_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncInsertStringStringVpngateway { + + public static void main(String[] args) throws Exception { + syncInsertStringStringVpngateway(); + } + + public static void syncInsertStringStringVpngateway() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + VpnGateway vpnGatewayResource = VpnGateway.newBuilder().build(); + Operation response = vpnGatewaysClient.insertAsync(project, region, vpnGatewayResource).get(); + } + } +} +// [END compute_v1_generated_VpnGateways_Insert_StringStringVpngateway_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/AsyncList.java new file mode 100644 index 000000000000..effd20d40c4c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListVpnGatewaysRequest; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + ListVpnGatewaysRequest request = + ListVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = vpnGatewaysClient.listPagedCallable().futureCall(request); + // Do something. + for (VpnGateway element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnGateways_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/AsyncListPaged.java new file mode 100644 index 000000000000..ac0baebdbd5d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_List_Paged_async] +import com.google.cloud.compute.v1.ListVpnGatewaysRequest; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewayList; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + ListVpnGatewaysRequest request = + ListVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + VpnGatewayList response = vpnGatewaysClient.listCallable().call(request); + for (VpnGateway element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_VpnGateways_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/SyncList.java new file mode 100644 index 000000000000..c390337c6e0e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_List_sync] +import com.google.cloud.compute.v1.ListVpnGatewaysRequest; +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + ListVpnGatewaysRequest request = + ListVpnGatewaysRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (VpnGateway element : vpnGatewaysClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnGateways_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/SyncListStringString.java new file mode 100644 index 000000000000..c7a6494e431d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_List_StringString_sync] +import com.google.cloud.compute.v1.VpnGateway; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (VpnGateway element : vpnGatewaysClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnGateways_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..b4a63107396b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + SetLabelsVpnGatewayRequest request = + SetLabelsVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + ApiFuture future = vpnGatewaysClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..ab273480a371 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + SetLabelsVpnGatewayRequest request = + SetLabelsVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + OperationFuture future = + vpnGatewaysClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..9d8d74a03def --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_SetLabels_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsVpnGatewayRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + SetLabelsVpnGatewayRequest request = + SetLabelsVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + Operation response = vpnGatewaysClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_VpnGateways_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java new file mode 100644 index 000000000000..a5041209a5f1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_SetLabels_StringStringStringRegionsetlabelsrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncSetLabelsStringStringStringRegionsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringRegionsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringRegionsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetLabelsRequest regionSetLabelsRequestResource = + RegionSetLabelsRequest.newBuilder().build(); + Operation response = + vpnGatewaysClient + .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_VpnGateways_SetLabels_StringStringStringRegionsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/AsyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..8fe6dc36335d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + TestIamPermissionsVpnGatewayRequest request = + TestIamPermissionsVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + ApiFuture future = + vpnGatewaysClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestPermissionsResponse response = future.get(); + } + } +} +// [END compute_v1_generated_VpnGateways_TestIamPermissions_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/SyncTestIamPermissions.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..cd264130ba16 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/SyncTestIamPermissions.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_TestIamPermissions_sync] +import com.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest; +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + TestIamPermissionsVpnGatewayRequest request = + TestIamPermissionsVpnGatewayRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setResource("resource-341064690") + .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build()) + .build(); + TestPermissionsResponse response = vpnGatewaysClient.testIamPermissions(request); + } + } +} +// [END compute_v1_generated_VpnGateways_TestIamPermissions_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java new file mode 100644 index 000000000000..746894eea0a9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngateways/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_VpnGateways_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] +import com.google.cloud.compute.v1.TestPermissionsRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; +import com.google.cloud.compute.v1.VpnGatewaysClient; + +public class SyncTestIamPermissionsStringStringStringTestpermissionsrequest { + + public static void main(String[] args) throws Exception { + syncTestIamPermissionsStringStringStringTestpermissionsrequest(); + } + + public static void syncTestIamPermissionsStringStringStringTestpermissionsrequest() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnGatewaysClient vpnGatewaysClient = VpnGatewaysClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + TestPermissionsResponse response = + vpnGatewaysClient.testIamPermissions( + project, region, resource, testPermissionsRequestResource); + } + } +} +// [END compute_v1_generated_VpnGateways_TestIamPermissions_StringStringStringTestpermissionsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngatewayssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngatewayssettings/get/SyncGet.java new file mode 100644 index 000000000000..b8456745aa22 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpngatewayssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnGatewaysSettings_Get_sync] +import com.google.cloud.compute.v1.VpnGatewaysSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + VpnGatewaysSettings.Builder vpnGatewaysSettingsBuilder = VpnGatewaysSettings.newBuilder(); + vpnGatewaysSettingsBuilder + .getSettings() + .setRetrySettings( + vpnGatewaysSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + VpnGatewaysSettings vpnGatewaysSettings = vpnGatewaysSettingsBuilder.build(); + } +} +// [END compute_v1_generated_VpnGatewaysSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..3d6339614391 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,58 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest; +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.cloud.compute.v1.VpnTunnelsScopedList; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + AggregatedListVpnTunnelsRequest request = + AggregatedListVpnTunnelsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture> future = + vpnTunnelsClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnTunnels_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..796e0181833f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,65 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_AggregatedList_Paged_async] +import com.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest; +import com.google.cloud.compute.v1.VpnTunnelAggregatedList; +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.cloud.compute.v1.VpnTunnelsScopedList; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + AggregatedListVpnTunnelsRequest request = + AggregatedListVpnTunnelsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + VpnTunnelAggregatedList response = vpnTunnelsClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_VpnTunnels_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..e523d83020de --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_AggregatedList_sync] +import com.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest; +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.cloud.compute.v1.VpnTunnelsScopedList; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + AggregatedListVpnTunnelsRequest request = + AggregatedListVpnTunnelsRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Map.Entry element : + vpnTunnelsClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnTunnels_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..b626c1234245 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/aggregatedlist/SyncAggregatedListString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_AggregatedList_String_sync] +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.cloud.compute.v1.VpnTunnelsScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + vpnTunnelsClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnTunnels_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..5ec3a50fe8cb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.cloud.compute.v1.VpnTunnelsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + VpnTunnelsSettings vpnTunnelsSettings = + VpnTunnelsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create(vpnTunnelsSettings); + } +} +// [END compute_v1_generated_VpnTunnels_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..ae5edf12acad --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.cloud.compute.v1.VpnTunnelsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + VpnTunnelsSettings vpnTunnelsSettings = + VpnTunnelsSettings.newBuilder().setEndpoint(myEndpoint).build(); + VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create(vpnTunnelsSettings); + } +} +// [END compute_v1_generated_VpnTunnels_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/AsyncDelete.java new file mode 100644 index 000000000000..3f975721e0a5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteVpnTunnelRequest; +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + DeleteVpnTunnelRequest request = + DeleteVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnTunnel("vpnTunnel452443772") + .build(); + ApiFuture future = vpnTunnelsClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..f0515873fa0f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/AsyncDeleteLRO.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.DeleteVpnTunnelRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + DeleteVpnTunnelRequest request = + DeleteVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnTunnel("vpnTunnel452443772") + .build(); + OperationFuture future = + vpnTunnelsClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/SyncDelete.java new file mode 100644 index 000000000000..ec19ced1df40 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Delete_sync] +import com.google.cloud.compute.v1.DeleteVpnTunnelRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + DeleteVpnTunnelRequest request = + DeleteVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnTunnel("vpnTunnel452443772") + .build(); + Operation response = vpnTunnelsClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..16f45631ab76 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String vpnTunnel = "vpnTunnel452443772"; + Operation response = vpnTunnelsClient.deleteAsync(project, region, vpnTunnel).get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/AsyncGet.java new file mode 100644 index 000000000000..1fadbb52e3df --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetVpnTunnelRequest; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + GetVpnTunnelRequest request = + GetVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setVpnTunnel("vpnTunnel452443772") + .build(); + ApiFuture future = vpnTunnelsClient.getCallable().futureCall(request); + // Do something. + VpnTunnel response = future.get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/SyncGet.java new file mode 100644 index 000000000000..93c560d59661 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Get_sync] +import com.google.cloud.compute.v1.GetVpnTunnelRequest; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + GetVpnTunnelRequest request = + GetVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setVpnTunnel("vpnTunnel452443772") + .build(); + VpnTunnel response = vpnTunnelsClient.get(request); + } + } +} +// [END compute_v1_generated_VpnTunnels_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..dc2f6990b195 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Get_StringStringString_sync] +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String vpnTunnel = "vpnTunnel452443772"; + VpnTunnel response = vpnTunnelsClient.get(project, region, vpnTunnel); + } + } +} +// [END compute_v1_generated_VpnTunnels_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/AsyncInsert.java new file mode 100644 index 000000000000..92c7563dee0e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/AsyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.InsertVpnTunnelRequest; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + InsertVpnTunnelRequest request = + InsertVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnTunnelResource(VpnTunnel.newBuilder().build()) + .build(); + ApiFuture future = vpnTunnelsClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..ba38b98189d0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.InsertVpnTunnelRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + InsertVpnTunnelRequest request = + InsertVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnTunnelResource(VpnTunnel.newBuilder().build()) + .build(); + OperationFuture future = + vpnTunnelsClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/SyncInsert.java new file mode 100644 index 000000000000..abf48ec58678 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/SyncInsert.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Insert_sync] +import com.google.cloud.compute.v1.InsertVpnTunnelRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + InsertVpnTunnelRequest request = + InsertVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .setVpnTunnelResource(VpnTunnel.newBuilder().build()) + .build(); + Operation response = vpnTunnelsClient.insertAsync(request).get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/SyncInsertStringStringVpntunnel.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/SyncInsertStringStringVpntunnel.java new file mode 100644 index 000000000000..d40adcfcb3ef --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/insert/SyncInsertStringStringVpntunnel.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_Insert_StringStringVpntunnel_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncInsertStringStringVpntunnel { + + public static void main(String[] args) throws Exception { + syncInsertStringStringVpntunnel(); + } + + public static void syncInsertStringStringVpntunnel() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + VpnTunnel vpnTunnelResource = VpnTunnel.newBuilder().build(); + Operation response = vpnTunnelsClient.insertAsync(project, region, vpnTunnelResource).get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_Insert_StringStringVpntunnel_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/AsyncList.java new file mode 100644 index 000000000000..8e458525c93e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListVpnTunnelsRequest; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + ListVpnTunnelsRequest request = + ListVpnTunnelsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = vpnTunnelsClient.listPagedCallable().futureCall(request); + // Do something. + for (VpnTunnel element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnTunnels_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/AsyncListPaged.java new file mode 100644 index 000000000000..631f83788ec9 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_List_Paged_async] +import com.google.cloud.compute.v1.ListVpnTunnelsRequest; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelList; +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + ListVpnTunnelsRequest request = + ListVpnTunnelsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + while (true) { + VpnTunnelList response = vpnTunnelsClient.listCallable().call(request); + for (VpnTunnel element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_VpnTunnels_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/SyncList.java new file mode 100644 index 000000000000..36c976e2012e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_List_sync] +import com.google.cloud.compute.v1.ListVpnTunnelsRequest; +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + ListVpnTunnelsRequest request = + ListVpnTunnelsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .setReturnPartialSuccess(true) + .build(); + for (VpnTunnel element : vpnTunnelsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnTunnels_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/SyncListStringString.java new file mode 100644 index 000000000000..c4aaa3035ea0 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_List_StringString_sync] +import com.google.cloud.compute.v1.VpnTunnel; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + for (VpnTunnel element : vpnTunnelsClient.list(project, region).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_VpnTunnels_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/AsyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/AsyncSetLabels.java new file mode 100644 index 000000000000..6180662ea5e3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/AsyncSetLabels.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_SetLabels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsVpnTunnelRequest; +import com.google.cloud.compute.v1.VpnTunnelsClient; +import com.google.longrunning.Operation; + +public class AsyncSetLabels { + + public static void main(String[] args) throws Exception { + asyncSetLabels(); + } + + public static void asyncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + SetLabelsVpnTunnelRequest request = + SetLabelsVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + ApiFuture future = vpnTunnelsClient.setLabelsCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1.Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_SetLabels_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/AsyncSetLabelsLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/AsyncSetLabelsLRO.java new file mode 100644 index 000000000000..76c80952537e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/AsyncSetLabelsLRO.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_SetLabels_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsVpnTunnelRequest; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class AsyncSetLabelsLRO { + + public static void main(String[] args) throws Exception { + asyncSetLabelsLRO(); + } + + public static void asyncSetLabelsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + SetLabelsVpnTunnelRequest request = + SetLabelsVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + OperationFuture future = + vpnTunnelsClient.setLabelsOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_SetLabels_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/SyncSetLabels.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/SyncSetLabels.java new file mode 100644 index 000000000000..73fdc22b44a8 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/SyncSetLabels.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_SetLabels_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.SetLabelsVpnTunnelRequest; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncSetLabels { + + public static void main(String[] args) throws Exception { + syncSetLabels(); + } + + public static void syncSetLabels() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + SetLabelsVpnTunnelRequest request = + SetLabelsVpnTunnelRequest.newBuilder() + .setProject("project-309310695") + .setRegion("region-934795532") + .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build()) + .setRequestId("requestId693933066") + .setResource("resource-341064690") + .build(); + Operation response = vpnTunnelsClient.setLabelsAsync(request).get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_SetLabels_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.java new file mode 100644 index 000000000000..21c325f78d56 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnels/setlabels/SyncSetLabelsStringStringStringRegionsetlabelsrequest.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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnels_SetLabels_StringStringStringRegionsetlabelsrequest_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.RegionSetLabelsRequest; +import com.google.cloud.compute.v1.VpnTunnelsClient; + +public class SyncSetLabelsStringStringStringRegionsetlabelsrequest { + + public static void main(String[] args) throws Exception { + syncSetLabelsStringStringStringRegionsetlabelsrequest(); + } + + public static void syncSetLabelsStringStringStringRegionsetlabelsrequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String resource = "resource-341064690"; + RegionSetLabelsRequest regionSetLabelsRequestResource = + RegionSetLabelsRequest.newBuilder().build(); + Operation response = + vpnTunnelsClient + .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource) + .get(); + } + } +} +// [END compute_v1_generated_VpnTunnels_SetLabels_StringStringStringRegionsetlabelsrequest_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnelssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnelssettings/get/SyncGet.java new file mode 100644 index 000000000000..5ce730b8b037 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/vpntunnelssettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_VpnTunnelsSettings_Get_sync] +import com.google.cloud.compute.v1.VpnTunnelsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + VpnTunnelsSettings.Builder vpnTunnelsSettingsBuilder = VpnTunnelsSettings.newBuilder(); + vpnTunnelsSettingsBuilder + .getSettings() + .setRetrySettings( + vpnTunnelsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + VpnTunnelsSettings vpnTunnelsSettings = vpnTunnelsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_VpnTunnelsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ce29d86a5ce2 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ZoneOperationsClient; +import com.google.cloud.compute.v1.ZoneOperationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ZoneOperationsSettings zoneOperationsSettings = + ZoneOperationsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create(zoneOperationsSettings); + } +} +// [END compute_v1_generated_ZoneOperations_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..f09d64fdb263 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ZoneOperationsClient; +import com.google.cloud.compute.v1.ZoneOperationsSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ZoneOperationsSettings zoneOperationsSettings = + ZoneOperationsSettings.newBuilder().setEndpoint(myEndpoint).build(); + ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create(zoneOperationsSettings); + } +} +// [END compute_v1_generated_ZoneOperations_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/AsyncDelete.java new file mode 100644 index 000000000000..1042bf827d4f --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/AsyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.DeleteZoneOperationRequest; +import com.google.cloud.compute.v1.DeleteZoneOperationResponse; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + DeleteZoneOperationRequest request = + DeleteZoneOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = + zoneOperationsClient.deleteCallable().futureCall(request); + // Do something. + DeleteZoneOperationResponse response = future.get(); + } + } +} +// [END compute_v1_generated_ZoneOperations_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/SyncDelete.java new file mode 100644 index 000000000000..d790b85d4ace --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Delete_sync] +import com.google.cloud.compute.v1.DeleteZoneOperationRequest; +import com.google.cloud.compute.v1.DeleteZoneOperationResponse; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + DeleteZoneOperationRequest request = + DeleteZoneOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + DeleteZoneOperationResponse response = zoneOperationsClient.delete(request); + } + } +} +// [END compute_v1_generated_ZoneOperations_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..e5dd4746f96b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/delete/SyncDeleteStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Delete_StringStringString_sync] +import com.google.cloud.compute.v1.DeleteZoneOperationResponse; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String operation = "operation1662702951"; + DeleteZoneOperationResponse response = zoneOperationsClient.delete(project, zone, operation); + } + } +} +// [END compute_v1_generated_ZoneOperations_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/AsyncGet.java new file mode 100644 index 000000000000..766474f4d5d7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetZoneOperationRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + GetZoneOperationRequest request = + GetZoneOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = zoneOperationsClient.getCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ZoneOperations_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/SyncGet.java new file mode 100644 index 000000000000..288567844570 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Get_sync] +import com.google.cloud.compute.v1.GetZoneOperationRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + GetZoneOperationRequest request = + GetZoneOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Operation response = zoneOperationsClient.get(request); + } + } +} +// [END compute_v1_generated_ZoneOperations_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..7b2802f940f7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/get/SyncGetStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Get_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String operation = "operation1662702951"; + Operation response = zoneOperationsClient.get(project, zone, operation); + } + } +} +// [END compute_v1_generated_ZoneOperations_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/AsyncList.java new file mode 100644 index 000000000000..8e437e656af6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/AsyncList.java @@ -0,0 +1,56 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListZoneOperationsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + ListZoneOperationsRequest request = + ListZoneOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + ApiFuture future = zoneOperationsClient.listPagedCallable().futureCall(request); + // Do something. + for (Operation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ZoneOperations_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/AsyncListPaged.java new file mode 100644 index 000000000000..3cd3cb1e3901 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/AsyncListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_List_Paged_async] +import com.google.cloud.compute.v1.ListZoneOperationsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.OperationList; +import com.google.cloud.compute.v1.ZoneOperationsClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + ListZoneOperationsRequest request = + ListZoneOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + while (true) { + OperationList response = zoneOperationsClient.listCallable().call(request); + for (Operation element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_ZoneOperations_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/SyncList.java new file mode 100644 index 000000000000..5119a7a49b9d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/SyncList.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_List_sync] +import com.google.cloud.compute.v1.ListZoneOperationsRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + ListZoneOperationsRequest request = + ListZoneOperationsRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .setZone("zone3744684") + .build(); + for (Operation element : zoneOperationsClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ZoneOperations_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/SyncListStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/SyncListStringString.java new file mode 100644 index 000000000000..7a801a3369a6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/list/SyncListStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_List_StringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class SyncListStringString { + + public static void main(String[] args) throws Exception { + syncListStringString(); + } + + public static void syncListStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + for (Operation element : zoneOperationsClient.list(project, zone).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_ZoneOperations_List_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/AsyncWait.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/AsyncWait.java new file mode 100644 index 000000000000..d42ba98368af --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/AsyncWait.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Wait_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.WaitZoneOperationRequest; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class AsyncWait { + + public static void main(String[] args) throws Exception { + asyncWait(); + } + + public static void asyncWait() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + WaitZoneOperationRequest request = + WaitZoneOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = zoneOperationsClient.waitCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1_generated_ZoneOperations_Wait_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/SyncWait.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/SyncWait.java new file mode 100644 index 000000000000..fe09a5996c58 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/SyncWait.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Wait_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.WaitZoneOperationRequest; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class SyncWait { + + public static void main(String[] args) throws Exception { + syncWait(); + } + + public static void syncWait() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + WaitZoneOperationRequest request = + WaitZoneOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Operation response = zoneOperationsClient.wait(request); + } + } +} +// [END compute_v1_generated_ZoneOperations_Wait_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/SyncWaitStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/SyncWaitStringStringString.java new file mode 100644 index 000000000000..2cec9fb2da2b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperations/wait/SyncWaitStringStringString.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperations_Wait_StringStringString_sync] +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ZoneOperationsClient; + +public class SyncWaitStringStringString { + + public static void main(String[] args) throws Exception { + syncWaitStringStringString(); + } + + public static void syncWaitStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + String operation = "operation1662702951"; + Operation response = zoneOperationsClient.wait(project, zone, operation); + } + } +} +// [END compute_v1_generated_ZoneOperations_Wait_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperationssettings/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperationssettings/delete/SyncDelete.java new file mode 100644 index 000000000000..6abeb9f377c6 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zoneoperationssettings/delete/SyncDelete.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.compute.v1.samples; + +// [START compute_v1_generated_ZoneOperationsSettings_Delete_sync] +import com.google.cloud.compute.v1.ZoneOperationsSettings; +import java.time.Duration; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ZoneOperationsSettings.Builder zoneOperationsSettingsBuilder = + ZoneOperationsSettings.newBuilder(); + zoneOperationsSettingsBuilder + .deleteSettings() + .setRetrySettings( + zoneOperationsSettingsBuilder + .deleteSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ZoneOperationsSettings zoneOperationsSettings = zoneOperationsSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ZoneOperationsSettings_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..00671d3e7278 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/create/SyncCreateSetCredentialsProvider.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.compute.v1.samples; + +// [START compute_v1_generated_Zones_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1.ZonesClient; +import com.google.cloud.compute.v1.ZonesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ZonesSettings zonesSettings = + ZonesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ZonesClient zonesClient = ZonesClient.create(zonesSettings); + } +} +// [END compute_v1_generated_Zones_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..61ad22d08d98 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/create/SyncCreateSetEndpoint.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.compute.v1.samples; + +// [START compute_v1_generated_Zones_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1.ZonesClient; +import com.google.cloud.compute.v1.ZonesSettings; +import com.google.cloud.compute.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ZonesSettings zonesSettings = ZonesSettings.newBuilder().setEndpoint(myEndpoint).build(); + ZonesClient zonesClient = ZonesClient.create(zonesSettings); + } +} +// [END compute_v1_generated_Zones_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/AsyncGet.java new file mode 100644 index 000000000000..d0a9afe9883a --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/AsyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Zones_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.GetZoneRequest; +import com.google.cloud.compute.v1.Zone; +import com.google.cloud.compute.v1.ZonesClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZonesClient zonesClient = ZonesClient.create()) { + GetZoneRequest request = + GetZoneRequest.newBuilder() + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + ApiFuture future = zonesClient.getCallable().futureCall(request); + // Do something. + Zone response = future.get(); + } + } +} +// [END compute_v1_generated_Zones_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/SyncGet.java new file mode 100644 index 000000000000..811dc6f8dada --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/SyncGet.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.compute.v1.samples; + +// [START compute_v1_generated_Zones_Get_sync] +import com.google.cloud.compute.v1.GetZoneRequest; +import com.google.cloud.compute.v1.Zone; +import com.google.cloud.compute.v1.ZonesClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZonesClient zonesClient = ZonesClient.create()) { + GetZoneRequest request = + GetZoneRequest.newBuilder() + .setProject("project-309310695") + .setZone("zone3744684") + .build(); + Zone response = zonesClient.get(request); + } + } +} +// [END compute_v1_generated_Zones_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/SyncGetStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/SyncGetStringString.java new file mode 100644 index 000000000000..efac4070bc4b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/get/SyncGetStringString.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Zones_Get_StringString_sync] +import com.google.cloud.compute.v1.Zone; +import com.google.cloud.compute.v1.ZonesClient; + +public class SyncGetStringString { + + public static void main(String[] args) throws Exception { + syncGetStringString(); + } + + public static void syncGetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZonesClient zonesClient = ZonesClient.create()) { + String project = "project-309310695"; + String zone = "zone3744684"; + Zone response = zonesClient.get(project, zone); + } + } +} +// [END compute_v1_generated_Zones_Get_StringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/AsyncList.java new file mode 100644 index 000000000000..f90a10513a16 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Zones_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1.ListZonesRequest; +import com.google.cloud.compute.v1.Zone; +import com.google.cloud.compute.v1.ZonesClient; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZonesClient zonesClient = ZonesClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = zonesClient.listPagedCallable().futureCall(request); + // Do something. + for (Zone element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Zones_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/AsyncListPaged.java new file mode 100644 index 000000000000..725757e68374 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_Zones_List_Paged_async] +import com.google.cloud.compute.v1.ListZonesRequest; +import com.google.cloud.compute.v1.Zone; +import com.google.cloud.compute.v1.ZoneList; +import com.google.cloud.compute.v1.ZonesClient; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZonesClient zonesClient = ZonesClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ZoneList response = zonesClient.listCallable().call(request); + for (Zone element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1_generated_Zones_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/SyncList.java new file mode 100644 index 000000000000..679532d89f97 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/SyncList.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.compute.v1.samples; + +// [START compute_v1_generated_Zones_List_sync] +import com.google.cloud.compute.v1.ListZonesRequest; +import com.google.cloud.compute.v1.Zone; +import com.google.cloud.compute.v1.ZonesClient; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZonesClient zonesClient = ZonesClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setReturnPartialSuccess(true) + .build(); + for (Zone element : zonesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Zones_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/SyncListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/SyncListString.java new file mode 100644 index 000000000000..036d87260178 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zones/list/SyncListString.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.compute.v1.samples; + +// [START compute_v1_generated_Zones_List_String_sync] +import com.google.cloud.compute.v1.Zone; +import com.google.cloud.compute.v1.ZonesClient; + +public class SyncListString { + + public static void main(String[] args) throws Exception { + syncListString(); + } + + public static void syncListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ZonesClient zonesClient = ZonesClient.create()) { + String project = "project-309310695"; + for (Zone element : zonesClient.list(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1_generated_Zones_List_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zonessettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zonessettings/get/SyncGet.java new file mode 100644 index 000000000000..b31e6789ca9e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1/zonessettings/get/SyncGet.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1.samples; + +// [START compute_v1_generated_ZonesSettings_Get_sync] +import com.google.cloud.compute.v1.ZonesSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ZonesSettings.Builder zonesSettingsBuilder = ZonesSettings.newBuilder(); + zonesSettingsBuilder + .getSettings() + .setRetrySettings( + zonesSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ZonesSettings zonesSettings = zonesSettingsBuilder.build(); + } +} +// [END compute_v1_generated_ZonesSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/AsyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/AsyncAggregatedList.java new file mode 100644 index 000000000000..fd623a44bfa1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/AsyncAggregatedList.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_AggregatedList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.AddressesScopedList; +import com.google.cloud.compute.v1small.AggregatedListAddressesRequest; +import java.util.Map; + +public class AsyncAggregatedList { + + public static void main(String[] args) throws Exception { + asyncAggregatedList(); + } + + public static void asyncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + AggregatedListAddressesRequest request = + AggregatedListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .build(); + ApiFuture> future = + addressesClient.aggregatedListPagedCallable().futureCall(request); + // Do something. + for (Map.Entry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1small_generated_Addresses_AggregatedList_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/AsyncAggregatedListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/AsyncAggregatedListPaged.java new file mode 100644 index 000000000000..333c757c68fb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/AsyncAggregatedListPaged.java @@ -0,0 +1,64 @@ +/* + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_AggregatedList_Paged_async] +import com.google.cloud.compute.v1small.AddressAggregatedList; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.AddressesScopedList; +import com.google.cloud.compute.v1small.AggregatedListAddressesRequest; +import com.google.common.base.Strings; +import java.util.Map; + +public class AsyncAggregatedListPaged { + + public static void main(String[] args) throws Exception { + asyncAggregatedListPaged(); + } + + public static void asyncAggregatedListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + AggregatedListAddressesRequest request = + AggregatedListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .build(); + while (true) { + AddressAggregatedList response = addressesClient.aggregatedListCallable().call(request); + for (Map.Entry element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1small_generated_Addresses_AggregatedList_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..21afc1d2c052 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,54 @@ +/* + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_AggregatedList_sync] +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.AddressesScopedList; +import com.google.cloud.compute.v1small.AggregatedListAddressesRequest; +import java.util.Map; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + AggregatedListAddressesRequest request = + AggregatedListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setIncludeAllScopes(true) + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .build(); + for (Map.Entry element : + addressesClient.aggregatedList(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1small_generated_Addresses_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/SyncAggregatedListString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/SyncAggregatedListString.java new file mode 100644 index 000000000000..0320dc1970b7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/aggregatedlist/SyncAggregatedListString.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_AggregatedList_String_sync] +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.AddressesScopedList; +import java.util.Map; + +public class SyncAggregatedListString { + + public static void main(String[] args) throws Exception { + syncAggregatedListString(); + } + + public static void syncAggregatedListString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + for (Map.Entry element : + addressesClient.aggregatedList(project).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1small_generated_Addresses_AggregatedList_String_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..ee626b38332c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/create/SyncCreateSetCredentialsProvider.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.AddressesSettings; +import com.google.cloud.compute.v1small.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AddressesSettings addressesSettings = + AddressesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AddressesClient addressesClient = AddressesClient.create(addressesSettings); + } +} +// [END compute_v1small_generated_Addresses_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..49a9b34bf3eb --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/create/SyncCreateSetEndpoint.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.AddressesSettings; +import com.google.cloud.compute.v1small.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AddressesSettings addressesSettings = + AddressesSettings.newBuilder().setEndpoint(myEndpoint).build(); + AddressesClient addressesClient = AddressesClient.create(addressesSettings); + } +} +// [END compute_v1small_generated_Addresses_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/AsyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/AsyncDelete.java new file mode 100644 index 000000000000..53a63b72eb5b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/AsyncDelete.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Delete_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.DeleteAddressRequest; +import com.google.longrunning.Operation; + +public class AsyncDelete { + + public static void main(String[] args) throws Exception { + asyncDelete(); + } + + public static void asyncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + DeleteAddressRequest request = + DeleteAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = addressesClient.deleteCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1small.Operation response = future.get(); + } + } +} +// [END compute_v1small_generated_Addresses_Delete_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/AsyncDeleteLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/AsyncDeleteLRO.java new file mode 100644 index 000000000000..86c2dc599235 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/AsyncDeleteLRO.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Delete_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.DeleteAddressRequest; +import com.google.cloud.compute.v1small.Operation; + +public class AsyncDeleteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteLRO(); + } + + public static void asyncDeleteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + DeleteAddressRequest request = + DeleteAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + addressesClient.deleteOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1small_generated_Addresses_Delete_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/SyncDelete.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/SyncDelete.java new file mode 100644 index 000000000000..8cc976a9a174 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/SyncDelete.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Delete_sync] +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.DeleteAddressRequest; +import com.google.cloud.compute.v1small.Operation; + +public class SyncDelete { + + public static void main(String[] args) throws Exception { + syncDelete(); + } + + public static void syncDelete() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + DeleteAddressRequest request = + DeleteAddressRequest.newBuilder() + .setAddress("address-1147692044") + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = addressesClient.deleteAsync(request).get(); + } + } +} +// [END compute_v1small_generated_Addresses_Delete_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/SyncDeleteStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/SyncDeleteStringStringString.java new file mode 100644 index 000000000000..d9152c6c411e --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/delete/SyncDeleteStringStringString.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Delete_StringStringString_sync] +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.Operation; + +public class SyncDeleteStringStringString { + + public static void main(String[] args) throws Exception { + syncDeleteStringStringString(); + } + + public static void syncDeleteStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String address = "address-1147692044"; + Operation response = addressesClient.deleteAsync(project, region, address).get(); + } + } +} +// [END compute_v1small_generated_Addresses_Delete_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/AsyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/AsyncInsert.java new file mode 100644 index 000000000000..c4004a223dc1 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/AsyncInsert.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Insert_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1small.Address; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.InsertAddressRequest; +import com.google.longrunning.Operation; + +public class AsyncInsert { + + public static void main(String[] args) throws Exception { + asyncInsert(); + } + + public static void asyncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + InsertAddressRequest request = + InsertAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = addressesClient.insertCallable().futureCall(request); + // Do something. + com.google.cloud.compute.v1small.Operation response = future.get(); + } + } +} +// [END compute_v1small_generated_Addresses_Insert_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/AsyncInsertLRO.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/AsyncInsertLRO.java new file mode 100644 index 000000000000..4e70ce04b145 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/AsyncInsertLRO.java @@ -0,0 +1,53 @@ +/* + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Insert_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.compute.v1small.Address; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.InsertAddressRequest; +import com.google.cloud.compute.v1small.Operation; + +public class AsyncInsertLRO { + + public static void main(String[] args) throws Exception { + asyncInsertLRO(); + } + + public static void asyncInsertLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + InsertAddressRequest request = + InsertAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + addressesClient.insertOperationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1small_generated_Addresses_Insert_LRO_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/SyncInsert.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/SyncInsert.java new file mode 100644 index 000000000000..3c38ab50fb56 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/SyncInsert.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Insert_sync] +import com.google.cloud.compute.v1small.Address; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.InsertAddressRequest; +import com.google.cloud.compute.v1small.Operation; + +public class SyncInsert { + + public static void main(String[] args) throws Exception { + syncInsert(); + } + + public static void syncInsert() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + InsertAddressRequest request = + InsertAddressRequest.newBuilder() + .setAddressResource(Address.newBuilder().build()) + .setProject("project-309310695") + .setRegion("region-934795532") + .setRequestId("requestId693933066") + .build(); + Operation response = addressesClient.insertAsync(request).get(); + } + } +} +// [END compute_v1small_generated_Addresses_Insert_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/SyncInsertStringStringAddress.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/SyncInsertStringStringAddress.java new file mode 100644 index 000000000000..3f6d001f754d --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/insert/SyncInsertStringStringAddress.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_Insert_StringStringAddress_sync] +import com.google.cloud.compute.v1small.Address; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.Operation; + +public class SyncInsertStringStringAddress { + + public static void main(String[] args) throws Exception { + syncInsertStringStringAddress(); + } + + public static void syncInsertStringStringAddress() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + Address addressResource = Address.newBuilder().build(); + Operation response = addressesClient.insertAsync(project, region, addressResource).get(); + } + } +} +// [END compute_v1small_generated_Addresses_Insert_StringStringAddress_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/AsyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/AsyncList.java new file mode 100644 index 000000000000..89088a5a04bc --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/AsyncList.java @@ -0,0 +1,55 @@ +/* + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_List_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1small.Address; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.ListAddressesRequest; + +public class AsyncList { + + public static void main(String[] args) throws Exception { + asyncList(); + } + + public static void asyncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + ListAddressesRequest request = + ListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture
future = addressesClient.listPagedCallable().futureCall(request); + // Do something. + for (Address element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1small_generated_Addresses_List_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/AsyncListPaged.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/AsyncListPaged.java new file mode 100644 index 000000000000..e749bc759528 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/AsyncListPaged.java @@ -0,0 +1,63 @@ +/* + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_List_Paged_async] +import com.google.cloud.compute.v1small.Address; +import com.google.cloud.compute.v1small.AddressList; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.ListAddressesRequest; +import com.google.common.base.Strings; + +public class AsyncListPaged { + + public static void main(String[] args) throws Exception { + asyncListPaged(); + } + + public static void asyncListPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + ListAddressesRequest request = + ListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + while (true) { + AddressList response = addressesClient.listCallable().call(request); + for (Address element : response.getItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END compute_v1small_generated_Addresses_List_Paged_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/SyncList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/SyncList.java new file mode 100644 index 000000000000..3c105181a7ff --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/SyncList.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_List_sync] +import com.google.cloud.compute.v1small.Address; +import com.google.cloud.compute.v1small.AddressesClient; +import com.google.cloud.compute.v1small.ListAddressesRequest; + +public class SyncList { + + public static void main(String[] args) throws Exception { + syncList(); + } + + public static void syncList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + ListAddressesRequest request = + ListAddressesRequest.newBuilder() + .setFilter("filter-1274492040") + .setMaxResults(1128457243) + .setOrderBy("orderBy-1207110587") + .setPageToken("pageToken873572522") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + for (Address element : addressesClient.list(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1small_generated_Addresses_List_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/SyncListStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/SyncListStringStringString.java new file mode 100644 index 000000000000..bc47d773c97c --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addresses/list/SyncListStringStringString.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.compute.v1small.samples; + +// [START compute_v1small_generated_Addresses_List_StringStringString_sync] +import com.google.cloud.compute.v1small.Address; +import com.google.cloud.compute.v1small.AddressesClient; + +public class SyncListStringStringString { + + public static void main(String[] args) throws Exception { + syncListStringStringString(); + } + + public static void syncListStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AddressesClient addressesClient = AddressesClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String orderBy = "orderBy-1207110587"; + for (Address element : addressesClient.list(project, region, orderBy).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END compute_v1small_generated_Addresses_List_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addressessettings/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addressessettings/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..fa405f919baf --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/addressessettings/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_AddressesSettings_AggregatedList_sync] +import com.google.cloud.compute.v1small.AddressesSettings; +import java.time.Duration; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AddressesSettings.Builder addressesSettingsBuilder = AddressesSettings.newBuilder(); + addressesSettingsBuilder + .aggregatedListSettings() + .setRetrySettings( + addressesSettingsBuilder + .aggregatedListSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AddressesSettings addressesSettings = addressesSettingsBuilder.build(); + } +} +// [END compute_v1small_generated_AddressesSettings_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/create/SyncCreateSetCredentialsProvider.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..2768ddd35785 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/create/SyncCreateSetCredentialsProvider.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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperations_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.compute.v1small.RegionOperationsClient; +import com.google.cloud.compute.v1small.RegionOperationsSettings; +import com.google.cloud.compute.v1small.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionOperationsSettings regionOperationsSettings = + RegionOperationsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RegionOperationsClient regionOperationsClient = + RegionOperationsClient.create(regionOperationsSettings); + } +} +// [END compute_v1small_generated_RegionOperations_Create_SetCredentialsProvider_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/create/SyncCreateSetEndpoint.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..d8bbb778d7a3 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperations_Create_SetEndpoint_sync] +import com.google.cloud.compute.v1small.RegionOperationsClient; +import com.google.cloud.compute.v1small.RegionOperationsSettings; +import com.google.cloud.compute.v1small.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 and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionOperationsSettings regionOperationsSettings = + RegionOperationsSettings.newBuilder().setEndpoint(myEndpoint).build(); + RegionOperationsClient regionOperationsClient = + RegionOperationsClient.create(regionOperationsSettings); + } +} +// [END compute_v1small_generated_RegionOperations_Create_SetEndpoint_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/AsyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/AsyncGet.java new file mode 100644 index 000000000000..ab424fc0c15b --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/AsyncGet.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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperations_Get_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1small.GetRegionOperationRequest; +import com.google.cloud.compute.v1small.Operation; +import com.google.cloud.compute.v1small.RegionOperationsClient; + +public class AsyncGet { + + public static void main(String[] args) throws Exception { + asyncGet(); + } + + public static void asyncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + GetRegionOperationRequest request = + GetRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionOperationsClient.getCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1small_generated_RegionOperations_Get_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/SyncGet.java new file mode 100644 index 000000000000..59138ed2e811 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/SyncGet.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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperations_Get_sync] +import com.google.cloud.compute.v1small.GetRegionOperationRequest; +import com.google.cloud.compute.v1small.Operation; +import com.google.cloud.compute.v1small.RegionOperationsClient; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + GetRegionOperationRequest request = + GetRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Operation response = regionOperationsClient.get(request); + } + } +} +// [END compute_v1small_generated_RegionOperations_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/SyncGetStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/SyncGetStringStringString.java new file mode 100644 index 000000000000..00ebf2a01e69 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/get/SyncGetStringStringString.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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperations_Get_StringStringString_sync] +import com.google.cloud.compute.v1small.Operation; +import com.google.cloud.compute.v1small.RegionOperationsClient; + +public class SyncGetStringStringString { + + public static void main(String[] args) throws Exception { + syncGetStringStringString(); + } + + public static void syncGetStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String operation = "operation1662702951"; + Operation response = regionOperationsClient.get(project, region, operation); + } + } +} +// [END compute_v1small_generated_RegionOperations_Get_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/AsyncWait.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/AsyncWait.java new file mode 100644 index 000000000000..f02fcb2fade5 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/AsyncWait.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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperations_Wait_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.compute.v1small.Operation; +import com.google.cloud.compute.v1small.RegionOperationsClient; +import com.google.cloud.compute.v1small.WaitRegionOperationRequest; + +public class AsyncWait { + + public static void main(String[] args) throws Exception { + asyncWait(); + } + + public static void asyncWait() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + WaitRegionOperationRequest request = + WaitRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + ApiFuture future = regionOperationsClient.waitCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END compute_v1small_generated_RegionOperations_Wait_async] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/SyncWait.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/SyncWait.java new file mode 100644 index 000000000000..41c9b2257482 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/SyncWait.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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperations_Wait_sync] +import com.google.cloud.compute.v1small.Operation; +import com.google.cloud.compute.v1small.RegionOperationsClient; +import com.google.cloud.compute.v1small.WaitRegionOperationRequest; + +public class SyncWait { + + public static void main(String[] args) throws Exception { + syncWait(); + } + + public static void syncWait() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + WaitRegionOperationRequest request = + WaitRegionOperationRequest.newBuilder() + .setOperation("operation1662702951") + .setProject("project-309310695") + .setRegion("region-934795532") + .build(); + Operation response = regionOperationsClient.wait(request); + } + } +} +// [END compute_v1small_generated_RegionOperations_Wait_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/SyncWaitStringStringString.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/SyncWaitStringStringString.java new file mode 100644 index 000000000000..791fdfe17088 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperations/wait/SyncWaitStringStringString.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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperations_Wait_StringStringString_sync] +import com.google.cloud.compute.v1small.Operation; +import com.google.cloud.compute.v1small.RegionOperationsClient; + +public class SyncWaitStringStringString { + + public static void main(String[] args) throws Exception { + syncWaitStringStringString(); + } + + public static void syncWaitStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RegionOperationsClient regionOperationsClient = RegionOperationsClient.create()) { + String project = "project-309310695"; + String region = "region-934795532"; + String operation = "operation1662702951"; + Operation response = regionOperationsClient.wait(project, region, operation); + } + } +} +// [END compute_v1small_generated_RegionOperations_Wait_StringStringString_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperationssettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperationssettings/get/SyncGet.java new file mode 100644 index 000000000000..87bb6ca33006 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/regionoperationssettings/get/SyncGet.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.compute.v1small.samples; + +// [START compute_v1small_generated_RegionOperationsSettings_Get_sync] +import com.google.cloud.compute.v1small.RegionOperationsSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionOperationsSettings.Builder regionOperationsSettingsBuilder = + RegionOperationsSettings.newBuilder(); + regionOperationsSettingsBuilder + .getSettings() + .setRetrySettings( + regionOperationsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionOperationsSettings regionOperationsSettings = regionOperationsSettingsBuilder.build(); + } +} +// [END compute_v1small_generated_RegionOperationsSettings_Get_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/stub/addressesstubsettings/aggregatedlist/SyncAggregatedList.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/stub/addressesstubsettings/aggregatedlist/SyncAggregatedList.java new file mode 100644 index 000000000000..4d7ea1ee76ba --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/stub/addressesstubsettings/aggregatedlist/SyncAggregatedList.java @@ -0,0 +1,48 @@ +/* + * 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.compute.v1small.stub.samples; + +// [START compute_v1small_generated_AddressesStubSettings_AggregatedList_sync] +import com.google.cloud.compute.v1small.stub.AddressesStubSettings; +import java.time.Duration; + +public class SyncAggregatedList { + + public static void main(String[] args) throws Exception { + syncAggregatedList(); + } + + public static void syncAggregatedList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AddressesStubSettings.Builder addressesSettingsBuilder = AddressesStubSettings.newBuilder(); + addressesSettingsBuilder + .aggregatedListSettings() + .setRetrySettings( + addressesSettingsBuilder + .aggregatedListSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AddressesStubSettings addressesSettings = addressesSettingsBuilder.build(); + } +} +// [END compute_v1small_generated_AddressesStubSettings_AggregatedList_sync] diff --git a/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/stub/regionoperationsstubsettings/get/SyncGet.java b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/stub/regionoperationsstubsettings/get/SyncGet.java new file mode 100644 index 000000000000..4e2e67f189a7 --- /dev/null +++ b/java-compute/samples/snippets/generated/com/google/cloud/compute/v1small/stub/regionoperationsstubsettings/get/SyncGet.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.compute.v1small.stub.samples; + +// [START compute_v1small_generated_RegionOperationsStubSettings_Get_sync] +import com.google.cloud.compute.v1small.stub.RegionOperationsStubSettings; +import java.time.Duration; + +public class SyncGet { + + public static void main(String[] args) throws Exception { + syncGet(); + } + + public static void syncGet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RegionOperationsStubSettings.Builder regionOperationsSettingsBuilder = + RegionOperationsStubSettings.newBuilder(); + regionOperationsSettingsBuilder + .getSettings() + .setRetrySettings( + regionOperationsSettingsBuilder + .getSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RegionOperationsStubSettings regionOperationsSettings = regionOperationsSettingsBuilder.build(); + } +} +// [END compute_v1small_generated_RegionOperationsStubSettings_Get_sync]